npx skills add ...
npx skills add iart-ai/javascript-animation-skills --skill javascript-animation
This skill should be used when the user asks to "draw every frame in JavaScript", "make an animation with no image assets", "animate this in code / on a canvas", "make a hand-drawn style animated video", "turn this into a short animated film", "make an animated explainer drawn in code", "make an animated story / picture book of my photos", or "make a zero-asset animation like the Opus 5.5 ones". Produces a single self-contained HTML file whose frames are computed on an HTML canvas (seekable, deterministic), renders it to MP4, and self-checks the result. Pairs with the soundtrack skill for code-synthesized music. NOT for charts from data (use chart-animation) or 3D/WebGL (use threejs-animation / shader-glsl from webgl-animation-skills); pure text motion and depth drawn by projection on the 2D canvas are in scope.
npx skills add iart-ai/javascript-animation-skills --skill javascript-animation
Make short animated films where every pixel is computed: no images, no fonts to load, no libraries. One HTML file holds the whole piece; a headless browser seeks it frame by frame into an MP4.
Built and tested with Claude Opus 5.5; drawing quality depends heavily on the model. The self-check below needs image input: if the current model can't see images, say so to the user and treat visual verification as not done. Other models are untested; if the result looks crude, say that a stronger model is likely to help rather than claim it's the best possible.
Run straight through. Pick sensible defaults and mention alternatives at delivery. Ask before starting only if there is no subject at all (e.g. "make an animation", nothing else).
references/forms.md has a short structure for each form.references/techniques.md has ingredients, and the starter's values are placeholders, not a house style. Never reuse the look or sound of a previous piece by default: two different subjects should not come out looking or sounding alike. If the user points at someone else's piece ("like that viral one"), borrow its techniques, never its characters, story or compositions.references/storyboard.md). Tempo and sections first; then a shot list with a pace that fits the form (pace table in references/storyboard.md; each shot with framing, camera move, action, the beat it lands on, its sound, its transition); then the blocking (for a story or an explainer, the tracks of one continuous world). These go into the page as BPM, SECTIONS, SHOTS, EVENTS: the scenes, camera and soundtrack all read them, so picture and sound line up by construction. For a story or an explainer, check the logic: every beat caused by the one before, the metaphor visible in the picture.templates/starter.html. It is already storyboard-driven: one world drawn in world coordinates, withCamera per shot, claim() for every piece of text and every key object. Replace the placeholder palette and the demo world. Keep the contract: draw(frame) is a pure function of the frame number. Use rng(seed) / hash2(), never Math.random or Date.For music, use the soundtrack skill (default: synthesized in the page with Web Audio, no key needed).
Then two passes by eye, both in references/qc.md:
--sheet .5), scored for pace against the form, framing variety, dead frames, whether every action has its sound, and whether the look fits the audience. Do at least two rounds.
Render stills of the frames you change instead of re-rendering the whole film each time.| When | Do |
|---|---|
| A character appears in more than one scene | Before the scenes, render the character alone (expressions + poses) and check it yourself against references/character.md. Characters expose anchor points (mouth, hands) so props attach to them. |
| The user supplied photos of real people, pets or places | Build the character from the photos with the extraction method in references/character.md. Photos stay local: never upload them or put them in anything published. |
| It's a real-person piece and the user is present | At delivery (not before), offer to use photos of key props or people to make it more theirs. |
| Text or a speech bubble follows a moving character | Place it with placeFree(w, h, [above, right, left, below]) so it steps aside from anything already claimed. |
| On-screen text is not Latin (Chinese, Japanese...) | Use a CJK font stack; check every glyph renders (monospace fonts silently swap missing glyphs, e.g. ≈ became =). |
| The page will be published as a web page | Deliver the HTML; keep the live preview loop and the click-to-play audio. |
requestAnimationFrame state, no CSS animations, no accumulated physics: compute each frame from t alone, or the render and the preview disagree.LOOK.wobble, change the wobble seed every 4 frames (LOOK.boil: 4), not every frame. Every frame reads as noise; ~7.5 changes a second reads as hand-drawn.EVENTS/CUES; the soundtrack lands on them (see soundtrack).layout-check must print CLEAN. A caption overlapping a monitor edge or a face looks careless, and eyes on a contact sheet miss it.templates/starter.html: drawing library (ink, illustration, flat/blueprint primitives, labels, paper, filtered layers), withCamera, claim/placeFree, and a storyboard-driven two-shot skeleton.scripts/render.mjs: MP4 / stills / contact sheet. window.CUES and window.SCORE are optional: on a full render it writes <out>.cues.json and muxes the SCORE soundtrack (no SCORE = silent MP4). Needs an even canvas size.scripts/asset-audit.mjs: static scan + live network check for anything loaded or embedded.scripts/layout-check.mjs: reads window.LAYOUT over the whole film and lists text collisions with their times.references/storyboard.md: beat grid, shot list, blocking, continuity and story logic.references/techniques.md: tested drawing techniques (ink, spot-color print, single-line engraving, words as shapes, marker fills, illustration shapes).references/forms.md: structure notes per form.references/character.md: only when there's a character.references/qc.md: the self-check list.Requirements: Node 18+, ffmpeg, Chrome (or npx playwright install chromium), and npm i playwright-core in the folder you run the scripts from (your project, not the skill folder).