Imported from sammcj/agentic-coding (
Skills/demo-recorder/SKILL.md). Install upstream withnpx skills add sammcj/agentic-coding --skill demo-recorder. Copyright stays with the author.
Drives headless Chromium through a scripted walkthrough, encodes a silent 3K 60fps demo.mp4, then optionally voices the narration with Cloney and dubs it on. Below, $M means make -f <this-skill-dir>/Makefile; run it from the directory holding demos/; output goes to ~/Downloads/demo-recorder/<demo>/ unless OUT= says otherwise. $M help lists the targets; each script in scripts/ takes --help.
Workflow
- Create a task per step below, phrased with its completion criterion, then work them to completion.
- Write
demos/<demo>.mjsexportingoptions,setup(),run(h, ctx)andteardown(ctx), modelled onassets/examples/openspeccer.mjs; thehhelpers are inscripts/lib/recorder.mjs. - In
setup(), record against a throwaway copy of the target so on-camera edits leave the user's repo untouched. - Call
h.scene("<name>")at the start of each narrated section. - Write
demos/<demo>.md: one## N. Titlesection per scene in recording order, an_On screen: ..._note, then the spoken text at about 2.2 words per second of scene (example:assets/examples/openspeccer.md). - Run
$M record encode DEMO=demos/<demo>.mjs. Done when~/Downloads/demo-recorder/<demo>/timings.tsvlists every scene and you have viewed every image in~/Downloads/demo-recorder/<demo>/stills/. - Fix what the stills show (missed click, wrong tab, personal paths via
options.hide), then repeat step 6. - Ask which Cloney character and engine to use (offer
$M voices; defaults are inscripts/narrate.sh --help), unless the user records clips themselves asN.wavin~/Downloads/demo-recorder/<demo>/audio/. If acloneyskill is available, activate it first; otherwisecloney --helpcovers the CLI. - Run
$M narrate DEMO=demos/<demo>.mjs VOICE=<character> ENGINE=<engine>. Done when no row says FAILED or "runs past scene". Re-run for a take that said the wrong words (a fresh seed usually fixes it); trim the text of a clip that runs past its scene. - Run
$M dub DEMO=demos/<demo>.mjs. Done when its table has no(no clip)row; then report~/Downloads/demo-recorder/<demo>/demo-dubbed.mp4.
Gotchas
- Chromium needs its own sandbox and Cloney needs Metal; both fail inside the agent sandbox, so run
recordandnarrateunsandboxed. recordinstalls Playwright into the skill directory on first run; that needs network access.- Check clips with
ffprobeandffmpeg -af volumedetect; never play audio, leave listening to the user. - Breeze takes 35-75 s per clip.
narrate.shcaches renders and re-renders only sections whose text or voice changed, so edit and re-run freely. Delete~/Downloads/demo-recorder/<demo>/audio/.narrate/N.*to re-render one clip;FORCE=1re-renders all. - Pass
VOICE/ENGINEon everynarratefor a non-default voice; omitting them re-renders every clip in the default voice. narratetranscribes every take and rejects one that says the wrong words;TAKES=3keeps the shortest that passes.VERIFY=0skips the check.- Without Cloney,
narrateanddubskip with a message;$M demostill produces the silent cut. dub.shpairs clipN.wavwith the Nth scene intimings.tsv; keep section numbers in scene order.- The cursor is an injected overlay that only moves on mouse events;
h.moveToonto whatever the narration names, andh.waitbefore the nexth.sceneso the narration has room. - Keep spaces out of the
DEMOpath; make splits it and mangles the output folder name. ~/Downloads/demo-recorder/<demo>/frames/runs to about 800 MB per 90 s; offer to delete it once the cut is final.
