# painted-animation

A Claude Code skill for producing hand-painted animation and lyric videos with Claude Opus 5.5.
Part of [opus-video-skills](../../README.md).

## Overview
The skill enables Claude Opus 5.5 to produce complete animated videos, including storyboarding, character animation, camera work, transitions, music synchronisation and karaoke subtitles. All imagery is drawn procedurally in code; no image generation model is involved.
The method is derived from two projects by John Heibel: [PDoomVideo](https://github.com/JohnHeibel/PDoomVideo), a 156-second music video produced largely autonomously by Opus 5.5, and [ClaudeAnimationBase](https://github.com/JohnHeibel/ClaudeAnimationBase), a general-purpose animation kit based on it. This skill packages both into a single workflow and extends it with a lyric-video pipeline that covers tempo detection, audio clipping and karaoke subtitles.
## How It Works
1. **Storyboard.** Claude writes a shot list covering setting, palette, character arc and transitions. For each shot it lists the "reads", the timed sequence of what the viewer must understand.
2. **Drawing.** Each shot is a JavaScript function that paints the complete frame with p5.js and the [p5.brush](https://github.com/acamposuribe/p5.brush) watercolour library. Every frame is a pure function of time.
3. **Review.** Contact sheets, frame strips and close-up crops are rendered in headless Chrome. Claude inspects the images and revises the code until each shot meets the guidelines.
4. **Output.** Frames are rendered in parallel and encoded to MP4 with ffmpeg, with audio muxed in if provided.
## Characteristics
- **Character consistency.** Each character is defined by a single drawing function, so its design is identical across all shots.
- **Frame-accurate timing.** Because frames are computed from time, events can be aligned precisely to beats or to individual sung syllables.
- **Localised revision.** A change to one element requires editing only the relevant code and re-rendering the affected range; the rest of the video is unaffected.
- **Built-in animation principles.** The engine provides anticipation, squash and stretch, follow-through and acted expression changes as reusable functions.
- **Automated self-review.** Rendered frames are checked against an explicit list covering legibility, timing, contacts, transitions and colour.
## Example: 小镇姑娘 (David Tao)