artemnovitckii/claude-animation-skills / skills/stick-figure
stick-figure
VerifiedMakes a code-animated stick-figure explainer reel (9:16, 30 to 45 s) from a question or topic. A bright cartoon world with thick outlines, stick people with big white heads and faces, constant camera motion, whip transitions, 1 to 2 word captions, a playful underscore and cartoon sound effects, all generated in code and timed to the voiceover word by word. Use when the user runs /stick-figure or asks for a stick-figure, stickman or cartoon "what if" explainer.
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 5.0 KB |
| engine/make.shexecutable | script | 3.0 KB |
| engine/template/audio.py | script | 12.4 KB |
| engine/template/audio/vo_kokoro.wav | binary | 1.7 MB |
| engine/template/audio/words_ref.json | config | 6.3 KB |
| engine/template/captions.json | config | 22 B |
| engine/template/script.json | config | 682 B |
| engine/template/web/chars.js | script | 14.8 KB |
| engine/template/web/env.js | script | 18.7 KB |
| engine/template/web/fonts/Lora-Variable.ttf | binary | 207.2 KB |
| engine/template/web/fonts/OFL-lora.txt | markdown | 4.3 KB |
| engine/template/web/fonts/OFL-poppins.txt | markdown | 4.3 KB |
| engine/template/web/fonts/Poppins-Bold.ttf | binary | 152.3 KB |
| engine/template/web/index.html | other | 531 B |
| engine/template/web/lib.js | script | 6.0 KB |
| engine/template/web/main.js | script | 4.9 KB |
| engine/template/web/shots.js | script | 29.4 KB |
| engine/template/web/warp.js | script | 18 B |
| engine/template/web/words.js | script | 6.0 KB |
| engine/tools/align.py | script | 3.8 KB |
| engine/tools/render.js | script | 3.4 KB |
| engine/tools/tts_elevenlabs.py | script | 2.1 KB |
| engine/tools/tts_kokoro.py | script | 2.3 KB |
engine/tools/render.js
View on GitHub// run from a reel folder: node <engine>/tools/render.js stills 1.5,3.2 | segments 0,4,8 | video out.mp4
// (Playwright comes from kit/node_modules: make.sh sets NODE_PATH, or set it yourself)
const { chromium } = require('playwright');
const { spawn } = require('child_process');
const fs = require('fs');
(async () => {
const mode = process.argv[2];
const browser = await chromium.launch({ ...(process.env.CHROME ? { executablePath: process.env.CHROME } : {}), args: ['--allow-file-access-from-files'] });
const page = await browser.newPage({ viewport: { width: 1080, height: 1920 } });
page.on('console', m => console.log('[page]', m.text()));
page.on('pageerror', e => console.log('[err]', e.message));
await page.goto('file://' + process.cwd() + '/web/index.html');
await page.evaluate(async () => { await document.fonts.load('700 40px Poppins'); await document.fonts.load('700 40px Lora'); await document.fonts.load('600 40px Lora'); });
const total = await page.evaluate(() => window.TOTAL_FRAMES);
if (mode === 'stills') {
const times = process.argv[3].split(',').map(Number);
fs.mkdirSync('stills', { recursive: true });
for (const t of times) {
const d = await page.evaluate(f => { renderFrame(f); return grab(.9); }, Math.round(t * 30));
fs.writeFileSync(`stills/s_${t.toFixed(2)}.jpg`, Buffer.from(d.split(',')[1], 'base64'));
}
} else if (mode === 'segments') {
// node render.js segments i,j,k -> renders those shot indices to seg/shot_XX.mp4
const ids = process.argv[3].split(',').map(Number);
const shots = await page.evaluate(() => window.SHOT_SPANS || SHOTS.map(s => [s.start, s.end]));
fs.mkdirSync('seg', { recursive: true });
for (const id of ids) {
const f0 = Math.round(shots[id][0] * 30), f1 = id === shots.length - 1 ? total : Math.round(shots[id][1] * 30);
const tmp = `seg/shot_${String(id).padStart(2, '0')}.part.mp4`, fin = tmp.replace('.part', '');
const ff = spawn('ffmpeg', ['-y', '-v', 'error', '-f', 'image2pipe', '-framerate', '30', '-c:v', 'mjpeg', '-i', '-', '-c:v', 'libx264', '-preset', 'medium', '-crf', '17', '-pix_fmt', 'yuv420p', '-r', '30', tmp], { stdio: ['pipe', 'inherit', 'inherit'] });
for (let f = f0; f < f1; f++) {
const d = await page.evaluate(f => { renderFrame(f); return grab(.95); }, f);
if (!ff.stdin.write(Buffer.from(d.split(',')[1], 'base64'))) await new Promise(r => ff.stdin.once('drain', r));
}
ff.stdin.end(); const code = await new Promise(r => ff.on('close', r));
if (code === 0) fs.renameSync(tmp, fin); else console.log('ffmpeg failed', id);
console.log('done shot', id, f1 - f0, 'frames');
}
} else {
const outF = process.argv[3] || 'out_silent.mp4';
const ff = spawn('ffmpeg', ['-y', '-v', 'error', '-f', 'image2pipe', '-framerate', '30', '-c:v', 'mjpeg', '-i', '-', '-c:v', 'libx264', '-preset', 'medium', '-crf', '17', '-pix_fmt', 'yuv420p', outF], { stdio: ['pipe', 'inherit', 'inherit'] });
const t0 = Date.now();
for (let f = 0; f < total; f++) {
const d = await page.evaluate(f => { renderFrame(f); return grab(.95); }, f);
if (!ff.stdin.write(Buffer.from(d.split(',')[1], 'base64'))) await new Promise(r => ff.stdin.once('drain', r));
if (f % 100 === 0) console.log(`frame ${f}/${total} ${((Date.now() - t0) / 1000).toFixed(0)}s`);
}
ff.stdin.end(); await new Promise(r => ff.on('close', r));
}
await browser.close();
})();
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 323k | Updated | Claude CodeCodex | Verified | Install |