Communitygithub.com

husniadil/dalang

Dalang — turn any topic into a finished animated video (narration, free local AI voice, music, sound effects, HyperFrames visuals): script → voice → per-word timing → visuals, each stage gated by the agent itself. Any topic, language and platform (Shorts, Reels, TikTok, YouTube, Instagram), stylized and true to the real thing. Use whenever the user asks for a video, animation, explainer or short from a topic, idea, article or notes ("make a video about X", "bikinin video tentang Z"), or to borro

What is dalang?

dalang is a Claude Code agent skill that dalang — turn any topic into a finished animated video (narration, free local AI voice, music, sound effects, HyperFrames visuals): script → voice → per-word timing → visuals, each stage gated by the agent itself. Any topic, language and platform (Shorts, Reels, TikTok, YouTube, Instagram), stylized and true to the real thing. Use whenever the user asks for a video, animation, explainer or short from a topic, idea, article or notes ("make a video about X", "bikinin video tentang Z"), or to borro.

Works with✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/husniadil/sandalkuilang-dalang/tree/HEAD

Ask in your favorite AI

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

Documentation


name: dalang description: Dalang — turn any topic into a finished animated video (narration, free local AI voice, music, sound effects, HyperFrames visuals): script → voice → per-word timing → visuals, each stage gated by the agent itself. Any topic, language and platform (Shorts, Reels, TikTok, YouTube, Instagram), stylized and true to the real thing. Use whenever the user asks for a video, animation, explainer or short from a topic, idea, article or notes ("make a video about X", "bikinin video tentang Z"), or to borrow a reference video's style ethically. Not for cutting or subtitling existing footage.

Dalang — from topic to video

Mode and look, asked in the Brief, locked after it (references/looks.md). Mode: Express (default; 2.5D in Canvas 2D, references/express.md) or Studio (precision: three.js, a code-first hero, reference boards, benchmark, review). Look: the isometric family (isometric-world main, cutaway, blueprint) or object-studio (a study model on a pale sweep). A 3D look never moves a film to Studio. A look change after Step 6 starts: stop every builder, rewrite SPEC.md, restart every group in one message; narration and voice stay.

Principles

7 is Studio's; the rest hold in both modes.

  1. Visual thesis first (references/looks.md): the look's numbered rules decide every frame and QC. object-studio: pale studio, one accent, whole hero 60–70 %, one-input machine, live instruments, held shots.
  2. Words first, pictures last: script approved → voice → every word timed → visuals.
  3. Every change on screen lands on a word, from the timing data.
  4. The subject acts in every shot; a camera over a still is a slideshow.
  5. Measure, don't guess: every reported number comes from a log or a script.
  6. Every question up front, no user gate. All questions in Step 1; nothing later waits for the user. Pass each of the 4 gates yourself once its checks pass, say so in one line, run to the finished film. A later change is a new round. No final-quality render before the last (Gate 3's style frames and hook sample excepted).
  7. Stylized, true to reality. One look per film; no footage, photoreal render, generated image or clip. Parts, proportions, scale and behaviour match a real reference (references/visual-direction.md §1).
  8. Top studio, never overdone: style frames, polish, review rubric. Drafts at 10 fps; the final --quality high --fps <brief fps> passes every check.
  9. Free by default. Paid or metered services (ElevenLabs, HeyGen) only when the user asks, labelled "paid". Prefer commercial-OK licences; say when one is not.

General purpose. Any topic, language, platform. Never open another video/<slug>/ folder; nothing carries over except a series kit the user picks (references/brief.md "Series kit"). engine/three/ is a toolbox, not a limit: a subject it lacks is modelled from its own law or shown in a look without 3D.

Language. Chat in the user's language. Every AskUserQuestion is in English. Never infer a language from a name.

Work fast, spend few tokens

  • One video = one session; state lives in the files. Resume: node <skill-dir>/scripts/state.mjs next, BRIEF.md, the end of PRODUCTION.md.

  • Subagent types, when listed: builders (fix rounds, script, voice) dalang-builder, every verdict dalang-checker, facts dalang-research; else general-purpose.

  • Skill version: say next's DALANG v… first; never git.

  • Read lazily: each step, only what state.mjs next --print prints, whole, in one call (Step 0 prints Step 1 too; a first approve <n> prints the next step: no next turn, no --step ahead); "Look up when needed" only when sent there. Never read a reference, engine README or lessons.md whole, or a section twice; of /hyperframes, only the needed guides.

  • Small output: filter --json; never print words.json, *.response.json or full logs; background output by bytes (tail -c 1500). Scene changes are Edit calls, never sed -i or a whole-file Write.

  • Scene code stays in builder subagents. The main agent never writes or reads src/ or assets/*.js (generated data aside; style frames go to a builder). Pilot, each group, assembly and each fix round go to a new builder (last report + paths, its budget in look-build.md / express.md). The reviewer is never a builder.

  • Images stay in subagents. The main agent never Reads a still, strip, sheet, scope or style frame: a subagent gets the paths and next's "For the subagent" command, returns a text verdict. Exception: the author of style-frames/src/ opens each review/refs-board-<frame>.jpg once before its first write.

  • Model per job, never asked: state.mjs next prints each step's subagent jobs with model and effort (state.mjs models: all, and what top/mid/light mean). Escalate, never repeat. A failed job (red, unusable, a P0 left) goes to a new agent one notch up: effort (low → medium → high), then model (light → mid → top); top · high caps it: a P0 left is classified (hero-asset.md §3). Never down or twice; a clean job is never rerun. ≤ 3 copy or timing fixes: one notch down. Log each setting.

  • The main agent orchestrates, never does the work. Your turn re-reads the session (~10× a subagent's); a loop (write ↔ lint, take ↔ retake, fix ↔ check) runs inside one job (Steps 3–4 too); each reply wakes you: a job runs to its verdict; N jobs started together end that message with wait.mjs . --expect N (timeout: 600000): one turn, one line. A runner (express.mjs / studio.mjs <step>) is one foreground call (timeout: 600000) when it ends within ~9 min, never a chain or a poll. An Agent prompt is the job and paths (≤ 15 lines; it reads via next --step <n> --sub). Checkers write their verdict file, builders review/reports/<job>.md; both reply briefly, never retyped. state.mjs log rides on the step's command with &&, never its own turn.

  • Compact: workspace.mjs init sets auto-compact (200K); at Gates 2–4 say once that /compact is safe.

  • Parallel by default. Independent jobs start in one message, each agent on its own files. Heavy jobs (VoxCPM, render, check, snapshot) run alone, never beside a model job; queue with while kill -0 <pid>. Together: preflight ‖ the topic question; reference ‖ the research job; after Gate 1 the voice job ‖ assets, never scenes; at Gate 2 planner and music; Step 6 Studio: pilot, then all groups; Express: every group at once, no pilot (a clean take passes Gates 1–2 itself via express.mjs after-voice; the planner runs express.mjs scaffold .); Step 7 the draft checks, then reviewer ‖ quiz ‖ Set / Reality check; Step 8 POST.md while rendering.

  • Cheap before expensive: --sample before a take; --from-response when only {} moves; snapshots while iterating; fixes batched per round; QC at --fps 10 --quality draft; one final render.

  • The user's ask wins: flag a rule that defeats it in one line; never pass it on silently.

  • Short messages: what changed, what to decide, links; at a wait, the next gate's clock time; a step over ~2 min gets an estimate.

Project files (video/<topic-slug>/)

Log with state.mjs log "<step> | <output> | <problems or ->". The folder is the HyperFrames project; run commands from it. Edit only *.tpl.html; node <skill-dir>/scripts/fill_times.mjs src/index.tpl.html index.html regenerates index.html (never by hand, no second root .html).

Steps

StepDoEnds withRead (references/)
0 Setuppreflight.mjs, fix what it reports, project folderPRODUCTION.mdbrief.md §0
1 Brieftopic first, every question nowBRIEF.mdbrief.md §1
2 Reference (optional)measure craft, never copyreference-measurements.mdmeasure-reference.md
3 Scriptresearch, writer, read-through jobs; approve 1 runs the lintsGate 1script-voice.md §3
4 Voiceone voice job; after-voice pads, Gates 1–2Gate 2script-voice.md §4
5 LookSPEC.md, hero, storyboard, assets, style frames, benchmarkGate 3look-build.md §5
6 Buildbuilders, times from BEATS/WORDS, audio mixindex.html, lints cleanlook-build.md §6
7 QCdraft, checks, strips, reviewer, quiz, fix roundsGate 4qc.md §7
8 Finalassets check, high render, re-checkfinal.mp4, POST.md, reportqc.md §8

At every step: gates go through state.mjs approve <n> --by agent (in order; it runs the gate's checks and refuses with their errors; a gated file edited later is STALE until re-approved); BRIEF.md rules format and language; a recorded or cloned voice only with the speaker's permission; pages only in Claude's built-in browser, never the user's Chrome; log every step and problem in PRODUCTION.md; series feedback via series.mjs note, never memory.

Autonomous mode

If the user gives a topic and leaves, use what they said, else: Express; YouTube 16:9, 60–90 s (Shorts 9:16 for short or ≤ 60 s); their language; object-studio (Studio: isometric-world); "modern balanced"; general audience; VoiceStudio, default voice, per brief.md Step 0 (not ready by Step 4: stop and say so). Write "defaults used" first in PRODUCTION.md, log each decision, finish the film. Ship rules: references/qc.md "User away" (an audio_qc.mjs exit 2 that stays is named in the hand-off, never a pass). Skip install offers (log them). Never edit the installed skill.

When something goes wrong

grep -n -i '<word>' <skill-dir>/references/lessons.md.

Related Skills