Anidoodle skill

anidoodle — Demo/output image published by the author in the repo (repo README): Four pictures drawing themselves at once: a coloured-pencil robot at a workbench, a woodblock print of herons on a bridg (frame from demo GIF)

Illustration · not a resultFrom the alexgreensh/anidoodle README — shows the whole collection, not only this skill.source ↗

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

by alexgreensh·Apache-2.0 license·★ 984 Stars on the repo·GitHub ↗

Use now

Files of Anidoodle

alexgreensh/main1 file shown
SKILL.md
Show the full text151 lines

anidoodle

Pictures, films and interactive pieces drawn entirely in code. One pure function paints every frame; another composes the score and plays it. The same source rebuilds the same pixels and the same sound on any machine, at any size, at any length. Eight acoustic instruments can play recordings of real ones from an optional download. ASK the user before any score work; never download unasked.

The engine is the easy half. Work gets thrown away because it had no point, because the subject was an icon of itself, because a style was only a palette swap, because the music had no form, or because the person spent their patience approving fragments. This skill carries the craft that prevents each of those.

Start by asking, then build

Read references/workflows/start-here.md and run its intake: one question at a time, only what the request leaves open, your recommendation first. What are they making, in which style (show the gallery sheet, https://github.com/alexgreensh/anidoodle/blob/main/skills/anidoodle/assets/styles.jpg; the list is references/styles/INDEX.md), what shape (1x1, 9x16, 16x9, 4x5 or any W x H), how long (any length; never cap it), what sound (silent or a music style and mood), which characters. "You pick" means pick and say why in one line. Write the answers into a short brief before drawing.

What are you making?

Making Read
A still: hero, spot, cover, card, poster, a series Still workflow below, references/formats.md
A picture that draws itself (timelapse, making-of) references/workflows/drawing-process.md
A loop, sticker, animated logo, ambient header Loop workflow below, references/formats.md
A story film, any length Film workflow below, references/workflows/long-film.md
An explainer or infographic; a machine that comes apart to explain an idea, in any style references/workflows/explainer.md, references/workflows/machines.md
A launch or product video (their screenshots welcome) references/workflows/launch-video.md; build it on references/workflows/launch-video-kit.md; its claims: references/workflows/facts.md
Art for a site (hero by a headline, tiles, spots, share card) on its page colour and brand; or a web animation that reacts to the UI references/workflows/site-art.md; references/workflows/interactive.md
A drawing lesson, or "how do I draw this?" references/workflows/teach-drawing.md
A character kept identical in any style (woodcut to toy brick) references/workflows/character-consistency.md, references/anatomy.md
A style matched from their image references/workflows/adapt-a-style.md
A score or soundtrack references/music/README.md
  • Music: pick a style vocabulary and mood, sketch the tension arc and motif, compose your own harmony, motif and form (references/music/compose.md, craft in references/music/theory/), revise until node tools/music.mjs craft shows only findings you chose, then check must PASS before a human listens. Styles give sound, never notes.
  • Sound effects: references/music/sound-design.md. 14 layered, seeded effects cued by film frame (filmSfx); the score ducks, and every cue must be within 6 dB of it. Effects only on real direction changes, one riser + one impact per film.
  • Launch films: launchTemplate.ts renders a product's launch from data (prompts, plates or its own UI, a score composed for it, words, install lines) in every shape from one timeline; launch.mjs new|ship. Habits that save tokens: references/working-method.md.

The seven laws

  1. Every piece has a point. A still: one idea, one focal subject, one light. A film: one transformation, one payoff, one token that returns. → references/storytelling.md
  2. State the realism. Name the anatomy, the view and the reference you opened, for animals, objects and people alike. → references/realism-and-craft.md, references/anatomy.md
  3. A style is a way of making marks. Change the medium, the edge and the order of the marks, beyond the palette. → references/styles.md
  4. Prove the look on ONE still, then build end to end. After that, gates cost more than they save. → references/working-method.md
  5. The contract is absolute. Pure in (frame, env) (and the input log, for interactive pieces), rng(seed) only, no clock, no ctx.filter. Nothing generated; images they bring may be embedded by hash, and the sound pack is a separate, hash-pinned download. → references/determinism-and-contract.md
  6. Music gets a plan, never an adjective. A style, a mood per section, the notes as data, then measurements. You cannot hear it, so one human listens before it ships. → references/music/
  7. One directs, one builds, both write everything down. When a session degrades, reset; the files are the memory. → references/working-method.md

Workflows

Still. (1) Say the idea in one sentence; name the focal subject and the light. (2) Open real reference for anything that exists, and note which. (3) Pick the style and read its plate's header first. (4) Draw in that medium's order. (5) Render with still.mjs at full size, run the detail pass on crops (faces, hands, feet, joins; references/craft-bar.md), critique in writing. ✋ One approval. (6) Deliver every size and shape asked for from the same source, and say reproducible was printed.

Loop. As a still, plus: every motion is periodic over the loop, the subject never stops, something moves every second. Check the seam (last frame against frame 0). ✋ One approval, on the moving file.

Film. (1) The story in three sentences (setup, transformation, payoff) and the token; for longer films, a spine plus one line per chapter. If you cannot write it, stop. (2) The grid: a beat is 60 x fps / bpm frames, the bpm from the brief's score; one cue table holds every frame number and a checker runs at load. (3) Real reference for anything that exists. (4) ONE look still, the hardest frame, critiqued in writing. ✋ Approval. (5) ONE 8-second music sample. ✋ Approval. (6) Build the whole film; mechanical checks run continuously. (7) A fresh critic reviews, never you (references/workflows/review.md): after the storyboard, each scene and the full render, a new subagent that saw none of the building returns ranked, timestamped problems and a verdict. Fix the biggest, a NEW critic rechecks; 3 rounds at most, logged in ledger.md. (8) ✋ Final approval. Say what you verified and what you cannot.

Three approval gates at most. Approval is a budget; spend it where being wrong is expensive.

The craft bar

The test: would a proud human illustrator ship this, or is it mechanical shape-assembly? The full table of tells is references/craft-bar.md. The ones that sink most work: subjects built from ellipses, one style recoloured into another, things that fade in instead of being drawn, people with rubber joints, and a character drawn differently from shot to shot.

No dead air in anything that moves: something visibly changes every second. A film that draws itself declares kind: "drawing" and is judged on a finer floor; a freeze still fails.

The engine

engine/ is the portable art core plus the tooling. engine/src/canvas-core knows nothing about the DOM or any backend. W, H, fps and durationFrames come from the film's meta. Camera moves (pans, dollies, lens and dolly zooms, parallax, shake) and slow motion or freeze frames: engine/src/canvas-core/camera.ts, engine/src/canvas-core/timeRemap.ts, references/camera.md. Seams between scenes: references/motion-grammar.md (cuts that carry motion: seams.ts; tools/deck.mjs deal deals each film different moves; deck.mjs find "<name>" turns a move's everyday name into its card). render.mjs --blur auto renders with motion blur (subframes per frame from its measured on-screen speed, averaged in linear light, --shutter 180); the default path is untouched.

node <skill>/engine/tools/scaffold.mjs ~/art --film intro --format 9x16 --duration 12   # seconds
cd ~/art && npm install && npx playwright-core install chromium
node tools/still.mjs intro --frame 0 --out out/look.png --scale 2   # a still, with its hash
node tools/render.mjs intro                                        # MP4; --out x.gif|x.webm|x.apng
node tools/gate.mjs intro                                          # determinism, contract, dead air
node tools/emit.mjs intro --out out/intro.html                     # one self-contained offline player
node <skill>/engine/tools/soundfetch.mjs list    # no network. Nothing installed and not declined: ask the user now
node <skill>/engine/tools/soundfetch.mjs get piano rooms  # on their yes (piano 233 MB, all 373 MB). On no: soundfetch.mjs decline
Tool What it does
scaffold.mjs a project with a still and/or film; --duration, --format or --size, --fps, --bpm
still.mjs / render.mjs frames drawn twice with hashes (--frames a,b,c --sheet in one browser) / the piece in any format (--from/--to, --poster-frame, --hashes)
gate.mjs determinism, contract, dead air, artifact; --self-test proves it can fail
registry.mjs / gallery.mjs the style list from the plates themselves / the gallery sheet
docs-check.mjs fails when any doc's style count, length or path disagrees with the code
verify-export.mjs QA on the rendered file: frames, duration, score, A/V sync, true peak after the encode; opt-in first frame, loop seam, --delivery
launch.mjs a launch film: new <name> scaffolds the spec; ship <name> --shapes 16x9,9x16 renders, posters, captions, verifies and framechecks each (framecheck.mjs: text whole, up long enough to read, clear of the 9:16 phone zones) and checks facts.json (facts.mjs)
test.mjs (npm test) unit suites in engine/test/, no browser
music.mjs vocab prints a style's vocabulary; check gates your composed score (key, master, guards, stems, novelty, which parts played recordings) and prints its shape (ARC); render, meter
soundfetch.mjs the sound pack: list, get <id...|all>, where, verify, remove <id>
sfx.mjs the sound-effects kit: list, one, kit <dir>, test

Four backends, one art core: playwright, html-player, remotion, hyperframes. → references/backends-and-adapters.md

Worked examples

  • The style plates in engine/src/canvas-core/: every hand has a still and a film of it being drawn, with the recipe in the header and references/styles/<id>.md.
  • MECHANICAL LEPIDOPTERA in example/: a 47 s scored film. scaffold.mjs ~/study --example.

Study them. Do not copy them. The craft bar is not satisfied by inheritance.

Honest limits

You cannot hear the score, watch the film move, or use the interactive piece. Every claim about them comes from a measurement or from a human; say which. A green checkmark is a claim until you re-run it. Render one frame at --scale 2 before trusting a still: a layer blitted through the wrong transform looks right at 1x and breaks at 2x.

1---
2name: anidoodle
3description: Code-drawn stills, drawing timelapses, films, explainers and interactive web animations in 32 styles, with composed scores. Matches a reference style, keeps characters consistent, teaches drawing. Deterministic, no generated assets.
4metadata:
5 created_by: Alex Greenshpun (10x Company)
6 license: Apache-2.0
7---
8 
9# anidoodle
10 
11Pictures, films and interactive pieces drawn entirely in code. One pure function paints every
12frame; another composes the score and plays it. The same source rebuilds the same pixels and the
13same sound on any machine, at any size, at any length. Eight acoustic instruments can play recordings
14of real ones from an optional download. ASK the user before any score work; never download unasked.
15 
16The engine is the easy half. Work gets thrown away because it had no point, because the subject
17was an icon of itself, because a style was only a palette swap, because the music had no form,
18or because the person spent their patience approving fragments. This skill carries the craft
19that prevents each of those.
20 
21## Start by asking, then build
22 
23Read `references/workflows/start-here.md` and run its intake: one question at a time, only
24what the request leaves open, your recommendation first. **What** are they making, in **which
25style** (show the gallery sheet, https://github.com/alexgreensh/anidoodle/blob/main/skills/anidoodle/assets/styles.jpg; the list is `references/styles/INDEX.md`), what
26**shape** (1x1, 9x16, 16x9, 4x5 or any W x H), how **long** (any length; never cap it), what
27**sound** (silent or a music style and mood), which **characters**. "You pick" means pick and
28say why in one line. Write the answers into a short brief before drawing.
29 
30## What are you making?
31 
32| Making | Read |
33|---|---|
34| A still: hero, spot, cover, card, poster, a series | Still workflow below, `references/formats.md` |
35| A picture that draws itself (timelapse, making-of) | `references/workflows/drawing-process.md` |
36| A loop, sticker, animated logo, ambient header | Loop workflow below, `references/formats.md` |
37| A story film, any length | Film workflow below, `references/workflows/long-film.md` |
38| An explainer or infographic; a machine that comes apart to explain an idea, in any style | `references/workflows/explainer.md`, `references/workflows/machines.md` |
39| A launch or product video (their screenshots welcome) | `references/workflows/launch-video.md`; build it on `references/workflows/launch-video-kit.md`; its claims: `references/workflows/facts.md` |
40| Art for a site (hero by a headline, tiles, spots, share card) on its page colour and brand; or a web animation that reacts to the UI | `references/workflows/site-art.md`; `references/workflows/interactive.md` |
41| A drawing lesson, or "how do I draw this?" | `references/workflows/teach-drawing.md` |
42| A character kept identical in any style (woodcut to toy brick) | `references/workflows/character-consistency.md`, `references/anatomy.md` |
43| A style matched from their image | `references/workflows/adapt-a-style.md` |
44| A score or soundtrack | `references/music/README.md` |
45 
46- Music: pick a style vocabulary and mood, sketch the tension arc and motif, compose your own harmony, motif and form (references/music/compose.md, craft in references/music/theory/), revise until node tools/music.mjs craft shows only findings you chose, then check must PASS before a human listens. Styles give sound, never notes.
47- Sound effects: references/music/sound-design.md. 14 layered, seeded effects cued by film frame (filmSfx); the score ducks, and every cue must be within 6 dB of it. Effects only on real direction changes, one riser + one impact per film.
48- Launch films: `launchTemplate.ts` renders a product's launch from data (prompts, plates or its own UI, a score composed for it, words, install lines) in every shape from one timeline; `launch.mjs new|ship`. Habits that save tokens: `references/working-method.md`.
49 
50## The seven laws
51 
521. **Every piece has a point.** A still: one idea, one focal subject, one light. A film: one
53 transformation, one payoff, one token that returns. → `references/storytelling.md`
542. **State the realism.** Name the anatomy, the view and the reference you opened, for animals,
55 objects and people alike. → `references/realism-and-craft.md`, `references/anatomy.md`
563. **A style is a way of making marks.** Change the medium, the edge and the order of the marks,
57 beyond the palette. → `references/styles.md`
584. **Prove the look on ONE still, then build end to end.** After that, gates cost more than they
59 save. → `references/working-method.md`
605. **The contract is absolute.** Pure in `(frame, env)` (and the input log, for interactive
61 pieces), `rng(seed)` only, no clock, no `ctx.filter`. Nothing generated; images they bring may be
62 embedded by hash, and the sound pack is a separate, hash-pinned download. → `references/determinism-and-contract.md`
636. **Music gets a plan, never an adjective.** A style, a mood per section, the notes as data, then
64 measurements. You cannot hear it, so one human listens before it ships. → `references/music/`
657. **One directs, one builds, both write everything down.** When a session degrades, reset; the
66 files are the memory. → `references/working-method.md`
67 
68## Workflows
69 
70**Still.** (1) Say the idea in one sentence; name the focal subject and the light. (2) Open real
71reference for anything that exists, and note which. (3) Pick the style and read its plate's
72header first. (4) Draw in that medium's order. (5) Render with `still.mjs` at full size, run the
73**detail pass** on crops (faces, hands, feet, joins; `references/craft-bar.md`), critique in writing. ✋ **One approval.** (6) Deliver every
74size and shape asked for from the same source, and say `reproducible` was printed.
75 
76**Loop.** As a still, plus: every motion is periodic over the loop, the subject never stops,
77something moves every second. Check the seam (last frame against frame 0). ✋ **One approval,
78on the moving file.**
79 
80**Film.** (1) **The story in three sentences** (setup, transformation, payoff) and the token; for
81longer films, a spine plus one line per chapter. If you cannot write it, stop. (2) **The grid**:
82a beat is 60 x fps / bpm frames, the bpm from the brief's score; one cue table holds every frame number and a checker
83runs at load. (3) **Real reference** for anything that exists. (4) **ONE look still**, the hardest
84frame, critiqued in writing. ✋ **Approval.** (5) **ONE 8-second music sample.** ✋ **Approval.**
85(6) **Build the whole film**; mechanical checks run continuously. (7) **A fresh critic reviews, never you**
86(`references/workflows/review.md`): after the storyboard, each scene and the full render, a new subagent that saw none of the building returns ranked, timestamped problems and a verdict. Fix the biggest, a NEW critic rechecks; 3 rounds at most, logged in `ledger.md`.
87(8) ✋ **Final approval.** Say what you verified and what you cannot.
88 
89Three approval gates at most. Approval is a budget; spend it where being wrong is expensive.
90 
91## The craft bar
92 
93The test: would a proud human illustrator ship this, or is it mechanical shape-assembly? The
94full table of tells is `references/craft-bar.md`. The ones that sink most work: subjects built
95from ellipses, one style recoloured into another, things that fade in instead of being drawn,
96people with rubber joints, and a character drawn differently from shot to shot.
97 
98**No dead air** in anything that moves: something visibly changes every second. A film that
99draws itself declares `kind: "drawing"` and is judged on a finer floor; a freeze still fails.
100 
101## The engine
102 
103`engine/` is the portable art core plus the tooling. `engine/src/canvas-core` knows nothing
104about the DOM or any backend. `W`, `H`, `fps` and `durationFrames` come from the film's `meta`.
105Camera moves (pans, dollies, lens and dolly zooms, parallax, shake) and slow motion or freeze frames: `engine/src/canvas-core/camera.ts`, `engine/src/canvas-core/timeRemap.ts`, `references/camera.md`.
106Seams between scenes: `references/motion-grammar.md` (cuts that carry motion: `seams.ts`; `tools/deck.mjs deal` deals each film different moves; `deck.mjs find "<name>"` turns a move's everyday name into its card). `render.mjs --blur auto` renders with motion blur (subframes per frame
107from its measured on-screen speed, averaged in linear light, `--shutter 180`); the default path is untouched.
108 
109```bash
110node <skill>/engine/tools/scaffold.mjs ~/art --film intro --format 9x16 --duration 12 # seconds
111cd ~/art && npm install && npx playwright-core install chromium
112node tools/still.mjs intro --frame 0 --out out/look.png --scale 2 # a still, with its hash
113node tools/render.mjs intro # MP4; --out x.gif|x.webm|x.apng
114node tools/gate.mjs intro # determinism, contract, dead air
115node tools/emit.mjs intro --out out/intro.html # one self-contained offline player
116node <skill>/engine/tools/soundfetch.mjs list # no network. Nothing installed and not declined: ask the user now
117node <skill>/engine/tools/soundfetch.mjs get piano rooms # on their yes (piano 233 MB, all 373 MB). On no: soundfetch.mjs decline
118```
119 
120| Tool | What it does |
121|---|---|
122| `scaffold.mjs` | a project with a still and/or film; `--duration`, `--format` or `--size`, `--fps`, `--bpm` |
123| `still.mjs` / `render.mjs` | frames drawn twice with hashes (`--frames a,b,c --sheet` in one browser) / the piece in any format (`--from/--to`, `--poster-frame`, `--hashes`) |
124| `gate.mjs` | determinism, contract, dead air, artifact; `--self-test` proves it can fail |
125| `registry.mjs` / `gallery.mjs` | the style list from the plates themselves / the gallery sheet |
126| `docs-check.mjs` | fails when any doc's style count, length or path disagrees with the code |
127| `verify-export.mjs` | QA on the rendered file: frames, duration, score, A/V sync, true peak after the encode; opt-in first frame, loop seam, `--delivery` |
128| `launch.mjs` | a launch film: `new <name>` scaffolds the spec; `ship <name> --shapes 16x9,9x16` renders, posters, captions, verifies and framechecks each (`framecheck.mjs`: text whole, up long enough to read, clear of the 9:16 phone zones) and checks `facts.json` (`facts.mjs`) |
129| `test.mjs` (`npm test`) | unit suites in `engine/test/`, no browser |
130| `music.mjs` | `vocab` prints a style's vocabulary; `check` gates your composed score (key, master, guards, stems, novelty, which parts played recordings) and prints its shape (ARC); `render`, `meter` |
131| `soundfetch.mjs` | the sound pack: `list`, `get <id...\|all>`, `where`, `verify`, `remove <id>` |
132| `sfx.mjs` | the sound-effects kit: `list`, `one`, `kit <dir>`, `test` |
133 
134Four backends, one art core: `playwright`, `html-player`, `remotion`, `hyperframes`.
135→ `references/backends-and-adapters.md`
136 
137## Worked examples
138 
139- **The style plates** in `engine/src/canvas-core/`: every hand has a still and a film of it being
140 drawn, with the recipe in the header and `references/styles/<id>.md`.
141- **MECHANICAL LEPIDOPTERA** in `example/`: a 47 s scored film. `scaffold.mjs ~/study --example`.
142 
143**Study them. Do not copy them.** The craft bar is not satisfied by inheritance.
144 
145## Honest limits
146 
147You cannot hear the score, watch the film move, or use the interactive piece. Every claim about
148them comes from a measurement or from a human; say which. A green checkmark is a claim until you
149re-run it. Render one frame at `--scale 2` before trusting a still: a layer blitted through the
150wrong transform looks right at 1x and breaks at 2x.
151 

Discussion