cyanheads/claude-config/procedural-canvas-animation
Claude Code and agent skill by cyanheads/claude-config
- community
Checking that the SKILL.md file is still in the repository.
Method for making short (8–60 s) procedural animated films and seamless loops as ONE self-contained index.html — Canvas 2D, no libraries, no fonts, no images, every pixel drawn by code, deterministic and seekable, exported frame-exact to MP4/GIF by the bundled headless-Chrome renderer. Covers writing the brief (idea → spine → beat-grid timeline → scene library → style → motion vocabulary), the engine contract (pure render(t), seeded PRNG, cue array, cached layers, seek contract), seven style presets with runnable examples (risograph as the house default, paper cut-out, sumi ink brush, pixel art, neon/CRT, flat motion graphics, watercolour), timing and easing, performance, lettering without fonts, still-based inspection, and export. Triggers: "make an animation like the ripple one", "procedural animation video", "make a video in HTML", "canvas animation to mp4", "animated signature / ident / intro / logo sting", "risograph / pixel art / neon / paper cut-out / watercolor / ink brush / motion graphics animation", "seamless loop", "write a brief for an animation", "render that animation to mp4".
Install
npx vskill@latest install cyanheads/claude-config/procedural-canvas-animationSKILL.md
The same SKILL.md was published earlier as cyanheads/claude-config/procedural-canvas-animation.
Procedural canvas animation
A short film drawn entirely by code in one HTML file, then rendered to video. The whole thing rests on one engineering decision: `render(t)` is a pure function of time. Everything else — scrubbing, ?t= inspection, screenshot review at exact timestamps, frame-exact MP4 export, QA from rendered stills — falls out of that. A piece that uses Math.random() in the render loop or accumulates state frame to frame can't be inspected or exported reliably, and the review process below stops working. Hold that line first, then everything below.
Two artifacts come out of this skill: a brief (the spec you or a sub-agent builds from) and the film (index.html + exported .mp4). The brief is most of the work — a good brief lets a fresh agent build the piece; a vague one produces a demo of techniques instead of a film.
When it applies: any request for an animated ident, intro, logo sting, signature, launch teaser, looping visual, or "a short like the ripple one." Not for UI motion, data viz, or anything that needs live data — those have their own skills.
The deliverable
| Constraint | Rule | |
|---|---|---|
| One file | index.html, self-contained. Canvas 2D only. No libraries, no fonts (network or system), no images, no assets. Lettering is geometry defined in code. | |
| Finished, not a demo | The film plays start to end with a beginning, middle, and end. No debug overlays in the recorded output. | |
| Deterministic | render(t) pure. Seeded PRNG per scene and per element (mulberry32 is enough). Textures are attached to the object they texture, generated once. Per-frame variation (flicker, boil) hashes the frame index. | |
| Time-based | Seconds, never frame counts. Cuts and beats sit on a BPM grid (120 BPM → 0.25 s / 0.5 s units is the default). | |
| Seekable | The page exposes the seek contract below and honours ?t=<seconds> to open paused at a time. | |
| Controls | Space play/pause, replay, scrubber with time readout and act markers, ←/→ steps one frame (1/24 s), Record button (in-page WebM). Both starting points below ship them. | |
| Performance | 60 fps playback on a laptop. Build every static layer once in setup() (with a loading bar); per frame, only transform, clip, and composite cached bitmaps plus a few live elements. Detail: references/craft.md § Performance. |
Seek contract — the bundled renderer and any headless inspection depend on it:
Pick a style
Each style file has the look, palette tokens, texture/compositing technique, motion vocabulary, pitfalls, and a runnable example written to the engine contract. Read the one you pick in full before writing the brief's visual system (layer 8).
| Style | Looks like | Reach for it when | File | |
|---|---|---|---|---|
| Risograph (house default) | Spot inks, halftone dots, misregistration, cream paper | Idents, signatures, anything that should feel printed and handmade | styles/risograph.md | |
| Paper cut-out | Layered construction paper, torn edges, lifted shadows, stop-motion boil | Warm storybook pieces, explainers for kids, craft brands | styles/paper-cutout.md | |
| Sumi ink brush | Black ink on rice paper, pressure strokes, dry-brush tails, one red seal | Calm, contemplative, calligraphic; reveals by writing | styles/sumi-ink.md | |
| Pixel art | Low-res palette buffer, dithering, sprites, bitmap font | Game-flavoured intros, retro tech, seamless loops | styles/pixel-art.md | |
| Neon / CRT | Glowing tubes, outrun grid, bloom, scanlines, flicker | Synthwave, music, nightlife, tech launches | styles/neon-crt.md | |
| Flat motion graphics | Geometric shapes, tight palette, snappy easing, morphs, wipes | Product explainers, logo stings, UI-adjacent brand work | styles/flat-motion.md | |
| Watercolour | Transparent glazes, soft deformed edges, granulation, spreading washes | Landscapes, gentle narratives, editorial openers | styles/watercolor.md |
Defining a new style — write a file with the same sections. Anchor it in one real reproduction process so the rules stay coherent: cyanotype (one Prussian-blue ink, tone by exposure grain, white = paper), screen print (flat solids, 2–3 spot colours, thick registration misses), woodcut (black key block, carved-line texture, one or two colour blocks), blueprint (white line on blue, dashed construction geometry), overhead-projector cel (saturated transparent colour on a light box, dust). Every style needs a rule for darks, a rule for tone, a texture generated once and attached to its object, and a motion vocabulary with timing feel.
Anatomy of a brief
The reference brief (references/brief-exemplar-call-and-response.md) is the pattern. Its power is that it's layered, and every layer is independently swappable: change the idea and keep the style; keep the idea and swap risograph for watercolour; keep both and change the timeline. Every brief has these thirteen layers, in this order.
| # | Layer | What it must contain | Why it's there | |
|---|---|---|---|---|
| 1 | Envelope | Duration, single-file rule, Canvas 2D, no assets, "finished animation, not a demo." | Closes every escape hatch before the creative part starts. | |
| 2 | The idea | The story in ~80 words: protagonist, want, obstacle, turn, resolution, coda. Written as prose, not bullets. | A film has an arc. Without one you get a montage. | |
| 3 | The spine | The ONE visual invariant every scene, transition, and camera move is organised around (the centred dot + ripples in the exemplar), and which acts it must never break in. | Gives 30+ unrelated scenes coherence and gives QA a single thing to check in every still. | |
| 4 | Format | Canvas size, DPR handling, exact duration, background colour, BPM and base units. | Numbers, not adjectives. | |
| 5 | Timeline | A table: time range · act · what happens. Every boundary on the beat grid. Name the transition into and out of each block. | This becomes the cue array almost verbatim. | |
| 6 | Scene library | An ordered list, one line per scene: subject · setting · where the spine element lands · which rhyming motif it carries. | The builder shouldn't invent scenes mid-build. Ordering is edit decisions made up front. | |
| 7 | Composition rules | Per-scene invariants: one bold subject readable as a silhouette in 0.25 s; the spine element lands on a meaningful spot; recurring motif (arcs/rays/rings); colour budget per scene. | Keeps a fast montage legible. | |
| 8 | Visual system | The style (from styles/): palette hexes, rule for darks, tone method, texture, line quality, sizes as % of frame. | One medium metaphor generates dozens of rules coherently. | |
| 9 | Motion vocabulary | Named primitives with duration + easing, from the house table below and the style file. | The timeline references these by name. A named move is reusable and checkable; "animate nicely" isn't. | |
| 10 | Architecture | The engine contract (below). | Makes the piece seekable, inspectable, exportable. | |
| 11 | Controls & export | Scrubber, keys, ?t=, Record, optional muted audio, output aspect and loop flag. | Inspection surface for the human and the renderer. | |
| 12 | Process | Phased build with checkpoints and screenshot review (below). "Do not one-shot this." | The build is iterative by design; the brief says so explicitly so the builder doesn't try to write 3 000 lines blind. | |
| 13 | Don't | Negative constraints as a flat list. | Cheap insurance against the default failure modes (crossfades, black outlines, smooth gradients, text, per-frame randomness). |
Plus a budget rule: say what gets cut when time runs short. In the exemplar it's "cut Act II scenes, never the transitions or Acts III–VI" — the emotional arc lives in the transitions and the ending, the montage is padding. State the equivalent for every brief.
Writing a new brief
Work top-down. Fill references/brief-template.md; each step feeds the next.
- Idea → spine. Write the story paragraph. Then find the one element that can be pinned in
every frame (a dot, a horizon line, a hand, a window). If nothing can be pinned, the idea isn't ready.
- Acts on the grid. Decide duration, BPM, and 4–6 acts. Put every act boundary on a beat.
Classic shape: call (quiet, establishes spine) → expansion (montage, accelerating cuts) → collapse/archive (pull back, drain) → answer/turn → together/reprise → signature. Bend it, but keep a quiet open, a fast middle, a turn, and a short hold at the end. A loop has no ending; its brief names the seam instead (what must match at t = 0 and t = D).
- Scene list. One line each, ordered. For a montage at 0.25–0.5 s per cut, 25–30 scenes fills
~8 s. Every scene names where the spine element lands. Prefer subjects with an inherent concentric/radiating motif that rhymes with the spine.
- Pick the style from the table above (risograph unless the request says otherwise).
Swapping it means rewriting layer 8 and adding the style's moves to layer 9, nothing else.
- Choose the vocabulary subset. Pull from the house table and the style file, add at most
two piece-specific moves, give every one a duration and an easing.
- Signature. The last 2 s are the maker's mark, hand-lettered: the name or mark the request
gives, and if it gives none, ask. Only text in the piece.
- Numbers everywhere. Hex, px, %, seconds, BPM, easing name. Read the brief back and replace
every adjective that could be a number.
Motion vocabulary (house)
The house moves, written for risograph and the exemplar but style-neutral in mechanics. Style files add their own (boil, ignite, write, spread, smear…). Reuse names verbatim in the timeline so a cue can reference kind: "disc-reveal" and the builder knows exactly what to implement. How to choose easings and judge timing: references/craft.md § Timing and easing.
| Move | What | Duration · easing | |
|---|---|---|---|
| ripple | Ring grows from the spine to beyond the frame corner, thinning and fading; 2–3 tick-mark arcs flick at the rim while it is in frame (roughly the first third of the move). | ~0.8 s · easeOutQuad; ~0.6 s · easeOutCubic only inside a fast montage | |
| disc-reveal | Circular mask grows with slight overshoot. Variants: coin-flip (scaleX 0→1, ellipse with visible rim thickness in a darker ink), slide-in with small rotation. | ~0.5 s · easeOutBack | |
| dive | Scale the disc to full bleed; spine stays centred. | ~0.35 s · easeInOutCubic | |
| cut | Hard cut on the beat grid. Never a crossfade between full scenes. | 0 | |
| breath | Back to blank paper for one ripple, then the next scene irises open. Used to reset the eye mid-montage. | 1 ripple | |
| lens-ring | Pale double outline around the spine, tightening shot by shot (rewind / flashback framing). | per cut | |
| pull-back | Current scene shrinks into one medallion; the others appear on concentric orbits; orbits alternate rotation direction. | ~1 s · easeInOutCubic | |
| drain | Each medallion re-rendered as one ink from its luminance, then crossfaded. The ONLY allowed crossfade. | ~0.6 s · linear | |
| scatter | Medallions move outward while shrinking to zero. | ~0.8 s · easeInQuad | |
| bloom | Petals unfold with stagger, then slow rotation. | ~0.6 s · easeOutBack, stagger 40 ms | |
| camera | Critically-damped pans and zooms. No jitter, no overshoot. | as cued | |
| handwriting | Single-line glyph paths revealed by stroke progress along their length. | ~1.2 s per word · linear per stroke | |
| dissolve | Lettering converted to dots that shrink to zero with noise-staggered timing. | ~0.6 s · easeInQuad |
Engine contract
Two starting points; both implement the contract below and ship controls, Record, ?t=, and window.__anim.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/procedural-canvas-animation/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/cyanheads/claude-config/procedural-canvas-animation)