storybook-pipeline
Orchestrator that runs the full AI Storybook pipeline end-to-end on one English story. Dispatches the 4 component skills in order — scene-splitter → story-illustrator → story-narrator → story-html-publisher — using the locked filename convention {slug}_* and {slug}_part_NN.{png,mp3} so every image and audio clip pairs by scene index, ending with one self-contained HTML storybook. Use this skill whenever the user wants to run the pipeline, make a storybook from a story, turn a story into an illustrated narrated storybook, process a story end to end, or build the storybook without invoking each skill by hand. Trigger on phrases like "run the pipeline on stories/my-story.md", "make a storybook from this", "turn this into a storybook", "build the storybook end to end", "process this story", or whenever the user drops an English story in stories/ and wants the full split → illustrate → narrate → HTML flow. Preserves every sub-skill's hard gate. Optionally accepts "with QA" to enable the ill
hassancs91 · 已有 AI 审核记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add hassancs91/claude-image-generation --skill storybook-pipeline技能说明
name: storybook-pipeline description: Orchestrator that runs the full AI Storybook pipeline end-to-end on one English story. Dispatches the 4 component skills in order — scene-splitter → story-illustrator → story-narrator → story-html-publisher — using the locked filename convention {slug}_* and {slug}_part_NN.{png,mp3} so every image and audio clip pairs by scene index, ending with one self-contained HTML storybook. Use this skill whenever the user wants to run the pipeline, make a storybook from a story, turn a story into an illustrated narrated storybook, process a story end to end, or build the storybook without invoking each skill by hand. Trigger on phrases like "run the pipeline on stories/my-story.md", "make a storybook from this", "turn this into a storybook", "build the storybook end to end", "process this story", or whenever the user drops an English story in stories/ and wants the full split → illustrate → narrate → HTML flow. Preserves every sub-skill's hard gate. Optionally accepts "with QA" to enable the illustrator's vision-QA pass.
Storybook Pipeline (Orchestrator)
The runbook for turning one English story into a finished, self-contained HTML storybook. It does no creative work itself — it dispatches the 4 component skills in order, with the right artifact paths, and locks the filename convention so every output pairs cleanly by scene index.
It exists so that in a fresh session, "make a storybook from this story" has a single entry point — no need to remember the 4 skills, their order, or the filename conventions.
When this skill applies
The user has an English story (typically in stories/) and wants the full output: scenes + images + audio + a single HTML storybook. Common phrasings:
- "run the pipeline on
stories/the-little-cloud.md" - "make a storybook from this story"
- "turn this into an illustrated storybook"
- "build the storybook end to end"
Does NOT apply to:
- Single-step requests — if they only want images, invoke
story-illustrator; only audio,story-narrator. The orchestrator is for the full chain. - Re-running after partial completion — if some artifacts exist, detect them and resume from the next missing step; don't blindly overwrite. Ask if unsure.
Pipeline order (LOCKED)
input: stories/{slug}.md
1. scene-splitter → {slug}_scenes.json
2. story-illustrator → {slug}_bible.md, {slug}_shotlist.md, {slug}_images.json
3. story-narrator → {slug}_audio/{slug}_part_NN.mp3 (+ manifest.json, optional title.mp3)
4. story-html-publisher → {slug}_story.json + {slug}.html ← the deliverable
Steps 2 and 3 both read {slug}_scenes.json and are independent — but in an interactive session run them in order so the user reviews each at its own gate.
Slug + filename convention (LOCKED)
The slug is derived from the story title or filename: lowercased, hyphenated, ASCII-safe (^[a-z0-9-]+$, max 60 chars). Every artifact shares it. All artifacts live in stories/{slug}/; the raw .md stays at stories/ (it's the trigger, not an artifact). See CLAUDE.md for the full filename table.
Workflow — five dispatch stages
Stage 0: Intake
- Identify the story file (explicit argument → the single new
*.mdinstories/→ ask). - Determine the slug. Read line 1 (the
# Title) + the filename; propose a slug. One-line confirm: "Slug:the-little-cloud. OK?" — proceed ongo. (HARD GATE — locks the slug into every artifact.) - Create the working dir
stories/{slug}/. All sub-skills output there. - Detect completed stages. Glob for
stories/{slug}/{slug}_scenes.json,_images.json, etc. If any exist, list them and ask: skip those stages or redo? Default = skip completed. - Check for the QA flag. If the user said "with QA" / "--qa", note
qa_enabled = truefor the illustrator. Default OFF. - Ask the image aspect ratio AND model up front — HARD GATES. Don't wait until Stage 2; settle both now so the long stages run uninterrupted:
"What aspect ratio?
4:5portrait (storybook / phone — the default),1:1square,3:4book page, or16:9widescreen." "Which image model?nano-banana-2(fast & cheap, ~$0.08/img),nano-banana-pro(best for multi-character, ~$0.15/img), Smart mix (pro only for multi-character beats — suggested), orseedream-4(cheapest, ~$0.03/img). Seeimage-models.json." Lock them asaspect_ratioand the model choice and pass both to the illustrator at Stage 2. Ask — do not infer. Aspect ratio locks into every image; both gates spend money. They pause even under an auto-mode reminder. - Pre-flight checks:
stories/is writable;FAL_KEYis resolvable (python .claude/skills/story-illustrator/assets/fal_image.py --check— re-checked at Stage 2); the ElevenLabs MCP is connected (re-checked at Stage 3); and the user has (or will provide) an ElevenLabsvoice_idfor the narrator.
Stage 1: Dispatch scene-splitter
Invoke scene-splitter with the story path, the slug, and output dir stories/{slug}/. The user approves the scene plan at its hard gate. Output: {slug}_scenes.json — the spine for stages 2 + 3.
Stage 2: Dispatch story-illustrator
Invoke story-illustrator with:
stories/{slug}/{slug}_scenes.jsonand the slug- A style hint from the story's tone (e.g. "warm soft watercolor children's-book illustration" for a gentle beginner story)
- Pre-locked aspect ratio + model from Stage 0: "Aspect ratio:
{aspect_ratio}(already chosen, do not re-ask). Image model:{model choice}(already chosen, do not re-ask)." - If
qa_enabled, add "with QA" - A note: "Generate one image per scene, indexed to match
scenes.json. Save{slug}_bible.md,{slug}_shotlist.md,{slug}_images.jsontostories/{slug}/."
The illustrator's own aspect-ratio and model prompts are skipped because the orchestrator pre-supplied both. The user approves the bible (Stage 2 gate — remind
阅读完整来源 ↗