Skip to content

iart-ai/generative-illustration-skills / skills/generative-illustration

generative-illustration

Verified

This skill should be used when the user asks to "make an animated illustration", "animate an illustration", "make a generative motion piece" / "动态平面", "turn AI-generated art into something that moves", "make a poetic or ambient motion piece / motion poem", "make a visual metaphor", or "combine AI-generated visuals with code-driven motion". Covers generating isolated illustration assets with AI, compositing them as sprites, frame-accurate deterministic rendering, and the craft of expressive, concept-driven motion. NOT for data charts (use chart-animation), pure text (use kinetic-typography), or 3D/particles (use webgl-animation).

FileKindSize
SKILL.mdskill md9.3 KB
references/asset-pipeline.mdmarkdown3.2 KB
references/craft.mdmarkdown2.6 KB
references/render-harness.mdmarkdown3.3 KB

references/render-harness.md

View on GitHub
# Render harness — deterministic frames + music

> Every value is a pure function of time `t`. Playwright screenshots each frame; ffmpeg assembles. No `requestAnimationFrame`, no CSS transitions (they desync from the grabber).

## Toolchain (local, no API key)
- Node + **`playwright-core`** (auto-fetches Chromium; or `npx playwright install chromium`)
- **`ffmpeg`**

## The HTML contract

```html
<canvas id="c" width="1080" height="1350"></canvas>
<script>
const ctx = document.getElementById('c').getContext('2d');
function render(t){ /* draw EVERYTHING as a pure function of t */ }
window.__T = 12.5;                              // total seconds
window.__seek = (t) => render(+t||0);           // grabber calls this per frame
window.__ready = () => true;                    // or: () => imagesLoaded>=N
window.__seek(new URLSearchParams(location.search).get('t') || 0);  // ?t= renders one frame
</script>
```

- Stage an exact pixel size (e.g. 1080×1350 vertical for RED, 1080×1080 square for X).
- Stateful sims (particles): step forward deterministically with a **seeded RNG** (e.g. mulberry32) so every render is identical.
- Use a seeded grain overlay for the soft/“Softcore” texture.

## Capture (one browser, frame by frame)

```js
// capture.cjs  — NODE_PATH must point at playwright-core
const path=require('path'); const {chromium}=require('playwright-core');
(async()=>{
  const fs=require('fs'); fs.rmSync('frames',{recursive:true,force:true}); fs.mkdirSync('frames');
  const b=await chromium.launch();
  const p=await b.newPage({viewport:{width:1080,height:1350},deviceScaleFactor:1});
  await p.goto('file://'+path.resolve('anim.html')+'?t=0');
  await p.waitForFunction(()=>window.__ready&&window.__ready(),{timeout:9000}).catch(()=>0);
  const T=await p.evaluate(()=>window.__T); const FPS=30; const tot=Math.ceil(T*FPS);
  for(let f=0;f<tot;f++){ await p.evaluate(t=>window.__seek(t), f/FPS);
    await p.screenshot({path:'frames/f'+String(f).padStart(4,'0')+'.png'}); }
  await b.close();
})();
```

```bash
# even dimensions + yuv420p (odd sizes fail libx264)
ffmpeg -y -framerate 30 -i frames/f%04d.png -c:v libx264 -pix_fmt yuv420p -crf 18 -movflags +faststart out.mp4
```

**QC:** sample a contact sheet across the WHOLE duration (not just the first seconds), and read it yourself — blank frames? overlaps? does the concept read? Fix and re-render.

## Music (Lyria 3 via OpenRouter)

AI-generated → royalty-free. **Audio output requires `stream: true`**; chunks arrive base64 in `delta.audio.data`:

```bash
curl -s -N https://openrouter.ai/api/v1/chat/completions \
 -H "Authorization: Bearer $OPENROUTER_API_KEY" -H "Content-Type: application/json" \
 -d '{"model":"google/lyria-3-clip-preview","messages":[{"role":"user","content":"soft slow emotional solo piano, warm, gentle forward motion"}],"modalities":["audio"],"stream":true}' \
 | python3 -c "import sys,json,base64;b=''.join(json.loads(l[5:]).get('choices',[{}])[0].get('delta',{}).get('audio',{}).get('data','') for l in sys.stdin if l.startswith('data:') and 'DONE' not in l);open('bgm.mp3','wb').write(base64.b64decode(b))"
```

Mix under the video (trim to length, fade in/out, duck volume):

```bash
ffmpeg -y -i out.mp4 -i bgm.mp3 \
 -filter_complex "[1:a]atrim=0:12.5,afade=t=in:st=0:d=1.2,afade=t=out:st=11:d=1.5,volume=0.55[a]" \
 -map 0:v -map "[a]" -c:v copy -c:a aac -shortest out_music.mp4
```
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall