Agent skill

Procedural Canvas Animation

by calesthio in calesthio/generative-media-skills

Provider-independent production guidance for deterministic Canvas 2D and p5.js animation.

MITAuto-check passedMedia & Creative

Install Procedural Canvas Animation

skills CLI
$ npx skills add calesthio/generative-media-skills --skill procedural-canvas-animation -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install calesthio/generative-media-skills procedural-canvas-animation --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/calesthio/generative-media-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/production/runtime-assembly/procedural-canvas-animation .claude/skills/procedural-canvas-animation && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
procedural-canvas-animation
GitHub stars
197
Token cost
~3.1k tokens
SKILL.md length
1,424 words
Files
2
Skills in repo
26
Repo updated
First seen
Licence
MIT

At a glance

Provider-independent production guidance for deterministic Canvas 2D and p5.js animation.

  • Works in 8 steps: Render selected frames directly and… → Test first, last, loop boundary,… → Detect NaN, Infinity, runaway positions,… → …
  • Procedural textures
  • SKILL.md covers Evidence stance, Lock the canvas contract, Understand the bitmap and Use an absolute-frame interface, plus 12 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Procedural Canvas Animation is an agent skill from calesthio/generative-media-skills. Provider-independent production guidance for deterministic Canvas 2D and p5.js animation. Use for particles, fields, trails, weather, procedural textures, generative geometry, and lightweight 2D simulations that need fixed media dimensions, seeded repeatability, transparent compositing, aspect variants, performance QA, or frame-addressable rendering.

Its SKILL.md is about 3.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `EVAL.md`).

It sits in Media & Creative, covering Generative and creative coding. The repository describes itself as: Research-backed agent skills and tools for premium image, video, audio, voice, and generative media production across AI coding assistants. The licence is MIT.

When your agent uses it

  • Procedural textures
  • Generative geometry
  • Lightweight 2D simulations that need fixed media dimensions
  • Seeded repeatability

Example prompts

  • “/procedural-canvas-animation”

Workflow steps

8 steps, taken from the first numbered list in SKILL.md.

  1. Render selected frames directly and sequentially; compare within the declared environment/tolerance.
  2. Test first, last, loop boundary, respawn, collision, and aspect-variant frames.
  3. Detect NaN, Infinity, runaway positions, and unbounded allocations.
  4. Inspect transparent output over multiple backgrounds.
  5. Test CORS/readback before full render.
  6. Measure p50/p95 frame time after warm-up.
  7. Review final-size detail, flashing, reduced motion, and alternatives.
  8. Verify output frame count, dimensions, alpha, color, and encoding.

What it can do on your machine

Read from SKILL.md and the folder at commit 8c85352. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are javascript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • developer.mozilla.org
    • html.spec.whatwg.org
    • w3.org
    • tc39.es
    • p5js.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Procedural Canvas Animation loads about 3.1k tokens when it runs. Until then it costs about 95 tokens; SKILL.md has 1,424 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~95
When it runs · the whole SKILL.md, loaded when a task matches
~3.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from calesthio/generative-media-skills at commit 8c85352, republished under its MIT licence (© calesthio). 1,424 words, ~3,112 tokens.

Download SKILL.mdSave it as .claude/skills/procedural-canvas-animation/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
procedural-canvas-animation
description
Provider-independent production guidance for deterministic Canvas 2D and p5.js animation. Use for particles, fields, trails, weather, procedural textures, generative geometry, and lightweight 2D simulations that need fixed media dimensions, seeded repeatability, transparent compositing, aspect variants, performance QA, or frame-addressable rendering.

Procedural Canvas animation

Use this skill when a 2D bitmap canvas is the appropriate drawing surface for procedural motion. It covers authored particles, vector/noise fields, trails, weather, textures, generative geometry, and lightweight simulations for rendered media.

It does not cover Three.js scene graphs, WebGL/WebGPU shaders, D3 data semantics, game-engine architecture, or a generic frontend Canvas tutorial.

Evidence stance

  • Documented fact: behavior from WHATWG, ECMAScript, p5.js, W3C, or cited API documentation.
  • Production heuristic: a practical design or optimization choice to test in the target runtime.
  • Empirical observation: a measured result from the actual animation, browser, frame output, or encoded delivery.

Facts were verified 2026-07-12. Canvas, browser, p5.js, OffscreenCanvas, and encoding behavior can change; pin versions and record the render environment.

Lock the canvas contract

Define:

  • backing width/height, CSS/display size, aspect variants, fps, frame range, and alpha requirement;
  • coordinate system and projection from normalized simulation space;
  • seed, algorithm, initialization, parameters, and state-update order;
  • stateless, replay, or checkpoint strategy;
  • color space, compositing modes, background, and premultiplication assumptions;
  • source images/fonts and CORS/offline policy;
  • target runtime/browser, pixel density, output format, and encoder;
  • reduced-motion/static variant and flash policy;
  • performance budget and representative stress frames;
  • provenance and rights for all source ingredients.

Understand the bitmap

Documented facts: Canvas has an intrinsic resolution separate from CSS sizing. Its default bitmap is 300 by 150. Setting its width or height clears the bitmap and resets context state. Canvas 2D begins with source-over and globalAlpha = 1 and uses premultiplied alpha. A context requested with {alpha:false} is opaque and unsuitable for transparent delivery.

Set backing dimensions explicitly. Do not stretch a low-resolution backing bitmap with CSS and call it high resolution. For fixed video output, choose exact pixel dimensions and an explicit density; p5.js pixelDensity(1) is often appropriate for predictable output.

Changing size is a reconstruction event: rebuild transforms, state, buffers, and layout rather than assuming pixels or context settings survive.

Use an absolute-frame interface

Design around:

js
renderFrame(frameIndex, variant, accessibilityMode)

with composition time:

$$ t = \frac{frameIndex}{fps} $$

Keep requestAnimationFrame() outside production state. Documented fact: rAF is one-shot, follows browser display scheduling, may pause in hidden contexts, and does not guarantee 60 fps. p5.js frameRate() requests a target but does not define offline media time.

Do not use Date.now(), performance.now(), millis(), deltaTime, or mutable frameCount as final-render truth.

Choose a determinism strategy

Stateless

Calculate every object directly from (seed, objectId, frameIndex, channel). Best for periodic fields, analytic particles, procedural lines, and arbitrary-frame access.

Fixed-step replay

Reset to deterministic initial state and advance exactly $\Delta t = 1/fps$ in a documented order until the requested frame. Suitable for stateful snow, flocking, or cellular systems when duration is manageable.

Checkpoints

Persist deterministic state at fixed frames and replay from the nearest earlier checkpoint. Useful for long stateful simulations. Version checkpoint schema and reject it when parameters/runtime change.

History-dependent persistent-buffer trails are not random-access. Replay history, store checkpoints, or draw the previous $K$ analytic positions into each frame.

Seed randomness explicitly

Documented fact: ECMAScript Math.random() has an implementation-defined algorithm and no seed control. p5.js randomSeed() and noiseSeed() can repeat their respective sequences, but that does not guarantee pixel identity across p5/browser versions.

Record seed and generator implementation. Prefer keyed random values where arbitrary access matters, so rendering frame 200 does not depend on how many random values earlier frames consumed.

Never reseed every frame unless the intended algorithm is explicitly frame-keyed; that often freezes or correlates motion.

Particles, fields, weather, and trails

For each system define:

  • spawn domain and lifetime;
  • initial position/velocity/shape/color distributions;
  • force/field equations and units;
  • boundary behavior: wrap, reflect, kill, respawn, or clamp;
  • update ordering and collision policy;
  • mapping from normalized simulation to each canvas;
  • trail/history policy;
  • outlier and NaN handling.

Keep simulation state independent of pixels. Aspect variants should share the event while changing framing, count, density, line width, or field bias intentionally.

For weather, distinguish visual plausibility from physical simulation. Do not claim meteorological accuracy unless the model and inputs support it.

Compositing and alpha

Set globalCompositeOperation deliberately and restore context state. Test source-over, additive/lighten effects, masks, and erasure over black, white, and checkerboard backgrounds.

Transparent delivery requirements:

  • context alpha enabled;
  • no accidental background fill;
  • output format/codec preserves alpha;
  • corner and edge pixels inspected;
  • premultiplied/straight-alpha conversion and halos checked in the receiving compositor.

JPEG cannot preserve alpha. WebCodecs encoder alpha behavior is configuration- and codec-dependent; verify capability and output instead of assuming support.

External assets and origin cleanliness

Documented fact: drawing cross-origin media without valid CORS can make a canvas non-origin-clean, causing pixel reads and serialization to throw SecurityError.

Freeze production assets locally where possible. Record URLs, licenses, hashes, CORS policy, and failure behavior. Do not discover a tainted canvas after a long render.

p5.js production pattern

For deterministic offline work:

js
function setup() {
  pixelDensity(1);
  createCanvas(outputWidth, outputHeight, P2D);
  noLoop();
  initialize(seed);
}

function renderFrame(frame) {
  resetOrRestore(frame);
  advanceTo(frame, 1 / fps);
  drawCurrentState();
}

This is an architectural example. advanceTo() must not advance once too many; define whether frame zero represents initial state before any step.

Avoid allowing window size, input events, or live device density to alter final state. resizeCanvas() clears output and typically triggers redraw, so rebuild the declared variant explicitly.

Show full SKILL.md (601 more words)Show less

Performance

Profile before moving work to a worker. First reduce:

  • algorithmic complexity and pairwise interactions;
  • repeated path construction and context state changes;
  • large shadows/filters and overdraw;
  • pixel readbacks and per-pixel loops;
  • allocation inside frame loops;
  • excessive object count or trail history;
  • redundant redraws of static layers.

Documented fact: OffscreenCanvas is transferable and can run in workers, but worker use does not guarantee lower total render time. It can improve main-thread responsiveness and pipeline separation. Verify APIs available in the worker and account for transfer/serialization cost.

Measure warm and cold frame time, p50/p95, peak memory, output readback, and teardown. Promise repeatability only for a pinned environment; fonts, antialiasing, filtering, floating point, and color conversion can differ.

Accessibility and safety

Meaningful non-text content needs an equivalent alternative. Color cannot be the sole carrier of meaning, and meaningful graphics/control indicators need appropriate contrast.

WCAG 2.2 limits flashing above three times in one second unless below thresholds. Test rendered loops while looping. Qualifying automatic motion on interactive surfaces needs pause/stop/hide behavior.

Reduced motion should alter motion language: static representative frame, slower drift, smaller displacement, fewer particles, or user-controlled playback. Lowering FPS alone may increase jerk without reducing motion extent.

For decorative canvas, hide implementation details from assistive technology and expose meaning in the host. Canvas text or a description is not a substitute for keyboard-operable semantic controls.

Provenance and QA

Record seed, generator, algorithm/library versions, parameters, dimensions, fps, frame range, color space, density, source assets/licenses/hashes, runtime/browser, and output hashes.

QA:

  1. Render selected frames directly and sequentially; compare within the declared environment/tolerance.
  2. Test first, last, loop boundary, respawn, collision, and aspect-variant frames.
  3. Detect NaN, Infinity, runaway positions, and unbounded allocations.
  4. Inspect transparent output over multiple backgrounds.
  5. Test CORS/readback before full render.
  6. Measure p50/p95 frame time after warm-up.
  7. Review final-size detail, flashing, reduced motion, and alternatives.
  8. Verify output frame count, dimensions, alpha, color, and encoding.

Example 1: transparent wind-ribbon overlay

This is a complete example, not a mandatory formula.

Intent: eight-second, 30 fps, 1920x1080 transparent overlay of 600 luminous wind traces.

Approach: use seed 42719, normalized coordinates, and 36-frame analytic trails. Immutable particle parameters come from a keyed generator. Each position is a pure periodic function of absolute time. Frame $f$ clears transparent and draws segments from $f-36$ through $f$ with bounded age-controlled alpha/width. Use source-over for base ribbons and a separately tested additive highlight.

QA: direct versus sequential hashes for frames 0, 1, 137, and 239; alpha histogram/corners; black/white/checkerboard composites; p50/p95; flash test.

Likely failures: mutable PRNG consumption, {alpha:false}, background fill, clipped additive values, or wrapped-trail jumps.

Variation: 9:16 lowers count and biases vertical flow; reduced-motion output is an approved static frame.

Example 2: replayable p5.js snowfall

This is a complete example, not a mandatory formula.

Intent: 12-second snowfall at 30 fps in 9:16 and 16:9, plus static reduced-motion output.

Approach: pixelDensity(1), noLoop(), seed random/noise with 8301, use normalized state and fixed $1/30$ steps. renderFrame(n) resets, steps 0..n-1, then draws. Dimensions affect projection and composition margins, not simulation state. Respawns consume values only in deterministic replay order.

QA: replay frame 240 twice; compare normalized state before projection; reject NaN/out-of-bounds growth; test crops, performance, pause behavior, alternatives, and flashing.

Likely failures: deltaTime, millis(), frameCount, or window dimensions leak into state; resizing without reconstruction; assuming seed output is version-stable.

Sources

Verified 2026-07-12:

© calesthio, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/production/runtime-assembly/procedural-canvas-animation of calesthio/generative-media-skills.

  • SKILL.md
  • EVAL.md

Open the folder on GitHubat commit 8c85352

Compare with similar skills

Procedural Canvas Animation next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Procedural Canvas Animation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Procedural Canvas Animation this skillcalesthio/generative-media-skills197—~3.1kAutomated safety check: PassMIT
Anidoodlealexgreensh/anidoodle878—~2.7kAutomated safety check: PassApache-2.0
PosterlyChenruishuo/posterly418—~4.6kAutomated safety check: NotesAGPL-3.0
Artist Self Evolvetettethu/VibeGame269—~2.5kAutomated safety check: PassApache-2.0
P5jsTommy-yw/RunbookHermes5461 repos~6.8kAutomated safety check: PassMIT
Prismer P5jsPrismer-AI/PrismerCloud1.6k3 repos~6.9kAutomated safety check: PassMIT

Similar skills

  • Anidoodle

    alexgreensh/anidoodle

    Code-drawn stills, drawing timelapses, films, explainers and interactive web animations in 32 styles, with composed scores.

    878 GitHub stars~2.7k tokensUpdated today
    Media & CreativeAuto-check passed
  • Posterly

    Chenruishuo/posterly

    Create or revise academic conference posters in HTML/CSS and export print-ready PDFs.

    418 GitHub stars~4.6k tokensUpdated today
    Media & CreativeAuto-check: notes
  • Artist Self Evolve

    tettethu/VibeGame

    Distill stable art-generation patterns from a completed project, so future projects produce comparable assets without re-discovering the prompts.

    269 GitHub stars~2.5k tokensUpdated 10 days ago
    Media & CreativeAuto-check passed
  • P5js

    Tommy-yw/RunbookHermes

    Production pipeline for interactive and generative visual art using p5.js.

    546 GitHub starsUsed in 1 repo~6.8k tokens
    Media & CreativeAuto-check passed
  • Prismer P5js

    Prismer-AI/PrismerCloud

    p5.js sketches: gen art, shaders, interactive, 3D. An agent skill from Prismer-AI/PrismerCloud.

    1.6k GitHub starsUsed in 3 repos~6.9k tokens
    Media & CreativeAuto-check passed
  • Official

    Creates original generative art in two steps: a written algorithmic philosophy, then a p5.js sketch with seeded randomness and an interactive viewer for exploring parameters.

    180k GitHub starsUsed in 38 repos~4.9k tokens
    Media & CreativeAuto-check passed

More from calesthio/generative-media-skills

All 26 skills in this repo
  • 3D Asset Production

    calesthio/generative-media-skills

    A skill your agent uses to turn generated, captured, scanned, or modeled 3D output into production-ready standalone assets for DCC, real-time engine, web, or interchange delivery.

    197 GitHub stars~9.7k tokensUpdated 2 mo ago
    Auto-check passed
  • Audio Mixing Mastering

    calesthio/generative-media-skills

    Provider-independent audio mixing and mastering direction for AI agents finishing generated videos, ads, trailers, explainers, podcasts, recuts, avatar clips, music videos, documentaries, and social…

    197 GitHub stars~7k tokensUpdated 2 mo ago
    Auto-check passed
  • Captions Media Accessibility

    calesthio/generative-media-skills

    Provider-independent captions and media accessibility direction for AI agents producing or finishing generated videos, ads, social clips, explainers, avatar videos, documentaries, podcasts/video…

    197 GitHub stars~6.9k tokensUpdated 2 mo ago
    Auto-check passed
  • Comfyui Media Workflows

    calesthio/generative-media-skills

    Provider-independent production workflow for agents assembling, auditing, executing, and handing off ComfyUI node-graph workflows for image, video, upscale, inpaint, conditioning, and batch media…

    197 GitHub stars~8.5k tokensUpdated 2 mo ago
    Auto-check passed
  • Ffmpeg Media Finishing

    calesthio/generative-media-skills

    Provider-independent FFmpeg finishing workflow for AI agents preparing generated or edited media deliverables.

    197 GitHub stars~8.2k tokensUpdated 2 mo ago
    Auto-check passed
  • Generated Media QA

    calesthio/generative-media-skills

    Provider-independent quality assurance for AI-generated and AI-assisted media.

    197 GitHub stars~8k tokensUpdated 2 mo ago
    Auto-check passed

Questions about Procedural Canvas Animation

What does Procedural Canvas Animation do?

Provider-independent production guidance for deterministic Canvas 2D and p5.js animation. Procedural Canvas Animation is an agent skill from calesthio/generative-media-skills.js animation.

When should I use Procedural Canvas Animation?

Procedural Canvas Animation fits situations like: procedural textures; generative geometry; lightweight 2D simulations that need fixed media dimensions; seeded repeatability.

How do I install Procedural Canvas Animation in Claude Code?

Run `npx skills add calesthio/generative-media-skills --skill procedural-canvas-animation -a claude-code`. Or copy the skill folder (skills/production/runtime-assembly/procedural-canvas-animation in calesthio/generative-media-skills) into .claude/skills/procedural-canvas-animation in your project. Claude Code loads it when a task matches its description.

How do I install Procedural Canvas Animation in Codex?

Run `npx skills add calesthio/generative-media-skills --skill procedural-canvas-animation -a codex`. Or copy the skill folder (skills/production/runtime-assembly/procedural-canvas-animation in calesthio/generative-media-skills) into .agents/skills/procedural-canvas-animation in your project. Codex loads it when a task matches its description.

Can I use Procedural Canvas Animation in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add calesthio/generative-media-skills --skill procedural-canvas-animation -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/procedural-canvas-animation, .gemini/skills/procedural-canvas-animation, .github/skills/procedural-canvas-animation and .opencode/skills/procedural-canvas-animation in your project.

What does Procedural Canvas Animation need to run?

SKILL.md names no scripts, command-line tools or credentials: Procedural Canvas Animation is instructions for the agent only.

Does Procedural Canvas Animation access the network?

SKILL.md names 5 domains. As links in the text: developer.mozilla.org, html.spec.whatwg.org, w3.org, tc39.es and p5js.org. This is read from the text; nothing was executed.

Is Procedural Canvas Animation safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Procedural Canvas Animation use?

Procedural Canvas Animation is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Procedural Canvas Animation use?

About 3.1k tokens (SKILL.md is roughly 12k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Procedural Canvas Animation?

Skills that share tags, products or a category with Procedural Canvas Animation: Anidoodle (alexgreensh/anidoodle, 878 stars), Posterly (Chenruishuo/posterly, 418 stars), Artist Self Evolve (tettethu/VibeGame, 269 stars) and P5js (Tommy-yw/RunbookHermes, 546 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Procedural Canvas Animation?

calesthio (a GitHub user) maintains it in calesthio/generative-media-skills, which has 197 GitHub stars. The repository holds 26 skills in this directory. The repository was last updated on July 14, 2026.

Source: calesthio/generative-media-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.