AnimaGen (read first)
AnimaGen renders a JSON project file (projects/<name>/project.json) to MP4 on the CPU. The user edits the same file in AnimaGen Studio, the standalone app (home page, canvas, timeline, inspector). You edit it through the CLI. You are equals on content. Only the user approves.
The user's notes are comments pinned to a moment, shown in Studio's Claude panel. They are a to-do list for you and change nothing until the user asks you to act ("address my notes"). Then resolve each one with comments resolve <id> --note "what changed".
CLI (from the repo root): node bin/animagen.mjs <verb> --project projects/<name> --json. Every verb returns {ok, rev, ...} or {ok:false, error:{code,message}}.
Every turn
history since claude: see what the user changed (GUI edits, comments, approvals, direct edits) since your last turn. Respect it; never revert user edits unless asked.history begin --who claude.- Edit only with
patch apply <ops.json|-> --expect-rev <rev>(RFC 6902, ID paths like/scenes/s02/layers/l1/props/size). If you getE_STALE_REV, re-read and redo; the user just changed something. validate, thenlint. Fix everyerror; treatwarnas real unless intentional, then add a scenewaivers[]entry with a reason.- Look at your work:
still --at <frames> --overlay ids,grid,safe/board/sheet --reviewand read the PNGs. history end --who claude.
Hard rules
- Never write
/approvalsor set a stage toapproved(the CLI refuses withE_HUMAN_ONLY). Submit withstage submit <stage>and ask the user to approve in Studio (Claude panel → Checkpoints). - Approved stages lock paths. If the user asks for a change there, pass
--change-request "<user's words>". render --quality finalonly after the user says "go". Userender --quality draftfreely.- Use tokens (
{color.accent},{motion.ease.enter},{motion.spring.heavy}...) and presets, not raw numbers, unless the user asks for a specific value. - No video models. Everything is vector shapes, text, images and code-driven motion.
- Never call the Claude API (the user has no API key). The "Claude" brain is Claude Code headless (
claude -p). - Studio edits sound and pictures in the same file; never hand-edit
project.json, and never put.wav/.mp3URLs into a Studio page (a download manager grabs them; sound goes through/sound?f=).
Sound (multi-lane)
audio.tracks[]are clips:{id, path, lane (voice|music|sfx|custom), startFrame, trimStart (s), durationFrames, gainDb, fadeIn, fadeOut (s), loop, duck, muted, source{library,id,license,credit}};audio.lanes[]hold mute/solo/gain per lane.sound design [--mood m]composes music and spots effects for the cut (generate runs it automatically). Re-running replaces only the generated (source.library: "animagen") clips; the user's own clips stay.- Levels: music about 10 dB under the voice and ducked a further 11 dB under spoken words; effects 17 to 24 dB under the voice, at most one per scene, none on dissolves. Don't add an effect to every move.
- Add one sound:
sounds add <id> --at 12.5s --lane sfx(sounds listfor ids,sounds search "rain" --sfxfor Openverse CC0/CC BY).
Finishing
render --quality final(after "go") adds motion blur, levels the mix to -14 LUFS and writes an.srt. Thencheck <mp4> --platform youtube.- Exports use one worker per spare core, limited by free memory (motion blur at 4K is heavy). If an export fails with a memory error, use a lower
--resor--workers 2. - In Studio an export runs in its own process, so it can be stopped and a failure can't close the app. Crashes and memory pressure are logged in
~/.animagen/studio.log.
Which skill next
| Request | Read |
|---|---|
| New video from an idea, script or brief | animagen-direct |
| Exact verbs, patch examples, error codes | animagen-cli |
| Check quality, fix lint, answer comments, polish | animagen-review |
| Recreate or restyle an existing video (reference → project) | animagen-reverse |
| Music, effects, levels, ducking | Sound section above; sound design, sounds, `audio beats |
| How the code fits together, gotchas, what's unfinished | AGENTS.md and docs/HANDBOOK.md at the repo root |
| Before publishing: loudness, flashing, captions file, other shapes | animagen check <mp4> --platform, subtitles, reflow |
| Format details | src/schema/project.schema.json, src/schema/types.ts |
| Token values and sources | node bin/animagen.mjs tokens list --json |
| Presets and their params | preset list / preset show <id> |
Open Studio for the user with .\animagen.cmd studio --open (all projects) or .\animagen.cmd review --project projects/<name> --open (straight into one). The Browser pane has the launch config studio, and double-clicking AnimaGen Studio.cmd does the same.
When talking to the user, use Studio's names, not engine ids:
- Presets have friendly names:
enter.trackIn= "Letters close in",accent.pop= "Pop",ambient.push= "Slow push-in". The full list is insrc/studio/app/names.ts. - Checkpoints are Brief, Story, Look, Storyboard, Timing, Animation, Review and Final video.