cyanheads/claude-config/procedural-canvas-animation

Claude Code and agent skill by cyanheads/claude-config

Trust tier 3
  • community
Source check pending

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-animation

SKILL.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

ConstraintRule
One fileindex.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 demoThe film plays start to end with a beginning, middle, and end. No debug overlays in the recorded output.
Deterministicrender(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-basedSeconds, never frame counts. Cuts and beats sit on a BPM grid (120 BPM → 0.25 s / 0.5 s units is the default).
SeekableThe page exposes the seek contract below and honours ?t=<seconds> to open paused at a time.
ControlsSpace 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.
Performance60 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:

js
window.__anim = {
duration: 28.0, // seconds
ready: prerenderPromise, // resolves when setup/pre-renders are done
seek(t) { render(t); } // draws frame t synchronously, no animation loop involved
};

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).

StyleLooks likeReach for it whenFile
Risograph (house default)Spot inks, halftone dots, misregistration, cream paperIdents, signatures, anything that should feel printed and handmadestyles/risograph.md
Paper cut-outLayered construction paper, torn edges, lifted shadows, stop-motion boilWarm storybook pieces, explainers for kids, craft brandsstyles/paper-cutout.md
Sumi ink brushBlack ink on rice paper, pressure strokes, dry-brush tails, one red sealCalm, contemplative, calligraphic; reveals by writingstyles/sumi-ink.md
Pixel artLow-res palette buffer, dithering, sprites, bitmap fontGame-flavoured intros, retro tech, seamless loopsstyles/pixel-art.md
Neon / CRTGlowing tubes, outrun grid, bloom, scanlines, flickerSynthwave, music, nightlife, tech launchesstyles/neon-crt.md
Flat motion graphicsGeometric shapes, tight palette, snappy easing, morphs, wipesProduct explainers, logo stings, UI-adjacent brand workstyles/flat-motion.md
WatercolourTransparent glazes, soft deformed edges, granulation, spreading washesLandscapes, gentle narratives, editorial openersstyles/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.

#LayerWhat it must containWhy it's there
1EnvelopeDuration, single-file rule, Canvas 2D, no assets, "finished animation, not a demo."Closes every escape hatch before the creative part starts.
2The ideaThe 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.
3The spineThe 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.
4FormatCanvas size, DPR handling, exact duration, background colour, BPM and base units.Numbers, not adjectives.
5TimelineA 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.
6Scene libraryAn 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.
7Composition rulesPer-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.
8Visual systemThe 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.
9Motion vocabularyNamed 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.
10ArchitectureThe engine contract (below).Makes the piece seekable, inspectable, exportable.
11Controls & exportScrubber, keys, ?t=, Record, optional muted audio, output aspect and loop flag.Inspection surface for the human and the renderer.
12ProcessPhased 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.
13Don'tNegative 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.

  1. 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.

  1. 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).

  1. 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.

  1. 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.

  1. 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.

  1. 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.

  1. 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.

MoveWhatDuration · easing
rippleRing 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-revealCircular 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
diveScale the disc to full bleed; spine stays centred.~0.35 s · easeInOutCubic
cutHard cut on the beat grid. Never a crossfade between full scenes.0
breathBack to blank paper for one ripple, then the next scene irises open. Used to reset the eye mid-montage.1 ripple
lens-ringPale double outline around the spine, tightening shot by shot (rewind / flashback framing).per cut
pull-backCurrent scene shrinks into one medallion; the others appear on concentric orbits; orbits alternate rotation direction.~1 s · easeInOutCubic
drainEach medallion re-rendered as one ink from its luminance, then crossfaded. The ONLY allowed crossfade.~0.6 s · linear
scatterMedallions move outward while shrinking to zero.~0.8 s · easeInQuad
bloomPetals unfold with stagger, then slow rotation.~0.6 s · easeOutBack, stagger 40 ms
cameraCritically-damped pans and zooms. No jitter, no overshoot.as cued
handwritingSingle-line glyph paths revealed by stroke progress along their length.~1.2 s per word · linear per stroke
dissolveLettering 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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/cyanheads/claude-config/procedural-canvas-animation/badge)](https://verified-skill.com/skills/cyanheads/claude-config/procedural-canvas-animation)

Something wrong with this skill or its page? Tell us.