Communitygithub.com

storyrig

Produce narration, captions and a frame-accurate timeline for narrated vertical videos and data stories with the Storyrig CLI. Use when adding a voiceover to slides, charts or maps; writing or editing a Storyrig production.yaml manifest; running storyrig narrate, captions or timeline; syncing visuals to narration timing; or when the user mentions Storyrig, a narrated explainer, a voiced TikTok, Reel or Short, or text-to-speech for a story.

What is storyrig?

storyrig is a Claude Code agent skill that produce narration, captions and a frame-accurate timeline for narrated vertical videos and data stories with the Storyrig CLI. Use when adding a voiceover to slides, charts or maps; writing or editing a Storyrig production.yaml manifest; running storyrig narrate, captions or timeline; syncing visuals to narration timing; or when the user mentions Storyrig, a narrated explainer, a voiced TikTok, Reel or Short, or text-to-speech for a story.

Works with~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/stiles/storyrig/tree/HEAD/skills/storyrig

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

What does storyrig do?

Storyrig turns an approved script into speech, captions and a timeline. It does not draw anything: the project makes its own charts and maps. A project with its own renderer reads Storyrig's timing; one without can let storyrig render assemble one still, clip or animated HTML page per scene into a video.

Quick start

storyrig doctor                               # tools, API key, voices
storyrig validate production.yaml             # free
storyrig narrate production.yaml --dry-run    # free: characters that would be billed
storyrig narrate production.yaml              # PAID on cache misses only
storyrig approve production.yaml              # free: lock the takes the user accepted
storyrig captions production.yaml             # free
storyrig timeline production.yaml             # free
storyrig capture production.yaml              # free: clips of scenes drawn by .html pages
storyrig render production.yaml [--captions]  # free: video.mp4 from each scene's visual
storyrig preview production.yaml              # free: frames under TikTok's interface

If storyrig is not on PATH, use uv run --project <storyrig checkout> storyrig ... or install it with uv tool install <storyrig checkout>.

Available commands are doctor, new, validate, narrate, approve, captions, timeline, capture, render, preview and build.

Rules

  • Never run a paid storyrig narrate or storyrig build without the user's explicit approval of both the narration text and the cost. Show the --dry-run output first. build synthesizes any uncached scene, so run it with --offline unless the user has approved the cost. --force and --regenerate are paid too and replace the existing take.
  • Never pass --replace-approved or run storyrig approve --revoke on your own. Approval is the user's decision. If narrate refuses because a take is approved, stop and ask. Run storyrig approve only when the user says a take is accepted.
  • Never invent data. Every number, date, place name and ranking in the script must trace to the project's own data or a cited source. If you cannot find it, ask.
  • Never change approved narration silently. Propose edits and wait.
  • Never publish or upload. Present the files for review.
  • Never print, log or commit an API key. Keys live in the environment or a .env file.
  • Use Storyrig's commands instead of reimplementing synthesis, caching, captions or timing.
  • Touch only the files the task needs.

Workflow

  1. Inspect the project. Find the data and its sources, existing visuals, and how video is built today (slide renderer, ffmpeg script, Remotion). Storyrig plugs into that pipeline; it does not replace it.
  2. Propose the story. Give the claim, the target length and a scene outline, one visual per scene. Get agreement before writing the full script.
  3. Write for the ear. Short sentences, one idea each. Round numbers the way a person would say them ("about a third", "four and a half degrees"). Say what the viewer is looking at before saying what it means. See REFERENCE.md.
  4. Write the manifest, one scene per visual, then run storyrig validate. Check every statistic, unit, date and name against the data, and keep sources in each scene's sources field.
  5. Get approval for the script and the dry-run character count, then let the user run storyrig narrate, or run it only once they say so.
  6. Listen before building on it. Ask the user to play output/narration.mp3. Regenerate only the scenes they reject: --regenerate SCENE_ID. When they accept the takes, run storyrig approve so later edits cannot replace them by accident.
  7. Run captions and timeline, then drive the visuals from timeline.json: each scene's start_ms, end_ms and frame numbers say when its visual is on screen. Use word timing to land a highlight or annotation on the word that names it. Never estimate durations from word counts. If the project has no renderer of its own and one visual per scene is enough, run storyrig render and report its warnings about padded, cropped, held or cut visuals. Burn in captions (--captions) only if the user wants them, then check a frame: move captions.position if they cover a chart or label.
  8. Add motion where it explains something. A scene's visual can be an .html page that animates to the narration; see REFERENCE.md. Animate what the narration is saying at that moment (a bar growing as it is named), not decoration, and never show a value the data does not contain, including mid-animation labels.
  9. Keep the project's look. Reuse its fonts, colors and renderer. Keep text and key marks out of the areas platform buttons and captions cover.
  10. Report. List the files written and every warning from the commands and build-report.json. Flag anything you could not verify.

Editing later

Changing one scene's text re-synthesizes only that scene; the rest come from the cache at no cost. If the manifest sets narration.context: adjacent, the scenes beside it are re-synthesized too, so show the dry run again before a paid run. After any manifest edit, rerun narrate (free when cached), then captions and timeline, which refuse to run against a stale narration.

Reference

  • Manifest fields, voices, output files and the timeline format: REFERENCE.md
  • Connecting a renderer, with a worked slide-video example: REFERENCE.md

Related Skills