AI Workflow series · chapter 05 · tools

TurtleWolfe · tools · updated 2026-10-26

Demo video

A pull request that shows its work. You write a shot list, run one command, and get a short narrated video of the change working on a real screen.

Every point has two layers: the plain line, then the detail under it. Open one section at a time. The commands are the ones a Claude Code lane runs.

This is the finished product, made from a shot list for a real ScriptHammer pull request. It is under a minute: the shot list and the one command, then the change working on a real screen, with the checks that passed.

Change: ScriptHammer #1403, ask for a new confirmation email with no session. Recorded against the local Docker stack, so no real email went out. Shot list: media/pr-1403.json (the spec behind this video) Setup hook: media/hooks.cjs (off-camera: one account waiting on its email) Captions: media/pr-1403.vtt Re-make it: python3 demo_video.py run pr-1403.json --out out/

01The idea: film it from a recipe card›

A cooking show is shot from a recipe card: what the host says, and what the camera sees, step by step. A demo video is the same. The shot list comes first, and the film is made from it, the same way every time.

Before this, each demo video was a one-off pile of scripts. Now it is one tool and one skill, so any lane can make one for any PR. Tool: global/.claude/scripts/demo_video.py Skill: global/.claude/skills/demo-video/SKILL.md Repo: github.com/TortoiseWolfe/Claude_Commandz

The reviewer gets to watch the change work instead of taking the description on trust. The video is on the PR, next to the code.

02The spec file: the shot list›

For each shot you write two things: the line the narrator says, and what the camera does while they say it. That's the whole file.

One JSON file per video. Top level: name, baseUrl, steps, and optional viewport, runner, setup and start. Each step is a say line (spoken, and shown as the caption) plus a list of actions. A real spec carries the app's address and details, so it lives with the job, never in a public repo. The template: spec.template.json

A tiny example: a shopping list page, three shots.

{ "name": "smoke", "baseUrl": "http://localhost:8765", "steps": [ { "say": "I add one more item, and it joins the list.", "actions": [ {"do": "fill", "target": {"placeholder": "Add an item"}, "value": "Dates"}, {"do": "click", "target": {"role": "button", "name": "Add"}}, {"check": "order", "within": "#list", "texts": ["Apples", "Bread", "Cheese", "Dates"]} ] } ] }

What the camera can do: the verbs.

goto · scroll_to · scroll · point · highlight · click · fill · press · wait · wait_for · hook A target is one of: css, text, role (with name), label, placeholder, testId. It can also take exact, within and nth to be sure it picks the right one.

What the continuity person checks: the claims.

visible · absent · count · order · text · url Each check can carry a message that says what it proves, such as "the list reads Apples, Bread, Cheese, Dates".

Signing in, off camera: the setup hook.

If the app needs a sign-in, it is the spec's own setup hook, running before the first shot, against a local demo copy of the app with an account made just for the demo. The tool itself never signs in anywhere.

03One command, three verbs›

One button on the oven. You don't run the voice, the camera and the editing room yourself. You press run.

Check the shot list is well formed: python3 ~/.claude/scripts/demo_video.py validate SPEC.json Make the video: python3 ~/.claude/scripts/demo_video.py run SPEC.json --out DIR Check the kitchen has what it needs: python3 ~/.claude/scripts/demo_video.py doctor

Out comes a small set of files, named after the spec.

NAME-demo.mp4 the narrated cut, with the AI voice NAME-captions-only.mp4 the same film, no sound, captions burned in NAME.srt the captions as a subtitle file NAME-contact-sheet.png six frames side by side, for a quick look NAME-result.json durations, check results and warnings

Setting up the kitchen: no sudo needed.

Install what doctor reports missing: python3 ~/.claude/scripts/demo_video.py doctor --install It builds the voice image from a Dockerfile in the skill, pulls a pinned Playwright image, and caches the matching Playwright package into ~/.cache/demo-video. Nothing is installed on the host. Your ffmpeg needs the subtitles filter (libass) and the DejaVu Sans font.

Doing only part of the job.

Stages are audio, record and assemble: python3 ~/.claude/scripts/demo_video.py run SPEC.json --out DIR --stages audio,record Say the lines again even if they were cached: --force-audio Send the recorder through the shared-Docker queue: --heavy

04What happens inside›

Four jobs, done in order, each by the tool that does it best.

The narrator in the booth: one take per line.

Piper, a text-to-speech program, runs in a Docker image and says each line into its own audio file. The voice is en_US-lessac-medium. The length of each recording sets how long that shot holds, plus a short gap (0.7 s by default).

The camera operator: follows the card, never improvises.

Playwright drives the app in its own browser inside a container, at 1280 by 800, and records the screen. It moves the cursor to what the narrator is talking about, highlights it, and waits for the voice to finish. It uses its own browser. It never borrows a browser that something else is using.

Title cards on the film: captions you can't switch off.

ffmpeg burns the captions into the picture and mixes the voice in. The first caption of every video is always: Narration: AI voice. It is added for you, so a viewer always knows the voice is synthetic. You get two cuts: with the voice, and silent with captions only (for a muted autoplay).

The continuity person: if the screen disagrees, stop the tape.

The checks in the spec run against the live page while it is filmed. A check that fails means the video says something the app doesn't show, so it is a failed recording. Fix the app or the shot list, never the check. Afterwards, open the contact sheet: captions readable, highlight on the right thing, no personal data on screen.

A camera that blinks: freezes in some Docker setups.

On some Windows-with-Linux machines, any browser container freezes about 2.6 seconds every 33 seconds. This was reproduced with an idle script and no video, so it isn't the tool. The recorder logs each freeze. The result file has stalledSec and netOfStalls, and a warning appears above 1 second. Run again for a cleaner take if it matters.

05Onto the pull request›

The finished film goes where the audience already is: on the pull request itself, not in another tool they'd have to sign in to.

  1. Open the PR's description (Edit) or a new comment.

    Any text box on the PR takes attachments.

  2. Click the paperclip, Attach files, and choose the narrated mp4. Dragging the file into the box works too.

    GitHub's own attach control. Wait for the link to appear in the box, then save the comment. It plays inline on the PR page.

  3. Say in a line what the video shows and that the voice is AI.

    The caption already says it on screen. A sentence beside the video helps the reader who skips it.

Will it fit? The size limits.

GitHub's limits for attached videos: 10 MB on a free plan, 100 MB on a paid plan. Formats: mp4, mov, webm. H.264 plays in the most browsers, and the tool's output is H.264. A 50 to 70 second demo comes out at about 2 to 3 MB. Source: docs.github.com, Attaching files

Why not a hosted video tool?

The video on the PR is enough. Nobody has to sign in, there is no second account to keep up, and the film stays with the code it shows.

06The house rules›

Four rules keep it honest, and the tool enforces the first one for you.

Say it's a machine voice.

Narration: AI voice. is the first caption of every cut, added automatically.

Never sign in anywhere new.

The only sign-in is the app's own, in the spec's setup hook, on a local copy, with a demo account. The tool doesn't touch any other account, and it doesn't reuse a browser someone is logged in on.

Keep private details out of public specs.

The skill and template here are generic. A spec for a client's app, with its address and accounts, stays with the job.

Look before you say it's ready.

Read the result file, check every on-screen check passed, and open the contact sheet. Then attach the video to the PR.

07Where it came from›

Two demo videos made by hand in one morning worked well, so the pieces got pulled out and tidied into a tool.

2026-10-26 two PR demo videos made by hand: a 53 s one and a 73 s one, each with a narrated cut and a captions-only cut 2026-10-26 extracted into one tool, one skill and a shot-list format; re-rendering one of them from its spec gave the same captions, the same checks, and a length within 0.03 s 2026-10-26 68 tests for the spec reader and the runner, none skipped, plus a smoke test that runs the real voice, recording and editing steps against a small test page