Creates hand-painted watercolour-and-ink cartoon videos (MP4) using p5.js + p5.brush rendered frame by frame in headless Chrome, encoded with ffmpeg. Covers storyboarding, engine API, music/LRC lyric sync, preview review, and local/cloud rendering.
Ships in painted-animation. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
A method for making short cartoons entirely in code, distilled from JohnHeibel/PDoomVideo (a 156 s music video painted by Claude Opus) and its generalised kit ClaudeAnimationBase (MIT), which is bundled here as template/.
How it works: every frame is a pure function of time t. studio.html loads p5.js + p5.brush and your scene files; each shot paints the whole 1920×1080 frame with watercolour fills and boiling ink lines. render.mjs drives headless Chrome to render contact sheets for review, or every frame in parallel, and ffmpeg encodes the MP4 (with audio if given).
bash ~/.claude/skills/painted-animation/scripts/new_project.sh <project-dir> # add --keep-demo to keep the example scene hooked up
This copies the template, unhooks the demo scene, runs npm install and checks node / ffmpeg / Chrome. Then read <project-dir>/ANIMATION_GUIDE.md in full before designing anything: it holds the rules, the animation principles and the complete engine / Clawd API. Look at docs/emotions.jpg and docs/views.jpg (the model sheets) with the Read tool.
For a music video or anything longer than ~20 s, also read references/music-video.md.
For every music video, complete this intake before storyboarding or scene implementation:
.lrc lyric file. Do not invent, transcribe or approximate missing lyrics when an LRC is expected.scripts/beat_grid.py; lyric lines are usually faster than you'd guess. Treat the provided audio and LRC as the timing source of truth.Write STORYBOARD.md in the project (format in the guide: logline, world + palette arc, motif, the character's emotion arc, then shots with reads — the timed list of what the viewer must understand). Worked example: examples/xiaozhen/ (a 31 s lyric video: storyboard and full scene code).
For a music video, turn the user's story and mood into a coherent visual narrative and emotional arc rather than illustrating each lyric literally. Show the storyboard to the user and let them react before building, unless they said to just go ahead.
duration, bpm, offset (and audio) in src/config.js.src/scenes/, ending with shots([[t0, fn], ...]); add its <script> to studio.html.You can't see motion by reading code. From the project dir:
node render.mjs --sheet=0.1,0.8,1.6,2.4 --cols=4 --w=480 --out=out/check/a.jpg # key frames
node render.mjs --strip=2.1:2.6 --out=out/check/strip.jpg # every frame of a moment
node render.mjs --sheet=2.3 --crop=760,420,500,400 --w=500 --out=out/check/face.jpg # full-res detail
Open each image with Read and actually check it against the guide's review list: event clear? character big enough? reads timed so a first-time viewer gets them? anticipation / follow-through, no snaps? feet and held props touching? transitions at every seam? no text, no 3D, no pure black/white, no muddy glows? Fix and look again. Budget: ≥ 1 sheet per shot, a strip per key motion and transition, a crop per story-carrying face.
Contact sheets, stills, short strips and other few-frame previews may be rendered and reviewed in the current cloud environment. Keep these preview renders deliberately small and targeted; they are for visual validation, not a substitute for rendering the whole video.
Never start a complete render directly. After preview review is finished, tell the user that complete cloud rendering can be very slow and ask explicitly whether they want the final video rendered locally or in the cloud. Wait for their answer; storyboard approval, preview approval, or a previous general instruction to proceed is not render authorization.
npm install, frame-render and encode commands for that platform. Keep preview images available so the user knows what was approved.node render.mjs --clip --out=out/video.mp4 # short videos, one worker
node render.mjs --frames --workers=4 && node render.mjs --encode --out=out/video.mp4 [--audio=assets/song.mp3] # long ones, parallel + resumable
Report the output path, length and ms/frame. Offer open out/video.mp4.
These are the guide's rules condensed; the guide is authoritative.
paint() / inkLine() (p5.brush) — never plain p5 rect/ellipse/fill. Flat 2D only: turns go through drawn key views (turn(), spinView()), never 3D projection. Light via glow() (additive), because pigment-mixing makes yellow-over-blue go green.!, sweat, hearts…). The one exception is karaoke in a lyric video, and at most a few big SFX.feel(), drifting cameras, boil); faces change through emotions() never by swapping; the character is big (medium shot u≈20–28, close-up 40–70); everything rides the beat.t. Frames render in parallel and out of order: no state across frames, no Math.random(), no frame-by-frame physics. hash(i) for stable randomness, jit() for boil.boilSeed(key) before each separate background element/prop, or a moving thing makes everything drawn after it re-boil every frame (jitter).line, OVERLAY, text, color, scale, … as globals; a top-level function line() fails with Cannot redefine property and the page never becomes ready (the renderer times out). Keep helpers inside the scene IIFE or give them distinct names.inDoor + door jambs, the TV bezel pieces).NaN in a point list throws Failed to construct 'OffscreenCanvas' — guard degenerate geometry.sw down in close-ups.fill shapes, or --soft-gl as a last resort.--use-angle=metal and finds /Applications/Google Chrome.app automatically; otherwise pass --chrome=<path>.paint, ribbon, through, glow) and kept on-model across shots; new emotions go in EMO in src/clawd.js.src/karaoke.js (template) adds word-by-word karaoke for lyric videos via the window.overlayHook hook in core.js.LOOPS.name = t => {...}; LOOPS.name.len = 4; + node render.mjs --loop=name --png makes a seamless loop for GIFs (ffmpeg -i out/loop_name/f%04d.png …).README.md (opens in a new tab)README.zh-CN.md (opens in a new tab)docs/xiaozhen-sheet.jpg (opens in a new tab)examples/xiaozhen/STORYBOARD.md (opens in a new tab)examples/xiaozhen/xz_set.js (opens in a new tab)examples/xiaozhen/xz_shots.js (opens in a new tab)references/music-video.md (opens in a new tab)scripts/beat_grid.py (opens in a new tab)scripts/new_project.sh (opens in a new tab)template/ANIMATION_GUIDE.md (opens in a new tab)template/LICENSE (opens in a new tab)template/README.md (opens in a new tab)template/docs/emotions.jpg (opens in a new tab)template/docs/views.jpg (opens in a new tab)template/gpu_probe.mjs (opens in a new tab)template/package-lock.json (opens in a new tab)template/package.json (opens in a new tab)template/render.mjs (opens in a new tab)template/src/clawd.js (opens in a new tab)template/src/config.js (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
/painted-animation:painted-animationfrom painted-animation
npx claudepluginhub joker-chichi/claude-mv-skill --plugin painted-animationOther plugins' skills for the same job