Turn a context into a finished narrated video.
Arguments
Parse $ARGUMENTS as: slug context seconds orientation
$0 = slug, lowercase and hyphenated, e.g. big-bull. Becomes the folder
under public/ and, in PascalCase, the composition id
$1 = context: a file path, a URL already fetched, or the text itself
$2 = length in seconds. Default 60
$3 = landscape or vertical. Default landscape
If no arguments, ask what the video is about, how long it should be, and where
it will be published.
Instructions
Check the pipeline is present, since the skills can be installed without it:
test -f cli/generate.ts && test -f src/Root.tsx && echo present || echo missing
If missing, run the story-setup skill first. It fetches the project,
installs dependencies, creates .env and verifies the keys. Everything
below runs from the project root.
Read the story-telling rules before writing anything:
rules/story-formats.md to pick the shape, rules/narration.md for the
script, rules/images.md for the prompts, rules/pitfalls.md for the
checklist.
Pick the format from rules/story-formats.md and start from the matching
template in rules/assets/<format>/story.json. Copy it to
public/<slug>/story.json and change slug and compositionId first.
Write the narration from the context:
- Scene count is roughly seconds divided by ten, clamped 3 to 10
- 24 to 32 words per scene
- Numbers spelled as words; digits only on
stat cards
- Every fact traceable to the given context, nothing invented
- Note any contradiction in the source and say which reading was used
Write the image prompts:
- Scene direction only. The house style lives in
style.artPrompt
- Two images per scene for movement, one for a calmer feel
- Never name a real person. If the user supplied reference photos, add them
to
references and set reference on those images, putting the likeness
clause first in the prompt
- Image ids unique across the whole story, and
outro.imageId must be one
of them
Show the narration to the user and wait for approval. Voices and images
cost money; a wrong fact caught here is free.
Generate:
npm run generate -- --slug <slug>
This writes voices, images and the measured durationInFrames back into
story.json. Existing files are skipped, so reruns are cheap.
Preview or render:
npm run studio
npx remotion render <CompositionId> out/<slug>.mp4 --codec h264
Verify before reporting: check the output exists and read its real duration
rather than assuming the planned one.
Report scene count, total duration, image count, output path and size, plus
any assumption made about an ambiguous fact.
Fully automatic alternative
When the user wants no review step and has OPENAI_API_KEY set:
npm run story -- --slug big-bull --context ./article.md --seconds 60 --render
This drafts with OpenAI, generates, and renders in one pass. Quality of facts
is lower than a hand-written story.json, so prefer the reviewed path for
anything that will be published.
Formats
| Format |
Template |
Length |
Scenes |
| Biography |
assets/biography/story.json |
60s |
6 |
| Concept explainer |
assets/explainer/story.json |
60s |
6 |
| Vertical short |
assets/reel/story.json |
30s |
3 |
| Numbered list |
assets/listicle/story.json |
60s |
6 |
| News or event |
assets/news/story.json |
45s |
5 |
| Myth versus fact |
assets/myth-buster/story.json |
45s |
5 |
Example usage
/story-new big-bull ./article.md 60 landscape
/story-new repo-rate "Explain the repo rate to a first time borrower" 30 vertical
/story-new fed-cut ./notes/fed.md
1---2name: story-new3description: Create a new story video from a context. Writes story.json, gets the script approved, then generates the Sarvam voiceover and FLUX 2 artwork and renders the mp4.4---56Turn a context into a finished narrated video.78## Arguments910Parse `$ARGUMENTS` as: slug context seconds orientation1112- `$0` = slug, lowercase and hyphenated, e.g. `big-bull`. Becomes the folder13 under `public/` and, in PascalCase, the composition id14- `$1` = context: a file path, a URL already fetched, or the text itself15- `$2` = length in seconds. Default 6016- `$3` = `landscape` or `vertical`. Default `landscape`1718If no arguments, ask what the video is about, how long it should be, and where19it will be published.2021## Instructions22230. Check the pipeline is present, since the skills can be installed without it:2425 ```bash26 test -f cli/generate.ts && test -f src/Root.tsx && echo present || echo missing27 ```2829 If missing, run the `story-setup` skill first. It fetches the project,30 installs dependencies, creates `.env` and verifies the keys. Everything31 below runs from the project root.321. Read the `story-telling` rules before writing anything:33 `rules/story-formats.md` to pick the shape, `rules/narration.md` for the34 script, `rules/images.md` for the prompts, `rules/pitfalls.md` for the35 checklist.362. Pick the format from `rules/story-formats.md` and start from the matching37 template in `rules/assets/<format>/story.json`. Copy it to38 `public/<slug>/story.json` and change `slug` and `compositionId` first.393. Write the narration from the context:40 - Scene count is roughly seconds divided by ten, clamped 3 to 1041 - 24 to 32 words per scene42 - Numbers spelled as words; digits only on `stat` cards43 - Every fact traceable to the given context, nothing invented44 - Note any contradiction in the source and say which reading was used454. Write the image prompts:46 - Scene direction only. The house style lives in `style.artPrompt`47 - Two images per scene for movement, one for a calmer feel48 - Never name a real person. If the user supplied reference photos, add them49 to `references` and set `reference` on those images, putting the likeness50 clause first in the prompt51 - Image ids unique across the whole story, and `outro.imageId` must be one52 of them535. **Show the narration to the user and wait for approval.** Voices and images54 cost money; a wrong fact caught here is free.556. Generate:56 ```bash57 npm run generate -- --slug <slug>58 ```59 This writes voices, images and the measured `durationInFrames` back into60 `story.json`. Existing files are skipped, so reruns are cheap.617. Preview or render:62 ```bash63 npm run studio64 npx remotion render <CompositionId> out/<slug>.mp4 --codec h26465 ```668. Verify before reporting: check the output exists and read its real duration67 rather than assuming the planned one.689. Report scene count, total duration, image count, output path and size, plus69 any assumption made about an ambiguous fact.7071## Fully automatic alternative7273When the user wants no review step and has `OPENAI_API_KEY` set:7475```bash76npm run story -- --slug big-bull --context ./article.md --seconds 60 --render77```7879This drafts with OpenAI, generates, and renders in one pass. Quality of facts80is lower than a hand-written `story.json`, so prefer the reviewed path for81anything that will be published.8283## Formats8485| Format | Template | Length | Scenes |86|---|---|---|---|87| Biography | `assets/biography/story.json` | 60s | 6 |88| Concept explainer | `assets/explainer/story.json` | 60s | 6 |89| Vertical short | `assets/reel/story.json` | 30s | 3 |90| Numbered list | `assets/listicle/story.json` | 60s | 6 |91| News or event | `assets/news/story.json` | 45s | 5 |92| Myth versus fact | `assets/myth-buster/story.json` | 45s | 5 |9394## Example usage9596`/story-new big-bull ./article.md 60 landscape`97`/story-new repo-rate "Explain the repo rate to a first time borrower" 30 vertical`98`/story-new fed-cut ./notes/fed.md`