Shotbook — Edit Videos in Code
Give Shotbook your voiceover (or script), brand resources, and shots.json. It handles word alignment, storyboard stills, HyperFrames rendering, and deterministic loudness/peak verification.
First: Read existing context before asking
Before asking questions or starting a new edit, inspect what already exists in the current workspace or project folder:
- Check
brand/design.json,brand/design.md, andbrand/about_me/(who_i_am.md,how_you_work.md,voice.md,competitors.md). - Run
shotbook assets --json(and inspectassets/README.mdif present) before selecting or generating screenshots, logos, or mascots. Ifassets/README.mdcontains non-Shotbook kit terms (edit_kit,shots.py), translate or refresh it withshotbook assets --update-readme --json. - Check for mismatched starter placeholder files (
script.txt,shots.json,audio/words.json) when setting up a brand inside an existing folder — never leave generic"Stop fighting timeline editors"starter copy mixed into a brand setup without warning or replacing it. - If inside an app or product repo without
brand/design.json, checkpackage.json,tailwind.config.*, CSS token files (globals.css,theme.css),README.md, andAGENTS.md/CLAUDE.md/GEMINI.mdfirst so you never re-ask answers the repo already holds.
New user & brand resource intake
If brand/design.json or brand/about_me/ is missing (or the user wants to set up/refresh their brand):
1. Ask for the creator's brand resources upfront
Do not guess brand colors, tone, or positioning when the creator already has live channels or files. Ask clearly (with compact options, best guess first) which resources to inspect (skip anything the prompt already supplied):
- Website URL — extract product positioning, hero copy, light/dark CSS tokens, web fonts, JSON-LD
sameAs& footer social links, pricing/competitor comparisons, logo, and screenshots. - Local folder / UI codebase / references — inspect
tailwind.config.*, CSS variables, existing brand docs, logo files (darkvslight), product screenshots, or past video scripts. - YouTube handle (
@handleor channel URL) — study long-form voice, hook cadence, thumbnail style, and audience level. - Instagram ID (
@handleor profile URL) — study short-form Reels framing, spoken rhythm, cover styling, and bio positioning. - Fast fallbacks — "Build a fresh brand in 4 quick visual questions" or "Use starter defaults (
Neutral Default)".
Record every provided or website-discovered handle/path/URL in brand/design.json under sources (website, localRefs, youtube, instagram, references), along with theme (dark | light), logos (dark, light, icon), colors.onAccent, and captions.byAspect.
2. Initialize project folder
If there is no Shotbook project folder yet:
shotbook init <starter> <dir> --json
If setting up a brand or workspace inside an existing folder that already contains assets/ (without needing placeholder starter script.txt / shots.json), pass --brand-only:
shotbook init --brand-only <dir> --json
Starters:
saas-demo— 16:9 software / product walkthroughshort-reel— 9:16 vertical short / reelexplainer— narrative / educational explainer
Reference guides (read only what the step needs)
| When you need to... | Read |
|---|---|
Build or refresh creator bio, goals, audience, and writing voice (brand/about_me/) | references/creator-interview.md |
Extract colors/fonts/contrast from website, local repo, YouTube, or Instagram & save brand/design.json + brand/design.md | references/brand-onboarding.md |
Structure a tight script, plan line -> visual -> sound beats, record/TTS audio, transcribe, and check gaps/WPM | references/script-and-audio.md |
Write shots.json across the 20 Shotbook scene kinds, fetch shotbook stock, and align SFX peaks | references/scene-catalog.md |
Run build, inspect storyboard stills, render, verify audio (check), inspect frames, and save dated brand rules | references/render-qc.md |
End-to-end editing workflow
Always pass --json when running shotbook CLI commands programmatically so stdout returns { "ok": true, "data": ... } or structured { "ok": false, "error": { "code", "message", "hint" } }.
- Preflight & update Shotbook:
- If the user asked to "Set up Shotbook" (especially with
https://github.com/HustleBuddy/ShotBook), don't stop just becauseshotbook --versionalready exists: runshotbook update --json(orgit pull --ff-only && bun install && bun run build && bun run cli skillinside the checkout) so the CLI and skill match GitHub. - Run
shotbook doctor --json— inspect installedffmpeg,hyperframes,python,faster-whisper,edge-tts,shotbook-build, andshotbook-skillsync. Never stop early on optional tools.
- If the user asked to "Set up Shotbook" (especially with
- Brand & voice ready: Inspect
assets/(shotbook assets --json), load or createbrand/design.json,brand/design.md, andbrand/about_me/(references/brand-onboarding.md+references/creator-interview.md), then runshotbook brand check --jsonandshotbook brand preview --json. - Voiceover first (or optional TTS):
- Ask whether the creator already has
audio/voice.mp3/.wavor wants to record their script first. - Only if they ask for generated narration: default to free zero-key
edgeTTS (shotbook tts script.txt --provider edge --json), or configured BYOK HTTP TTS (--provider custom).
- Ask whether the creator already has
- Transcribe, tighten & export captions:
shotbook transcribe audio/voice.mp3 --json->audio/words.json- Run the skipped-span check in
references/script-and-audio.md(> 4 sinternal gaps /> 5 stail gap). shotbook tighten --json-> trims long silences (audio/voice_tight.wav+audio/words_tight.json).shotbook captions --json-> exportsaudio/captions.srtand styledaudio/captions.asssynced tobrand.captions(whilebrand.captions.enabledalso renders on-screen captions inproject/compositions/captions.html).
- Gather assets & write
shots.json:- Check
assets/README.mdfirst — use real product screenshots and brand graphics wherever the script discusses the creator's product. - Fetch B-roll cleanly via
shotbook stock "<query>" --orientation landscape --json(Pexels -> Wikimedia Commons -> AI prompt handoffwhen exit code is2, recorded inassets/stock_manifest.json). - Author
shots.jsonanchoring every scene with exact sequentialatphrases (references/scene-catalog.md).
- Check
- Build & Storyboard Gate (before rendering):
shotbook build --jsonshotbook storyboard --json- Visually inspect generated storyboard stills (
storyboard/index.html/storyboard/scene-*.png) and fix layout, contrast, or pacing issues before spending render time.
- Render & Verify Audio + Frames (
references/render-qc.md):shotbook render --jsonshotbook check --json— verifies integrated loudness (-14 ± 1 LUFS), true peak (<= -1 dBTP), SFX spacing (>= 0.35 s), speech-vs-music headroom, and sampled output frames (blank/resolution/caption bounds).- Sample and visually inspect transition frames from the rendered MP4.
Guardrails
- Own voice first: Never force synthetic TTS if the user wants to record or already supplied
audio/voice.*. - Exact spoken words: Every
atphrase and on-screen quote matches the script/transcript verbatim — never silently paraphrase creator copy. - No guessing: When brand handles, local paths, voice choice, or missing recordings are ambiguous, ask crisp option questions.
- No leaked secrets: Never echo
.envsecrets (PEXELS_API_KEY,TTS_API_KEY, etc.) in stdout, logs, storyboards, or committed files. - Verify before claiming ready: Never report audio levels without
shotbook check --jsonor visual polish without checking storyboard and rendered frames. - Dated brand rules: Append every locked visual or audio rule from creator feedback to
brand/design.mdwith today's date (YYYY-MM-DD).