Communitygithub.com

shotbook

Edit videos in code from your voiceover or script with Shotbook (`shotbook` CLI): discover creator & brand resources (website URL, local repo/assets, YouTube handle, Instagram ID), lock brand tokens and voice guidelines, plan word-anchored scenes, review storyboards, render with HyperFrames, and verify loudness, peaks, and rendered frames.

What is shotbook?

shotbook is a Claude Code agent skill that edit videos in code from your voiceover or script with Shotbook (`shotbook` CLI): discover creator & brand resources (website URL, local repo/assets, YouTube handle, Instagram ID), lock brand tokens and voice guidelines, plan word-anchored scenes, review storyboards, render with HyperFrames, and verify loudness, peaks, and rendered frames.

Works with✓Claude Code~Codex CLI~Cursor✓Gemini CLI
npx skills add https://github.com/HustleBuddy/ShotBook/tree/HEAD/skills/shotbook

Ask in your favorite AI

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

Documentation

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:

  1. Check brand/design.json, brand/design.md, and brand/about_me/ (who_i_am.md, how_you_work.md, voice.md, competitors.md).
  2. Run shotbook assets --json (and inspect assets/README.md if present) before selecting or generating screenshots, logos, or mascots. If assets/README.md contains non-Shotbook kit terms (edit_kit, shots.py), translate or refresh it with shotbook assets --update-readme --json.
  3. 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.
  4. If inside an app or product repo without brand/design.json, check package.json, tailwind.config.*, CSS token files (globals.css, theme.css), README.md, and AGENTS.md / CLAUDE.md / GEMINI.md first 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 (dark vs light), product screenshots, or past video scripts.
  • YouTube handle (@handle or channel URL) — study long-form voice, hook cadence, thumbnail style, and audience level.
  • Instagram ID (@handle or 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 walkthrough
  • short-reel — 9:16 vertical short / reel
  • explainer — 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.mdreferences/brand-onboarding.md
Structure a tight script, plan line -> visual -> sound beats, record/TTS audio, transcribe, and check gaps/WPMreferences/script-and-audio.md
Write shots.json across the 20 Shotbook scene kinds, fetch shotbook stock, and align SFX peaksreferences/scene-catalog.md
Run build, inspect storyboard stills, render, verify audio (check), inspect frames, and save dated brand rulesreferences/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" } }.

  1. Preflight & update Shotbook:
    • If the user asked to "Set up Shotbook" (especially with https://github.com/HustleBuddy/ShotBook), don't stop just because shotbook --version already exists: run shotbook update --json (or git pull --ff-only && bun install && bun run build && bun run cli skill inside the checkout) so the CLI and skill match GitHub.
    • Run shotbook doctor --json — inspect installed ffmpeg, hyperframes, python, faster-whisper, edge-tts, shotbook-build, and shotbook-skill sync. Never stop early on optional tools.
  2. Brand & voice ready: Inspect assets/ (shotbook assets --json), load or create brand/design.json, brand/design.md, and brand/about_me/ (references/brand-onboarding.md + references/creator-interview.md), then run shotbook brand check --json and shotbook brand preview --json.
  3. Voiceover first (or optional TTS):
    • Ask whether the creator already has audio/voice.mp3 / .wav or wants to record their script first.
    • Only if they ask for generated narration: default to free zero-key edge TTS (shotbook tts script.txt --provider edge --json), or configured BYOK HTTP TTS (--provider custom).
  4. 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 s internal gaps / > 5 s tail gap).
    • shotbook tighten --json -> trims long silences (audio/voice_tight.wav + audio/words_tight.json).
    • shotbook captions --json -> exports audio/captions.srt and styled audio/captions.ass synced to brand.captions (while brand.captions.enabled also renders on-screen captions in project/compositions/captions.html).
  5. Gather assets & write shots.json:
    • Check assets/README.md first — 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 handoff when exit code is 2, recorded in assets/stock_manifest.json).
    • Author shots.json anchoring every scene with exact sequential at phrases (references/scene-catalog.md).
  6. Build & Storyboard Gate (before rendering):
    • shotbook build --json
    • shotbook storyboard --json
    • Visually inspect generated storyboard stills (storyboard/index.html / storyboard/scene-*.png) and fix layout, contrast, or pacing issues before spending render time.
  7. Render & Verify Audio + Frames (references/render-qc.md):
    • shotbook render --json
    • shotbook 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 at phrase 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 .env secrets (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 --json or visual polish without checking storyboard and rendered frames.
  • Dated brand rules: Append every locked visual or audio rule from creator feedback to brand/design.md with today's date (YYYY-MM-DD).

Related Skills