Anime cel skill

Anime cel — Sugar Rush (from the edenfunf/reelmimic README)

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

Make Japanese TV-anime style videos (MP4) with code — cel-shaded characters with tapered line art, big detailed eyes, hair clumps with a specular band, comedic anime reactions (sweat drop, anger vein, sparkle eyes, ≥< eyes, dot eyes, tears), painted skies with cumulus clouds, school/street/classroom/rooftop sets with time-of-day palettes, speed/focus lines, impact frames, dramatic zooms, smears, sakura petals and anime subtitles (CJK).

by edenfunf·MIT license·★ 3,630 Stars on the repo·GitHub ↗

Use now
Anime cel — Sugar Rush (from the edenfunf/reelmimic README)

Illustration · not a resultImages 1–4: From the edenfunf/reelmimic README — shows the whole collection, not only this skill.view on GitHub

Illustration · not a resultImage 5: From the edenfunf/reelmimic README — shows the whole collection, not only this skill.view on GitHub

Files of Anime cel

edenfunf/main1 file shown
SKILL.md
Show the full text77 lines
anime-cel/SKILL.md77 lines · 6.4 KB

anime-cel

Modern TV-anime look drawn entirely by code: characters with confident tapered line art (heavier on the shadow side), flat cel colour + one hard-edged shadow tone + a rim highlight, large layered eyes, hair built from pointed locks with an "angel ring" highlight; line-free painted backgrounds; anime staging effects. Every frame is a pure function of t.

Read GUIDE.md in full before building anything. Model sheets in docs/: faces-hina.jpg, faces-ren.jpg (19 expressions each), turns.jpg (front → 3/4 → profile), bodies.jpg, motion.jpg (stances, walk, run), hands.jpg, sets.jpg, fx.jpg, and demo-sheet.jpg (the demo film).

Workflow

  1. Scaffold bash .claude/skills/anime-cel/scripts/new_project.sh <project-dir> (--keep-demo keeps the example). It copies template/, unhooks the demo, runs npm install, checks node/ffmpeg/Chrome.
  2. Storyboard each shot with its reads (what the viewer must understand, in order, with times) and the anime staging you will use (establishing pan, cut on action, focus-line BG for the emotional beat, impact frame, reaction close-up…). Set duration in src/config.js.
  3. Build one file per shot in src/scenes/ (IIFE ending in shots([[t0, fn]]), add its <script> to studio.html). A shot paints the whole frame: setTOD() → SET.<set>(cam, t) (opens the camera) → characters → camEnd() → screen effects → transition. Captions go in window.overlayHook with subtitle().
  4. Look at it (from the project dir), open every image with Read:
    node render.mjs --sheet=0.5,1.5,2.5,3.5 --cols=4 --w=480 --out=out/check/a.jpg    # key frames
    node render.mjs --strip=3.8:4.5 --cols=6 --w=320 --out=out/check/s.jpg             # every frame of an action
    node render.mjs --stills=4.4 --out=out/check/st                                    # full-res PNG to judge faces
    node render.mjs --loop=faces_hina --sheet=0 --cols=1 --w=1920 --out=out/check/f.jpg  # model sheets (faces_ren, turns, bodies, motion, hands, sets, fx, close_hina, close_ren)
    
  5. Render node render.mjs --frames --workers=4 && node render.mjs --encode --out=out/video.mp4 [--audio=...].

API summary

hina(x, y, u, o) / ren(x, y, u, o) → { head, handL, handR, footL, footR, top, u }   // (x, y) ground point, u = head height px
bust(DESIGNS.ren, x, y, u, o)                       // close-up: (x, y) = head centre
o = { t, turn (-1..1: 0 front, ±.5 3/4, ±1 profile), headTurn, bodyTurn, face ('happy' …), look [x,y], blink, mouth, talk,
      armL/armR [shoulder°, elbow°, hand, wrist°, foreshorten], legL/legR [hip°, knee°], walk: phase, run: phase,
      lean°, bend°, tilt°, sq, dy, flip, sway [x,y], fx ['sweat','vein','steam','gloom','sparkles'], blush,
      prop { hand:'L'|'R', draw: PROPS.envelope, rot°, s, at }, armsOver, ground:false,
      stance:'contra'|'straight', weight:'L'|'R', contra }   // hands: open relax fist point peace spread hold grip pocket
faceAt(t, [[0,'neutral'],[1.2,'surprised']]) · autoBlink(t, seed) · talk(t) · follow(t, f) · walkPose/runPose · stroll
setTOD('day'|'morning'|'evening'|'night') · setLight(x, y) · SET.street / SET.classroom / SET.rooftop (cam, t, o)
focusLines · speedLines · impactFrame · flash · dramaticZoom · smear · smearLines · blurBand · sparkle(s) · petals
slashWipe · irisWipe · subtitle(c, txt, o) · onTwos(t) · kit: kf, seg, ease*, spring, jump, take, camBegin/camEnd
drawing primitives: ink (tapered line), tubePts, ribbonPts, crPts, cel, drawGroup, layer (cache), paintPoly

Rules that matter most

  1. Pure function of t — no Math.random(), no state between frames (rnd(key)/hash(); follow() for springs).
  2. Scenes never draw body parts. Characters are one call. New characters = a new entry in DESIGNS + HAIR (+ clothes branch) in cast.js, never ad-hoc drawing in a scene.
  3. Animate characters on twos (const ta = onTwos(lt) for poses/faces), keep camera moves smooth (lt).
  4. Anime timing: quick actions with a held pose after; anticipation → snap → overshoot (spring, take); faces change on a drawing via faceAt (it adds the blink + pop), never by crossfading.
  5. Staging: establish → react. Emotional peaks cut the BG to a flat gradient + focusLines; hits get an impactFrame (2–3 frames) + dramaticZoom; fast moves get smearLines.
  6. Sizes: full body u≈110–150, knees-up 180–260, bust 380–560. Keep faces ≥ u 150 when they carry a read.
  7. Transitions at every seam (slashWipe, irisWipe star, flash, impact cut, cut on action).
  8. Captions: only via overlayHook + subtitle() (white, dark outline, CJK font). Push new caption text into window.EXTRA_FONTS so the glyphs load before rendering.

Engine gotchas

  • SET.* leaves the camera open; draw characters in the same world coords and call camEnd() before screen effects. Screen-space effects (blurBand, impactFrame, slashWipe) use setTransform and ignore the camera.
  • Characters face screen-right with positive turn. With |turn| > .3 limb angles are "forward/back" in the facing direction; in front view they are "outward/inward". The near arm when facing right is armL.
  • Props in hands: use hand 'hold' (pinch, prop extends past the fingertips) or 'grip' (handle in the fist). rot rotates the prop about the grip point.
  • layer(key, …) caches static paintings per page; include the time-of-day name in the key if colours depend on it.
  • Speed: ~5–25 ms to draw a frame, ~100 ms/frame effective incl. JPEG with 4 workers (first frame ~0.6 s builds caches).
1---
2name: anime-cel
3description: Make Japanese TV-anime style videos (MP4) with code — cel-shaded characters with tapered line art, big detailed eyes, hair clumps with a specular band, comedic anime reactions (sweat drop, anger vein, sparkle eyes, ≥< eyes, dot eyes, tears), painted skies with cumulus clouds, school/street/classroom/rooftop sets with time-of-day palettes, speed/focus lines, impact frames, dramatic zooms, smears, sakura petals and anime subtitles (CJK). Canvas 2D rendered frame by frame in headless Chrome, encoded with ffmpeg. Use when a reference video or brief calls for anime / 動畫 / 日系動畫 / アニメ / cel-shaded / slice-of-life / school romance / shōnen-style reactions, or when the video-clone router picks the anime-cel style. 2D only; characters are original (Hina, Ren) or new ones built on the same rig.
4---
5 
6# anime-cel
7 
8Modern TV-anime look drawn entirely by code: characters with confident tapered line art (heavier on the shadow side),
9flat cel colour + one hard-edged shadow tone + a rim highlight, large layered eyes, hair built from pointed locks with
10an "angel ring" highlight; line-free painted backgrounds; anime staging effects. Every frame is a pure function of `t`.
11 
12Read **[GUIDE.md](GUIDE.md)** in full before building anything. Model sheets in `docs/`: `faces-hina.jpg`,
13`faces-ren.jpg` (19 expressions each), `turns.jpg` (front → 3/4 → profile), `bodies.jpg`, `motion.jpg` (stances, walk, run), `hands.jpg`, `sets.jpg`,
14`fx.jpg`, and `demo-sheet.jpg` (the demo film).
15 
16## Workflow
17 
181. **Scaffold** `bash .claude/skills/anime-cel/scripts/new_project.sh <project-dir>` (`--keep-demo` keeps the example).
19 It copies `template/`, unhooks the demo, runs `npm install`, checks node/ffmpeg/Chrome.
202. **Storyboard** each shot with its reads (what the viewer must understand, in order, with times) and the anime
21 staging you will use (establishing pan, cut on action, focus-line BG for the emotional beat, impact frame, reaction
22 close-up…). Set `duration` in `src/config.js`.
233. **Build one file per shot** in `src/scenes/` (IIFE ending in `shots([[t0, fn]])`, add its `<script>` to
24 `studio.html`). A shot paints the whole frame: `setTOD()` → `SET.<set>(cam, t)` (opens the camera) → characters →
25 `camEnd()` → screen effects → transition. Captions go in `window.overlayHook` with `subtitle()`.
264. **Look at it** (from the project dir), open every image with Read:
27 ```bash
28 node render.mjs --sheet=0.5,1.5,2.5,3.5 --cols=4 --w=480 --out=out/check/a.jpg # key frames
29 node render.mjs --strip=3.8:4.5 --cols=6 --w=320 --out=out/check/s.jpg # every frame of an action
30 node render.mjs --stills=4.4 --out=out/check/st # full-res PNG to judge faces
31 node render.mjs --loop=faces_hina --sheet=0 --cols=1 --w=1920 --out=out/check/f.jpg # model sheets (faces_ren, turns, bodies, motion, hands, sets, fx, close_hina, close_ren)
32 ```
335. **Render** `node render.mjs --frames --workers=4 && node render.mjs --encode --out=out/video.mp4 [--audio=...]`.
34 
35## API summary
36 
37```js
38hina(x, y, u, o) / ren(x, y, u, o) → { head, handL, handR, footL, footR, top, u } // (x, y) ground point, u = head height px
39bust(DESIGNS.ren, x, y, u, o) // close-up: (x, y) = head centre
40o = { t, turn (-1..1: 0 front, ±.5 3/4, ±1 profile), headTurn, bodyTurn, face ('happy' …), look [x,y], blink, mouth, talk,
41 armL/armR [shoulder°, elbow°, hand, wrist°, foreshorten], legL/legR [hip°, knee°], walk: phase, run: phase,
42 lean°, bend°, tilt°, sq, dy, flip, sway [x,y], fx ['sweat','vein','steam','gloom','sparkles'], blush,
43 prop { hand:'L'|'R', draw: PROPS.envelope, rot°, s, at }, armsOver, ground:false,
44 stance:'contra'|'straight', weight:'L'|'R', contra } // hands: open relax fist point peace spread hold grip pocket
45faceAt(t, [[0,'neutral'],[1.2,'surprised']]) · autoBlink(t, seed) · talk(t) · follow(t, f) · walkPose/runPose · stroll
46setTOD('day'|'morning'|'evening'|'night') · setLight(x, y) · SET.street / SET.classroom / SET.rooftop (cam, t, o)
47focusLines · speedLines · impactFrame · flash · dramaticZoom · smear · smearLines · blurBand · sparkle(s) · petals
48slashWipe · irisWipe · subtitle(c, txt, o) · onTwos(t) · kit: kf, seg, ease*, spring, jump, take, camBegin/camEnd
49drawing primitives: ink (tapered line), tubePts, ribbonPts, crPts, cel, drawGroup, layer (cache), paintPoly
50```
51 
52## Rules that matter most
53 
541. **Pure function of t** — no `Math.random()`, no state between frames (`rnd(key)`/`hash()`; `follow()` for springs).
552. **Scenes never draw body parts.** Characters are one call. New characters = a new entry in `DESIGNS` + `HAIR`
56 (+ clothes branch) in `cast.js`, never ad-hoc drawing in a scene.
573. **Animate characters on twos** (`const ta = onTwos(lt)` for poses/faces), keep camera moves smooth (`lt`).
584. **Anime timing**: quick actions with a held pose after; anticipation → snap → overshoot (`spring`, `take`); faces
59 change on a drawing via `faceAt` (it adds the blink + pop), never by crossfading.
605. **Staging**: establish → react. Emotional peaks cut the BG to a flat gradient + `focusLines`; hits get an
61 `impactFrame` (2–3 frames) + `dramaticZoom`; fast moves get `smearLines`.
626. **Sizes**: full body u≈110–150, knees-up 180–260, bust 380–560. Keep faces ≥ u 150 when they carry a read.
637. **Transitions at every seam** (`slashWipe`, `irisWipe` star, `flash`, impact cut, cut on action).
648. **Captions**: only via `overlayHook` + `subtitle()` (white, dark outline, CJK font). Push new caption text into
65 `window.EXTRA_FONTS` so the glyphs load before rendering.
66 
67## Engine gotchas
68 
69- `SET.*` leaves the camera **open**; draw characters in the same world coords and call `camEnd()` before screen
70 effects. Screen-space effects (`blurBand`, `impactFrame`, `slashWipe`) use `setTransform` and ignore the camera.
71- Characters face screen-right with positive `turn`. With `|turn| > .3` limb angles are "forward/back" in the facing
72 direction; in front view they are "outward/inward". The near arm when facing right is `armL`.
73- Props in hands: use hand `'hold'` (pinch, prop extends past the fingertips) or `'grip'` (handle in the fist).
74 `rot` rotates the prop about the grip point.
75- `layer(key, …)` caches static paintings per page; include the time-of-day name in the key if colours depend on it.
76- Speed: ~5–25 ms to draw a frame, ~100 ms/frame effective incl. JPEG with 4 workers (first frame ~0.6 s builds caches).
77 

Discussion

Alternatives

Lemo opuscarDirect and produce a short film made entirely in code, in one of the styles of the Lemo-Opuscar library (e.g. Impasto Oil Painting 油画厚涂, Watercolor Brush 水彩笔刷, Ukiyo-e 浮世绘, Satellite Briefing 卫星简报, Exploded Teardown 产品拆解, Microscope Story 显微叙事). Use when the user asks for a video, film, short, promo, explainer or animation (视频、短片、动画、宣传片) in a named style, including data, science and product explainers built from real material such as satellite imagery, laser scans, CAD files or archive scans (数据解说、科普、产品拆解); when they want a film made about their own topic and haven't chosen a style (help them choose); or when they ask which film styles there are. Not for editing or converting existing video files.Creator · MITXiaohei illustrationsGenerate Ian-style Xiaohei illustrations for articles, posts, blogs, Notion documents, workflows, methods, processes, structures, states, metaphors, and opinions. Use when the user asks for weird, hand-drawn, Xiaohei, article, editorial, body illustrations, illustration ideas, shot lists, title removal, image edits, or image regeneration. By default, all image text and annotations are English, even when the source article is Chinese; only use another language when the user explicitly asks.Creator · MITScenario game assetsUse when creating game art through Scenario MCP: sprites, sprite sheets, icons, props, loot, tilesets and autotile terrain transitions, seamless tiles, isometric buildings, top-down maps, pixel art, UI buttons and panels, parallax background layers or depth planes for side-scrollers, and character or concept art; or when assets need transparent backgrounds, background removal, style-consistent variation batches, upscaling, pixel-grid cleanup, or PNG export for Unity, Godot, or Unreal.Creator · MITAI-Toolkit LoRA Trainer (WAN 2.2 & Z-Image)Train custom LoRAs with ostris AI-Toolkit. Covers WAN 2.2/2.1 (people, styles, video motion) and Z-Image (Turbo & Base, low-VRAM image LoRAs). Use when the user wants to train a WAN or Z-Image LoRA; covers local + RunPod setup, dataset prep, key params, and using the result in a ComfyUI workflow.Creator · MIT