Communitygithub.com

peichh/toon-forge

Story-first, code-only 2D and 3D animation (Remotion + React/SVG + Three.js + FFmpeg; no AI image or video generators, no Blender). Takes an idea to a finished animated film through premise and plot, story structure and beat sheet, a distinctive original cast with a character sheet and line-up test, a storyboard with shot design and a picture board, then frame-driven animation with Thai subtitles, synthesized sound effects and music. Covers realistic-proportion people in thin ink and watercolour, many finishes (watercolour, gouache, pencil, crayon, paper cut-out, manga, comic, vintage), a style measured from reference images, anime characters in six genre styles with whole bodies from every side, flat and slim 2D cartoon people, stickman and vector figures, hand-drawn ink and wash, 2.5D parallax, cel-shaded 3D toon characters and sets, characters from a reference image, atmosphere, diagrams and physics. Use for การ์ตูน, แอนิเมชัน 2D/3D, อนิเมะ, สีน้ำ, สไตล์จากเรฟ, ออกแบบตัวละคร, พลอต,

What is toon-forge?

toon-forge is a Claude Code agent skill that story-first, code-only 2D and 3D animation (Remotion + React/SVG + Three.js + FFmpeg; no AI image or video generators, no Blender). Takes an idea to a finished animated film through premise and plot, story structure and beat sheet, a distinctive original cast with a character sheet and line-up test, a storyboard with shot design and a picture board, then frame-driven animation with Thai subtitles, synthesized sound effects and music. Covers realistic-proportion people in thin ink and watercolour, many finishes (watercolour, gouache, pencil, crayon, paper cut-out, manga, comic, vintage), a style measured from reference images, anime characters in six genre styles with whole bodies from every side, flat and slim 2D cartoon people, stickman and vector figures, hand-drawn ink and wash, 2.5D parallax, cel-shaded 3D toon characters and sets, characters from a reference image, atmosphere, diagrams and physics. Use for การ์ตูน, แอนิเมชัน 2D/3D, อนิเมะ, สีน้ำ, สไตล์จากเรฟ, ออกแบบตัวละคร, พลอต,.

Works with~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/peichh/toon-forge/tree/HEAD/skills/toon-forge

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation


name: toon-forge description: Story-first, code-only 2D and 3D animation (Remotion + React/SVG + Three.js + FFmpeg; no AI image or video generators, no Blender). Takes an idea to a finished animated film through premise and plot, story structure and beat sheet, a distinctive original cast with a character sheet and line-up test, a storyboard with shot design and a picture board, then frame-driven animation with Thai subtitles, synthesized sound effects and music. Covers realistic-proportion people in thin ink and watercolour, many finishes (watercolour, gouache, pencil, crayon, paper cut-out, manga, comic, vintage), a style measured from reference images, anime characters in six genre styles with whole bodies from every side, flat and slim 2D cartoon people, stickman and vector figures, hand-drawn ink and wash, 2.5D parallax, cel-shaded 3D toon characters and sets, characters from a reference image, atmosphere, diagrams and physics. Use for การ์ตูน, แอนิเมชัน 2D/3D, อนิเมะ, สีน้ำ, สไตล์จากเรฟ, ออกแบบตัวละคร, พลอต, วางโครงเรื่อง, สตอรี่บอร์ด, animated short, skit, explainer with characters. Self-contained: installs its own dependencies and needs no other skill.

Toon Forge

Use when the request is to make an animated story or any part of one: a plot, a story outline, a cast, a character design, a storyboard, or the finished 2D/3D animation. Everything is drawn and moved by code. Never use AI image or video generators or text/image-to-video services, and never require Blender. Never copy an existing character, mascot or a living artist's signature style.

TF below is this skill's folder (the one holding this file).

0. Set up (once per machine)

bash $TF/scripts/setup.sh      # checks node>=20, ffmpeg, python3; installs Remotion + headless browser + Prompt font into ~/.toon-forge

Nothing else is needed. 3D packages install on the first init that asks for them.

1. The pipeline

Work through the stages in order. Each has a gate: do not start the next stage until the gate passes. Stop early when the user asked only for a plot, a cast or a storyboard, and deliver that stage's output.

#stagereadoutputgate
1Premise and plotreferences/story.md §1–3logline + story blocklogline has want, obstacle, turn
2Structurereferences/story.md §4–9beat sheet → script.json scenes with beatforge.py check script.json has no WARN
3Castreferences/character-identity.mdcharacter sheet per characterline-up still passes all six checks
4Storyboardreferences/storyboard.mdstoryboard.json (+ timeline.json)forge.py check clean; you looked at forge.py board
5Animate§3–5 below + the kit's referencescenes in codedraft render watched; every scene moves
6Sound, render, QA§6–7MP4 + subtitles + coverforge.py qa clean

Ask the user only what changes the film and cannot be guessed: the idea (if none was given), length and format (default 30–45 s, 1080×1920, 30 fps), tone, and whether they want to approve the plot, cast sheet or board before animation. If they do not say, show the beat sheet and the cast sheet briefly and keep going.

Defaults: bright, light palettes; Thai text in subtitles and signs; no voice-over; original characters with a short visible neck and natural clothes.

2. Start a project

python3 $TF/scripts/forge.py route "<the brief>"                 # which kits the brief needs
python3 $TF/scripts/forge.py init ~/videos/<slug> --caps flat    # or: --example life-time to start from a finished film

init copies the starter (src/lib/*, Root.tsx, CastSheet, Cover), the kits for the caps, the Prompt font and a synthesized SFX set into the project. Register each film as a <Composition> in src/Root.tsx.

capforcodereference
flatbig-head 2D cartoon people, outfits, 10 expressions, 5 turns, street sets and propslib/flat, lib/slim, lib/cityflat-story.md, character-design.md
character-2dstickman and vector figures, gaits, pose presets, blink, talklib/characters, lib/posecharacter-design.md §7, §11–12
handmadehand-drawn ink, dry brush, paper, washes, turning head, motif, cuts on barslib/ink, lib/head, lib/motif, lib/meterhandmade.md
parallax2.5D layered worlds and cameralib/parallaxstoryboard.md §3
tooncel-shaded 3D characters with ink outlines, sets, Thai signs, orbit cameralib/toon, lib/threetoon-story.md, toon-characters.md
3dThree.js stage, camera rig, lights, environmentslib/threeheader of lib/three.tsx
refcharan original character drawn from a reference imagelib/refchar, scripts/charref.pycharacter-from-reference.md
lookwatercolour, thin ink + wash, gouache, pencil, crayon, cut-out, manga, comic, vintage; a style measured from a reference imagelib/look, scripts/styleref.pylooks.md
animeanime characters (six genre presets, whole body, every side), speed lines, impact frames, skies, petalslib/animeanime.md
cutoutpuppets cut from generated or drawn parts sheets (front, side, back, faces, hands) on a generated background: style check against the reference, cut, rig, every FlatPose, turns, talklib/cutout, scripts/cutout.pycutout.md
atmospherefog, particles, god rays, glow, vignette, gradelib/atmosphereheader of the file
diagramanimated diagrams inside a storylib/diagramheader of the file
thai-typeThai kinetic text and titleslib/typographyheader of the file

Always there: lib/story (subtitles, mouth flaps, SFX and music from the timeline), lib/physics, lib/noise, lib/layout, lib/SafeGuides, transitions.tsx. Choose 2D first; use 3D when the story needs camera moves through space, real light or turning bodies. Do not mix 2D and 3D characters in one film.

Examples (forge.py init <project> --example <name>): life-time (flat 2D story, 16:9), zombie-id (3D toon episode, 9:16), paper-plane (hand-drawn, cut to music), zombie-biology (stickman explainer), ref-character (reference-image character), apocalypse-observer (3D atmosphere), cutout-lab (a character cut from generated parts sheets, three views, in a generated park), style-lab (every look on one scene, the ink + watercolour cast sheet, anime turnarounds, poses and shots). Read the closest one before writing a new film. Examples with music get a synthesized stand-in track at init; replace it with find-music.py (section 6).

3. Story and timeline files

script.json is the single source for a story with lines. Schema: references/toon-story.md §2; add the story block and a beat per scene (references/story.md).

cd ~/videos/<slug>                                                        # paths below are relative to the project
python3 $TF/scripts/forge.py check src/<slug>/script.json                # story shape before anything is built
python3 $TF/scripts/story.py build ~/videos/<slug> src/<slug>/script.json # → timeline.json, storyboard.json, <Comp>.vtt
python3 $TF/scripts/forge.py check src/<slug>/storyboard.json             # scene table, lengths, motion, motif, beats
python3 $TF/scripts/forge.py board ~/videos/<slug> src/<slug>/storyboard.json   # out/<Comp>.board.jpg: one still per scene

A film without dialogue (music-driven, handmade) can skip script.json and write storyboard.json directly (references/storyboard.md §1).

4. Characters

  1. Fill the character sheet (references/character-identity.md §4) from the story, not from a look.
  2. Build each one from the closest base: FLAT_LOOKS / SLIM_LOOKS (2D), LOOKS in lib/toon (3D), a refchar spec, or new drawing code when no base fits (character-design.md, toon-characters.md §4).
  3. Render the line-up and look at it: npx remotion still src/index.ts CastSheet out/cast.png --props='{"cast":{...}}' (2D), story.py cast and the turnaround (3D). Fix until silhouette, grayscale, thumbnail, turns, pose and scale checks pass.
  4. Keep one look object per character in one file; every scene imports it.

From a picture the user sent: references/character-from-reference.md first (rights, then the trace-compare loop).

Choose the look with the cast, not after: realistic-proportion people in thin ink and watercolour, anime of a given genre, pencil, cut-out and the rest are in references/looks.md and references/anime.md. When the user sends pictures for the style, measure them with scripts/styleref.py (looks.md §3). Show LookSheet or a cast sheet in two or three candidate looks when the user has not chosen one.

5. Animation rules

  • Every value comes from useCurrentFrame() with interpolate / spring. No CSS animations or transitions, no Math.random() or Date.now(); use random(seed) from Remotion or lib/noise.
  • Every scene has real movement in every second: a body action, a camera move, or a living hold (blink, breathe). Still pictures with fades are a slideshow, not animation.
  • Pose-to-pose with anticipation, overshoot and settle; arcs, not straight lines; hold after a punchline. Details: storyboard.md §7–8, character-design.md §7 and §11.
  • Feet plant on the ground (flatPlant, strideLength); falling and bouncing use lib/physics.
  • Thai text: split with Intl.Segmenter (lib/typography), line height ≥ 1.3, never letter-spaced, kept inside the safe zones (lib/SafeGuides).
  • 3D on a machine without a GPU renders with --gl=swangle (forge.py adds it for 3d / toon scenes).

6. Sound

init writes these to public/audio/sfx/ (all synthesized with FFmpeg, nothing to license): pop whoosh swoosh slide hit thud stomp step stamp click tick spin ding bell sparkle boing uhoh heartbeat gravel paper fold flutter knock pencil brush pluck riser. Need another? Add a line to scripts/synth-sfx.sh or synthesize it in the project.

  • Put SFX on actions in script.json (sfx per scene or per line); lib/story plays them.
  • Music: python3 $TF/scripts/find-music.py <mood words> lists royalty-free tracks not used before; --get <id> --title "..." --out public/audio/bgm.mp3 downloads one and writes the credit to public/audio/CREDITS.md. Offline: synth-sfx.sh <dir> <bpm> <bars> writes a simple bed.wav.
  • Cutting to the music: scripts/beat-grid.py song.mp3 --fps 30, then bpm + bars in the storyboard.
  • Music sits under the action (volume 0.15–0.25). No voice-over unless the user supplies a recording.

7. Render and check

python3 $TF/scripts/forge.py render ~/videos/<slug> src/<slug>/storyboard.json --draft   # half size, to watch rhythm
python3 $TF/scripts/forge.py render ~/videos/<slug> src/<slug>/storyboard.json           # scenes cached; only changed ones re-render
python3 $TF/scripts/forge.py qa out/<Comp>.mp4 --storyboard src/<slug>/storyboard.json   # frame count, loudness, motion per scene
python3 $TF/scripts/forge.py cover out/<Comp>.mp4 --project ~/videos/<slug> --title "ชื่อเรื่อง"

Before sending: watch the contact sheet from qa, read every subtitle for Thai typos and broken glyphs, check the cast is on model in every scene, and that no scene is frozen. Deliver the MP4, the .vtt, the cover, the board and the music credit. --formats 9:16,1:1,16:9 renders other shapes from the same storyboard (lib/layout). Hand-off to an editor: references/openfilm.md.

8. What the user taught you

python3 $TF/scripts/learn.py show prints rules and saved techniques from earlier films on this machine (kept in ~/.toon-forge/notebook); forge.py route and init print them too. Follow them. When the user corrects a look or a habit, learn.py note "<rule>"; when they like a character or technique, learn.py save <name> <files>, and story.py cast save for 3D characters.

Related Skills