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/tts_kokoro.py
View on GitHub# Free voiceover with Kokoro, run from a reel/project folder: reads script.json (a list of sentences), writes audio/vo_kokoro.wav.
# tts_kokoro.py [voice] [speed] defaults: am_michael 1.12 (other voices: af_heart, am_adam, bf_emma, bm_george ...)
import json, sys, os, shutil, tempfile, numpy as np, soundfile as sf
ROOT = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
KIT = os.path.realpath(os.path.join(ROOT, "..", "..", "..", "kit")) # the voice models live in kit/models
from kokoro_onnx import Kokoro, EspeakConfig
import espeakng_loader
# espeak-ng fails on a long data path (deep install folders), so use a copy at a short path when needed
data = espeakng_loader.get_data_path()
if len(data) > 100:
short = os.path.join(tempfile.gettempdir(), "kokoro-espeak-ng-data")
if not os.path.exists(os.path.join(short, "phontab")):
shutil.rmtree(short, ignore_errors=True); shutil.copytree(data, short)
data = short
espeak = EspeakConfig(lib_path=espeakng_loader.get_library_path(), data_path=data)
voice = sys.argv[1] if len(sys.argv) > 1 else "am_michael"
speed = float(sys.argv[2]) if len(sys.argv) > 2 else 1.12
k = Kokoro(os.path.join(KIT, "models/kokoro-v1.0.onnx"), os.path.join(KIT, "models/voices-v1.0.bin"), espeak_config=espeak)
os.makedirs("audio", exist_ok=True)
lines = json.load(open("script.json"))
GAP = 0.12 # seconds of air between lines (playbook: near-gapless VO)
out, t, meta = [], 0.0, []
for i, line in enumerate(lines):
samples, sr = k.create(line, voice=voice, speed=speed, lang="en-us")
# trim leading/trailing silence
a = np.abs(samples); thr = 0.01
idx = np.where(a > thr)[0]
samples = samples[max(0, idx[0] - int(0.02 * sr)): idx[-1] + int(0.05 * sr)]
sf.write(f"audio/line_{i:02d}.wav", samples, sr)
meta.append({"i": i, "text": line, "start": round(t, 3), "dur": round(len(samples) / sr, 3)})
out.append(samples)
gap = GAP + (0.12 if i == 0 or line.rstrip().endswith(('?', '!')) else 0) # a beat after the hook and after questions
out.append(np.zeros(int(gap * sr), dtype=samples.dtype))
t += len(samples) / sr + gap
vo = np.concatenate(out)
sf.write("audio/vo_kokoro.wav", vo, sr)
json.dump(meta, open("audio/lines.json", "w"), indent=1)
print(f"{voice} total {len(vo)/sr:.2f}s")
for m in meta: print(m)
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 |