Motion Studio
Motion graphics rendered from code. Each piece is a deterministic HTML scene (window.seek(t) paints any moment), captured frame by frame in headless Chrome with motion blur, scored in code to a beat grid, checked by measuring scripts and a fresh pair of eyes on the rendered frames, and exported to every format from one timeline.
The prompt is the small part. The things that made the best AI motion work are built into this skill: real sources, a chosen reference look, a render engine, springs, a beat grid, and a review that looks at actual frames. Your job is direction and taste.
In this file <skill> means this skill's folder (usually ~/.claude/skills/motion-studio).
House rules
- Interview before design. Run the intake in references/intake.md before any motion work, so branding and sources are right. Pre-fill every answer you can from memory and files, then ask. Only "autopilot" (or "just make it") skips the questions.
- Real sources only. Brand kit fonts, colours and logo files (brands//). Real UI captured with capture.py. Real photos. Scripture verbatim. Don't redraw a logo, invent product UI, or use AI imagery in place of real people: invented UI and faces read as fake and undercut the piece.
- The brand kit outranks old projects. tokens.json and brand.md are the current rules. Earlier builds may predate them, so don't copy their fonts or colours.
- Two directions, the user picks. Before animating, render two contrasting style frames and let the user choose. Choosing between stills is cheap; redirecting a built animation is not.
- scene.html is a fixed shell. Piece code lives in build/scene.js and build/scene.css; scene.html is the engine's shell, copied into every project, and you never edit it. You see your work by reading rendered PNGs. When the user wants to scrub the live scene, run
python preview.py --fmt <fmt> --debugin the background: it serves the scene and opens their default browser. - One timeline. Every time, cue, beat, format and loudness target lives in build/timeline.json. Scene, score and finalize all read it, so a time typed in two places drifts on the next edit.
- Determinism. seek(t) is a pure function of t: no Math.random, Date, performance.now, timers, CSS transitions or animations, no state carried between frames, no network requests. Frames render out of order and in parallel, so anything else flickers or differs between renders.
- Measured, then reviewed. Before a draft goes to the user, the qa.py checks are clean (or each WARN is explained) and one fresh-context reviewer has looked at the frames and its real problems are fixed (phase 7). The author's own eye grades too kindly.
- Deliver files, nothing more. Uploading to Meta or YouTube, committing, pushing, posting to chat or emailing each need the user's explicit yes; they're public or shared actions.
- Credits need a yes. Every ElevenLabs generation (music, effects, voice) spends the user's credits. Show the estimate and get a yes first.
The user's notes: taste.md and ledger.md
Two files at the skill root grow with use. If either is missing, create it with a one-line header.
- taste.md: the user's preferences and one-time answers (a reaction to a piece, the Bible translation, where projects go, which voice clone to use), each with the date. Read it at set-up; add to it at delivery. Never ask a question it already answers.
- ledger.md: one row per shipped piece (date, slug, type, brand, style, signature move, logo corner and size). Read it before picking a look so new pieces don't rhyme with old ones.
Workflow
| # | Phase | You produce | Gate |
|---|---|---|---|
| 0 | Set up | project folder via new_project.py | playbook, taste.md, ledger.md, brand.md read |
| 1 | Intake | answers | the user answers (two question rounds at most) |
| 2 | Source pack | build/assets/, docs/sources.md | every asset real and listed |
| 3 | Brief + style frames | docs/brief.md, two directions as stills, approved copy | the user picks a direction |
| 4 | Sound, voice + beat grid | audio/vo/vo.wav, audio/score.wav, grid in timeline.json | the user's yes before any paid credits |
| 5 | Shot list | docs/shotlist.md on the grid | every text card has a hold time |
| 6 | Build | scene.js, scene.css | render.py check passes |
| 7 | Measured checks + fresh review | docs/review_log.md | qa.py checks clean or explained; reviewer's problems fixed |
| 8 | Draft cut | out/draft_.mp4 sent to the user | they approve pacing and sound (autopilot skips) |
| 9 | Final + QA | finals, docs/qa_report.md | qa.py all passes |
| 10 | Deliver + learn | deliverables, ledger.md row, taste.md notes |
Talking-head pieces (playbooks/talking-head.md) run in a different order: set up, then footage.py add + inspect as silent prep BEFORE the intake (the transcript answers who speaks and which series), then the intake, then the overlay plan with the user's approval gate (phase 5), then style frames (two looks for the approved treatments), then build. The footage audio is the program (no voice.py), the piece keeps the footage's frame rate, and a 9:16 piece runs render.py final --fmt 9x16, then qa.py all, then finalize.py, which composites it over the footage.
0. Set up
- Read playbooks/.md, taste.md, ledger.md (create them if missing), brands//brand.md, and any memory notes for the product, offer, church or series.
- Scaffold:
python "<skill>/tools/new_project.py" --dir "<abs project dir>" --slug <slug> --title "<title>" --brand <brand> --type <type>. Add--vowhen a voice speaks in the piece: it writes build/script.json, turns captions on and adds thesrtdelivery target. - Add
--type talking-headfor footage, without--vo(the type is transparent and 9:16 untilfootage.py addreads the export, andinspectsets the captions: on for 9:16, off for long-form). Every later command runs inside the project's build/ folder. - No brand kit for this piece yet? Use
--brand examplefor a test, or make a kit first (brands/README.md).
1. Intake
Follow references/intake.md: silent prep, then at most two AskUserQuestion rounds (the job; brand, sources, look and sound), then the copy check.
2. Source pack
A talking-head piece does this phase first, before the intake: python footage.py add <video> then python footage.py inspect (playbooks/talking-head.md). The transcript comes from inspect, never from voice.py take, which re-times and silences audio for a re-recorded take. Otherwise: capture.py for sites, UI elements, reference videos, palettes and Lottie files (references/lottie.md). tools/logo_vectors.py when logo shapes must animate. List every asset in docs/sources.md with its origin. Standards are in references/intake.md.
3. Brief + style frames
A footage piece comes here after its overlay plan is approved, and the two directions show the approved treatments over the footage (playbooks/talking-head.md, Seeing the piece over the footage).
If a frontend-design skill is installed, load it first: its push away from templated defaults is exactly what style frames need. Fill every REQUIRED slot in docs/brief.md. Pick two contrasting named styles from references/styles.md that the ledger hasn't used recently. Build each as a still of the hook frame and the end card (render.py stills), send the stills to the user (or give their paths), then ask the user to choose with AskUserQuestion. Write docs/style_guide.md for the winner.
4. Sound, voice + beat grid
A talking-head piece skips everything below about voices: the footage audio is the program. footage.py add set it as audio.voiceover (9:16), python score.py build masters it to -14 LUFS, and there is no estimate, clone or take. No ElevenLabs music unless the user asks; then audio.mode "track" ducks it under the speech and the credits need their yes. Everything else: references/sound.md. When the piece has a voice, the voice comes first and sets the clock: the voice, then its cues, then the score. The beat grid follows the voice-led cues, never the reverse.
Voice-led pieces, in this order (details in references/sound.md, Voice):
- Script. The script is the on-screen copy: its words become the captions. It goes through the copy check (phase 1), then its approved lines go into build/script.json.
- Estimate.
python voice.py estimateprints the characters and the credits a clone would spend. - Ask the user with that number. Every clone call spends ElevenLabs credits.
- Draft voice. On their yes,
python voice.py clone --spend. script.json'svoicenames the ElevenLabs voice to use. The scaffold writes "My Voice": the user either names their own cloned voice "My Voice" in ElevenLabs or puts its real name in script.json (record which in taste.md). Another speaker's piece uses that speaker's own clone. Without--spend, clone only prints the estimate. - Anchors. Point each voice-led cue at a word in
vo_cues("offer": "offer.w3-0.067"), thenpython voice.py cues --write. Never type a voice-led time by hand. - Score.
python score.py build. The voice bus ducks the music under the voice. A piece with no music usesaudio.mode"voice". - Build and critique (phases 5-7). Scenes lay their type out in
freeRoom(), clear of the captions. Addpython qa.py captionsto the measured critique. - Draft to the user (phase 8) in the clone voice, with the script as plain text. If the user wants their own recorded voice, ask them to record one clean take (a phone is fine) and send you the file. Save it to
<project>/build/audio/takes/. - Their take. Inside build/,
python voice.py take audio/takes/<file>re-times the piece to their reading (free, offline) and moves the anchored cues with it. Then, in this order:python score.py build,python voice.py status(nothing stale),python render.py check. A failed take changes nothing (references/sound.md, Both paths finish the same way). Whenend_holdmovedduron a piece with an ElevenLabs track, check the track still covers it (references/sound.md, After a take). - Final (phase 9):
render.py final, thenfinalize.py, whosesrttarget writes the.srt, thenqa.py all, which includes the caption checks.
For the music, with or without a voice: set bpm and beat_offset (or run beats.py analyze <track> --write), plan chords and sfx in timeline.json, then run python score.py build. The bed follows references/sound.md (Which bed); ask the user before spending credits. For ElevenLabs, run python elevenlabs.py music "<prompt>" --dur <dur + 2> (the film's dur plus 2 s, references/sound.md) and sfx "<prompt>" --dur 0.6 --out audio/sfx/x.mp3, use the track as audio.mode "track" with beats.py analyze --write, and place each effect as a timeline sfx entry with a file.
5. Shot list
A talking-head piece writes the overlay plan instead: draft timeline.overlays, run footage.py plan --write and plan-check, send docs/overlay_plan.md and out/footage_free.png, and build nothing until the user approves. Otherwise docs/shotlist.md: every shot on the grid, every text card with its word count and hold time (references/house-rules.md). beats.py snap --only <cues> --write moves the cues that should sit on beats. Cues listed in locked_cues never move. A voiced piece fills the VO anchor column: those cues live in vo_cues, and snap skips them.
6. Build
Write the piece in scene.js and scene.css, starting from the starter scene the scaffold copied in. Never touch scene.html. references/house-rules.md has the contract and banned looks. references/motion-craft.md covers springs, type and transitions. Give every element that must stay readable a data-key. Pieces over 45 s: references/long-form.md, except a footage piece, whose length is the footage's. A 9:16 footage piece keeps the graphic in topBand() and the speaker low, with captions between, instead of filling the safe band.
7. Measured checks + fresh review
references/critique.md holds the measured-check details, the nine-dimension rubric and the hunt list. A footage piece is judged on frames of the delivered composite (or overlays_sheet.png), never the bare overlay draft.
- Measure after
render.py draft, inside build/:qa.py text,energy,sync,lint,arc(whenqa.arc.payoffis set),render.py wavewhen the piece has a score, andqa.py captionswhen it has a voice. Fix every FAIL. Give every WARN one line in docs/review_log.md: real (fix it) or intended (say why and mark it, per critique.md, QA settings and markers). - Render the evidence: the contact sheet (
render.py sheet, per critique.md's rule),render.py phone,render.py strip --at <t>for the fastest moments, andqa.py safezonefor 9:16. Read the PNGs yourself and fix anything obviously broken first. - One fresh reviewer. Dispatch one subagent (Agent tool; a stronger model for flagship pieces) that never saw your intent or code. Give it only the contact sheet, phone sheet, strips and docs/brief.md, plus the rubric and hunt list from references/critique.md as criteria. Ask: what is this saying and what does it want me to do; then the specific problems, each with a timestamp, worst first. No scores needed.
- Fix what holds up, re-render only the affected moments, and look at them yourself. Log the reviewer's list and your fixes in docs/review_log.md. Run a second review only if the fixes were large or the reviewer missed the message or the action.
critique.md still describes an older self-scoring loop (nine scores, 8+ to stop); where it conflicts with this phase, follow this phase.
8. Draft cut
python render.py draft, then send out/draft_.mp4 to the user (a footage piece sends the composite: render.py final --fmt 9x16, then finalize.py --targets composite) and ask one question: are pacing and sound right, or what should change? Watching it on a phone is the real test.
9. Final + QA
python render.py final (add --fps 30 --tag 30fps for a 30 fps cut), then python finalize.py, then python qa.py all. Fix and re-run until the report is clean. A footage piece runs in this order: render.py final --fmt 9x16, then qa.py all (text is measured over the footage), then finalize.py, which delivers the composite from out/video_9x16_alpha.mov as <base>-9x16-v<N>.mp4 and itself runs the composite checks (spec, duration and size against the footage, loudness) into docs/qa_report.md. A voiced piece delivers its .srt through the srt target, and qa.py all adds the caption checks and a vo row (the voice stale checks). The uncaptioned master for an editor: references/sound.md (Captions from the voice).
10. Deliver + learn
Send the primary deliverable and its thumbnail (or give their paths). Say what shipped, where it is, and the specs. Add a row to ledger.md. Add every new preference the user expressed to taste.md, with the date. Offer next steps (variants, uploads) without doing them.
Commands (run inside build/)
| Need | Command |
|---|---|
| Error check | python render.py check |
| Stills | python render.py stills --t 0.5,2.0 [--fmt 9x16] |
| Contact sheet | python render.py sheet --per-beat (the beat grid sets the cues, 30 s or less) or --every 1.0 (the voice sets the cues, or over 30 s); the rule is in references/critique.md |
| Phone test | python render.py phone |
| Fast-action strip | python render.py strip --at 4.2 |
| Draft | python render.py draft |
| Final | python render.py final [--from A --to B --keep-frames] |
| Batch variants | python render.py final --query name=X --tag x |
| Score | python score.py build / python score.py list |
| Beats | python beats.py analyze <track> --write / grid / snap --write |
| ElevenLabs music and effects (spends credits, ask first) | python elevenlabs.py check / music "<prompt>" --dur <dur + 2> / sfx "<prompt>" --dur 0.6 --out audio/sfx/x.mp3 |
| Voice (clone spends credits, ask first) | python voice.py estimate / clone --spend / take <file> / cues --write / status; python elevenlabs.py voices lists the voices (free) |
| Footage in | python footage.py add <video> [--overlay-res 4k] / inspect |
| Overlay plan | python footage.py plan --write / plan-check |
| Overlay clips | python render.py overlays [--only id] |
| Text over the footage | python qa.py text --plate footage (auto when the piece has footage) |
| Captions | python voice.py cards --write / srt; the uncaptioned master: references/sound.md (Captions from the voice) |
| Caption checks | python qa.py captions (card rules, word sync, spoken text; part of qa.py all when the piece has a voice) |
| Sources | python capture.py site <url> / element / frames / palette / lottie <url-or-file> --map "#hex=token,..." --author A --licence L (references/lottie.md) |
| Deliver | python finalize.py |
| QA | python qa.py all (or safezone, determinism, loop, flash, loudness, spec) |
| Measured critique | python qa.py text / energy / sync / lint / arc |
| The score as a picture | python render.py wave |
| Scrub the live scene | python preview.py --fmt 9x16 --debug (run in the background; opens the default browser) |
| Stuck Chrome | python render.py cleanup |
| Update an old project's engine | python "<skill>/tools/new_project.py" --update-engine --dir "<project>" |
Run every script with the Python that has the requirements installed (README.md). If Playwright lives in the user site-packages, don't run Python in isolated mode (-I), which hides them.
Where projects live
Deliverables sit at the top of the project folder, the pipeline in build/. Ask the user where motion projects go the first time (for example one folder per brand, with <slug>-<yyyy-mm> subfolders), then record the answer in taste.md and never ask again.
What to load when
| Moment | Load |
|---|---|
| Set up | playbooks/.md, taste.md, ledger.md, brands//brand.md |
| Intake, sources, style frames | references/intake.md |
| Picking a look | references/styles.md |
| Building | references/house-rules.md, references/motion-craft.md, references/camera.md and references/transitions.md (any camera move or scene change), references/recipes.md (tested moves to adapt) |
| A Lottie icon or illustration | references/lottie.md |
| Sound | references/sound.md |
| A voice-led piece (voice-over, captions) | references/sound.md (Voice), from intake on |
| Critique | references/critique.md |
| Formats and export | references/formats.md |
| Talking-head footage | playbooks/talking-head.md |
| Over 45 s or flagship | references/long-form.md (not for a footage piece unless the user calls it flagship) |
| A new brand kit | brands/README.md |
| Something broke | references/troubleshooting.md |
Red flags
Stop and correct course when you catch yourself thinking any of these.
| Thought | Reality |
|---|---|
| "Memory already covers the brand and the offer, so skip the intake." | Run the intake on every piece. Pre-fill from memory, then ask. |
| "I'll copy the last project's build folder." | Scaffold with new_project.py. Old builds carry old engines and old brand tokens. |
| "Same fonts and colours as the last video." | tokens.json decides, not old projects. |
| "One direction is obviously right, so skip the style frames." | Show two. The user picks. |
| "Same look as the last series, it worked." | Check ledger.md. Every piece gets its own signature, and Meta groups look-alike ads together. |
| "An easing curve is fine for this move." | Springs for anything with mass; eases by role for the rest (motion-craft.md, Easing roles). A card, a headline or a phone on a bare curve reads cheap. |
| "The QA scripts passed, so it's good." | Scripts catch bugs, not boredom. The fresh reviewer looks at the contact sheet. |
| "I'll just tweak scene.html." | scene.html is the engine's fixed shell. The piece lives in scene.js and scene.css. |
| "I'll build the overlays, then show the user." | The overlay plan goes to the user first; nothing is built until they approve it. |
| "I'll transcribe the clip with voice.py take, or hand-roll a whisper call." | footage.py inspect makes the transcript. take re-times and silences audio, and it is for a re-recorded take. |
| "While I'm here I'll upload it, stage the ad, push, or post it." | Deliver files, then ask. |
| "I'll guess the translation, the show name or the editor's software." | Ask once, record it in taste.md, never ask again. |
| "I'll time the cues and captions from the waveform and mix the voice in with ffmpeg." | voice.py words set the times through vo_cues, the engine draws the captions from vo, and score.py's voice bus ducks the music. A hand-typed voice time is wrong after the next take. |
| "It's only a few credits, I'll voice the script now." | voice.py estimate first, then the user's yes, then clone --spend. |
| "I'll just call loadAnimation / play() on the Lottie." | The lane drives every frame from seek(t): await lottie() in setup (references/lottie.md). play() and loadAnimation fail qa.py lint, and render.py check fails a Lottie that plays. |
| "The LottieFiles colours are close enough, and the licence can wait." | A raw palette never ships: capture.py lottie --map maps every colour to a brand token. "licence unknown" is resolved before delivery, never shipped. |