Logo Scene Splitter

Scene Splitter

Cộng đồng
hassancs91
scene-splitter

Tách một câu chuyện tiếng Anh thông thường thành danh sách SCENE được đánh số — mỗi scene là một khoảnh khắc, sau đó sẽ có đúng MỘT hình minh họa VÀ một đoạn thuyết minh. Đây là bước đầu tiên trong quy trình AI Storybook. Được tinh chỉnh cho truyện dành cho người mới bắt đầu (câu ngắn, khoảng 8–12 scene), với giới hạn độ dài cho mỗi scene để nội dung vừa một màn hình điện thoại mà không cần cuộn. Dùng kỹ năng này khi bạn muốn chia câu chuyện thành các scene, chuẩn bị truyện cho quy trình storybook, chia truyện thành trang/khung hoặc tạo khung scene cho họa sĩ minh họa và người thuyết minh. Kích hoạt với các yêu cầu như "chia câu chuyện này thành các scene", "chia nội dung này thành các trang", "chuẩn bị truyện này cho storybook", "tạo scene để minh họa", hoặc khi bạn đưa một câu chuyện tiếng Anh và muốn chia nhỏ để làm sách tranh. Kết quả là tệp {slug}_scenes.json, được story-illustrator và story-narrator sử dụng để tạo nội dung khớp nhau (1 hình ảnh + 1 âm thanh cho mỗi scene).

Add to TypingMind

Tổng quan

Nhà phát hànhhassancs91
Kho mãclaude-image-generation
Tên kỹ năngscene-splitter
Sao
110
Bản fork
64
Tệp đi kèm
Chỉ có hướng dẫn
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được hassancs91 công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Scene Splitter trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/hassancs91/claude-image-generation/tree/main/.claude/skills/scene-splitter
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/hassancs91/claude-image-generation.git /tmp/claude-image-generation
mkdir -p .claude/skills
cp -r /tmp/claude-image-generation/.claude/skills/scene-splitter .claude/skills/scene-splitter
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Scene Splitter trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Scene Splitter ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Scene Splitter với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Scene Splitter

Takes a plain English story and produces a numbered list of scenes — each scene being one moment that gets exactly one illustration and one narration clip downstream.

This is the upstream spine of the AI Storybook pipeline. Splitting once here and feeding both the illustrator and the narrator from the same {slug}_scenes.json keeps everything in lockstep: image N pairs with audio N pairs with paragraph N. No drift, no negotiation between skills.

When this skill applies

The user has an English story and wants to prepare it for the illustration + narration pipeline. Common phrasings: "split this into scenes", "break this into pages", "prepare this story for the storybook", "make scenes for illustration".

The skill does NOT apply to:

  • Stories that need only narration OR only images standalone (the illustrator and narrator can split on their own when used independently)
  • Non-narrative content (essays, instructions, lists)

Architectural rule: one scene = one moment = one image = one narration clip

A scene is a single moment that fits one illustration. Operationally, a new scene starts at any of:

  • Action transition — a different action happens
  • Scene change — a different location or a significant time jump
  • Emotional turn — joy → fear, calm → urgency, doubt → resolve
  • Character entry/exit — someone new appears or leaves the moment
  • Dialogue beat — a meaningful line of speech that deserves its own picture

Scenes are deliberately short and many. The storybook player renders one scene at a time, and the text MUST fit on a phone screen without scrolling. That drives the hard length cap below.

Reading level + length cap (beginner default)

This pipeline targets beginner readers. The cap is screen-fit-driven, not API-driven:

LevelPer-scene hard capTarget scene count
beginner (default)240 characters8–12 scenes

The cap is the number of characters in a single scene's text. Keep most scenes well under it (~120–180 chars reads best on a phone). To scale this pipeline up for longer/harder stories, raise the cap and the target count here — nothing downstream needs to change.

Workflow — five stages with one hard gate

Stage 1: Story analysis

  1. Read the full story.
  2. Detect: total character count, named characters, distinct scenes/locations, rough emotional arc.
  3. Determine the slug from the title (line 1) or filename — lowercased, hyphenated, ASCII-safe (^[a-z0-9-]+$, max 60 chars). Examples: "The Little Cloud" → the-little-cloud; red_balloon.md → red-balloon.
  4. Estimate scene count (aim for the 8–12 beginner range; more for a longer story).
  5. Output a one-line summary: "Story is [N] chars, [X] characters, [Y] locations, ~[Z] scenes expected at beginner level. Slug: {slug}."

Stage 2: Scene identification

Walk the story in order. At each candidate boundary, decide: new scene or extend the current one? Use the boundary rules above. When unsure, prefer MORE scenes — it's easier to merge two at the gate than to retroactively split one.

For each scene, capture the exact text from the source. The splitter chooses BOUNDARIES, not content — do not reword, summarize, or rewrite the author's prose. (If a sentence must be trimmed to fit the cap, that's an author decision — surface it at the gate, don't silently edit.)

Stage 3: Per-scene metadata

For each scene, populate:

  • index — 1-based
  • role — cover for scene 1, closing for the last scene, body for everything else
  • panel_type — one of establishing | action | reaction | detail (drives framing variety downstream):
    • establishing — wide, sets the place. Good for scene 1 and any location change.
    • action — something is happening; dynamic composition.
    • reaction — close on a character's face/feeling.
    • detail — tight on one object or element.
  • text — the exact story text for this scene (no title prefix on scene 1 — see below)
  • char_count — character count of text
  • scene — location/setting in 2–4 words (e.g. "sunny meadow", "cozy kitchen")
  • characters — array of named characters present in this moment
  • mood — emotional tone in 1–3 words (e.g. "warm, curious")
  • dominant_action — what happens in this moment, in one sentence (the illustrator turns this into the image prompt)

Title handling for the cover scene (LOCKED). The story's title (the # Heading on line 1) MUST NOT appear in scenes[0].text. The player shows the title in the header and builds a dedicated cover page from the first illustration (with the spoken title clip); scene 1's text then renders as its own story page. If the title were left in scenes[0].text it would show up twice (header + as scene 1's paragraph). Strip it from scene 1's text and store it at the top level instead:

json
{
  "story_slug": "the-little-cloud",
  "story_title": "The Little Cloud",
  "target_level": "beginner",
  "language": "en",
  "total_scenes": 9,
  "scenes": [
    {
      "index": 1,
      "role": "cover",
      "panel_type": "establishing",
      "text": "High in the sky lived a little cloud named Pip.",
      "char_count": 47,
      "scene": "wide blue sky",
      "characters": ["Pip"],
      "mood": "gentle, bright",
      "dominant_action": "A small white cloud drifts alone in a big blue sky."
    }
  ]
}

Stage 3.5: Validation (reconstruction + length cap)

Reconstruction check. Concatenate story_title + "\n\n" + scenes[*].text (single spaces between scenes) and verify it reconstructs the original story. The title goes at the front because it was stripped from scenes[0].text. If even one word is missing or duplicated, abort and report which boundary is broken — do NOT proceed to the gate with broken reconstruction.

Length-cap check. For every scene, verify char_count ≤ 240. If any scene is over cap:

  1. Do NOT show the gate yet.
  2. List the over-cap scenes (index, char_count, first ~80 chars).
  3. Re-enter Stage 2 for those scenes: find an internal boundary (action shift, emotional turn, dialogue handoff) and split. If a scene is one indivisible moment but still over cap, flag it OVERSIZED — needs author trim rather than force-splitting on a non-boundary.
  4. Re-run the reconstruction check, then proceed.

Stage 4 — HARD GATE: review scenes

Show the user the proposed scene list in a compact table (so 10+ scenes fit on screen). Columns: index · role · panel_type · mood · char_count · first ~60 chars + ellipsis · dominant_action.

Below the table, prompt:

Scene plan ready — review and approve before I write scenes.json. Reply:

  • go to commit
  • merge N M to combine two adjacent scenes
  • split N to split a scene further (I'll propose where)
  • edit N to fix one scene's metadata
  • fix N <reason> for free-form feedback (e.g. fix 7 too long, split before "but then")
  • redo to restart with a different approach

If the user issues a change, apply it, re-run Stage 3.5 validation, and re-show the gate. Loop until go.

This gate is where human taste enters: it costs nothing now, but a wrong boundary means a wrong image AND a wrong audio clip downstream.

Stage 5: Output

Write {slug}_scenes.json to the working directory stories/{slug}/. Confirm in one line: "Wrote {slug}_scenes.json — N scenes, ready for the illustrator and narrator."

What this skill does NOT do

  • Does not edit or rewrite story text — only chooses boundaries.
  • Does not generate audio or images — those are downstream skills.
  • Does not classify or tag the story (this beginner pipeline skips classification by design).
  • Does not write to any database or upload anything — local file output only.

Compatibility notes

  • Output is consumed by story-illustrator and story-narrator. Both accept {slug}_scenes.json and skip their own splitting, so the image for scene N and the audio for scene N stay aligned by index.
  • Image filenames downstream are {slug}_part_NN.png; audio filenames are {slug}_part_NN.mp3, where NN is the zero-padded scene index. The publisher pairs them by that index.
  • Be conservative: when in doubt, more scenes. The user can merge at the gate.

Câu hỏi thường gặp

Kỹ năng AI Scene Splitter làm được gì?

Tách một câu chuyện tiếng Anh thông thường thành danh sách SCENE được đánh số — mỗi scene là một khoảnh khắc, sau đó sẽ có đúng MỘT hình minh họa VÀ một đoạn thuyết minh. Đây là bước đầu tiên trong quy trình AI Storybook. Được tinh chỉnh cho truyện dành cho người mới bắt đầu (câu ngắn, khoảng 8–12 scene), với giới hạn độ dài cho mỗi scene để nội dung vừa một màn hình điện thoại mà không cần cuộn. Dùng kỹ năng này khi bạn muốn chia câu chuyện thành các scene, chuẩn bị truyện cho quy trình storybook, chia truyện thành trang/khung hoặc tạo khung scene cho họa sĩ minh họa và người thuyết minh....

Vì sao nên dùng Scene Splitter trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Scene Splitter là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Scene Splitter trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/hassancs91/claude-image-generation/tree/main/.claude/skills/scene-splitter. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Scene Splitter?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Scene Splitter với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Scene Splitter với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Scene Splitter có miễn phí không?

Có. Kỹ năng này được hassancs91 phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇