Communitygithub.com

recording-feature-demos

Use when the user asks to record a video, demo, screencast, walkthrough, or how-to video of a web app feature or flow (newly built or existing), with captions, voice, voice-over, narration, or audio, to attach to a pull request or share anywhere, using the Chrome DevTools MCP

What is recording-feature-demos?

recording-feature-demos is a Claude Code agent skill that use when the user asks to record a video, demo, screencast, walkthrough, or how-to video of a web app feature or flow (newly built or existing), with captions, voice, voice-over, narration, or audio, to attach to a pull request or share anywhere, using the Chrome DevTools MCP.

Works with~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/skydiver/claude-recording-demos/tree/HEAD/skills/recording-feature-demos

Ask in your favorite AI

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

Documentation

Recording Feature Demos

Record a captioned MP4 with the Chrome DevTools MCP screencast. An injected page overlay renders captions and click rings, so the recording captures them. Narration is optional. File paths below are relative to this skill's base directory.

Preflight (stop on any failure, no fallbacks)

  • screencast_start/screencast_stop available (load via ToolSearch if deferred). Missing: user adds --experimentalScreencast=true to the chrome-devtools MCP args and restarts.
  • which ffmpeg. Missing: brew install ffmpeg.
  • curl -sI <url> succeeds. Failing: ask for the URL or to start the dev server.

Captions come only from the overlay: ffmpeg drawtext/subtitles are often not compiled in, and GitHub ignores soft subtitle tracks.

1. Storyboard (approval REQUIRED before recording)

Source the flow:

  • Feature built in this session: from the diff and conversation.
  • Existing feature: from the user's description, then the relevant routes/components in the code and a take_snapshot of the running app.

If any row would lack a concrete start URL, action target, or visible result, ask before drafting. Use one AskUserQuestion with only the questions whose answers are still unknown:

HeaderQuestionOptions
AudienceWho is the video for?PR reviewers · Team/stakeholders · End users (how-to)
ScopeHow much should it cover?Happy path · Happy path + one edge case · Full tour
LengthHow long?Short (~20 s) · Medium (~45 s)
StartWhich starting state?Current data · Specific account or data (user types it)

Steps of the flow still unclear: ask in plain text. Then draft the storyboard. Present this table:

#Caption (≤ 8 words)ActionsHold (minimum)

Target 20–60 s. List the starting data the take needs. Ask before seeding or clearing persisted data.

Every element a scene clicks must already exist at the Setup snapshot: uids are fixed before the take, so an item created mid-take can't be clicked. Seed such items in Setup; creating new ones on camera is fine as long as nothing clicks them later.

Then call AskUserQuestion once with exactly these two questions and options:

HeaderQuestionOptions
StoryboardRecord this storyboard?Approve · Revise
AudioCaptions only, or a voice?Captions only · Captions + female voice (af_heart) · Captions + male voice (am_michael) · Captions + British voice (bf_emma)

Revise → update the table and ask again. Any voice option, or another Kokoro voice name typed in → follow reference/narration.md with that voice before step 2.

2. Setup (not recorded)

Every chrome-devtools call takes the pageId from new_page/list_pages.

  1. new_page or select_page, then reload for clean state. Never call resize_page: the video keeps the current window size.
  2. Seed the starting data, then take_snapshot for uids. Never guess selectors. Re-snapshot after any reload: uids change.
  3. Read scripts/demo-overlay.js and pass its contents unchanged as the evaluate_script function. Re-running is safe; it works under strict CSP.
  4. Smoke test: () => __demo.caption('Test'), then take_screenshot. If the caption covers key UI, () => __demo.position('top').
  5. () => window.innerWidth gives <width>, the encode width in CSS pixels. Don't resize the window from here until the take ends.
  6. Pre-set scene 1's caption: () => __demo.caption('…'). mark() logs it at offset 0.

3. Record: one message, in this order

Tool calls in one message run sequentially without model latency in between, so the whole take goes in a single message:

  1. screencast_start without filePath (paths outside the MCP workspace roots are rejected).
  2. () => __demo.mark()
  3. () => __demo.hold(<scene 1 hold>), scene 1's actions, then per later scene:
    • () => __demo.caption('…', <hold>) sets the caption and resolves after the hold.
    • Actions by uid (click, fill, press_key). For on-camera typing, click the input, then type_text (types key by key; fill sets the value instantly).
    • () => __demo.hold(2000) on the result. Skip it when a transient state (toast) needs the next caption right away.
  4. () => __demo.caption('', 1000), then screencast_stop.

Copy the file screencast_stop reports to the scratchpad as raw.mp4.

Hash or History API route changes keep the overlay. A full page load or reload mid-take wipes it: end the message there, re-snapshot, re-inject, continue. Wrong click or missed state: reset and re-record the whole take. Never splice.

4. Verify and encode

ffprobe -v error -show_entries format=duration -of csv=p=0 raw.mp4
ffmpeg -v error -y -i raw.mp4 -vf "fps=1,scale=320:-1,tile=6x10" -frames:v 1 sheet.png   # Read it
mkdir -p ~/Documents/Screencasts
ffmpeg -v error -y -i raw.mp4 -vf scale=<width>:-2 -c:v libx264 -crf 28 -preset slow \
  -pix_fmt yuv420p -movflags +faststart -an ~/Documents/Screencasts/<project>-<feature>-<YYYYMMDD>.mp4

The sheet holds one frame per second for up to 60 s; black cells are padding. It must show legible captions from the first frame and every key state. Click rings last 0.8 s and may fall between sampled frames.

With narration, replace the last command with scripts/mix-narration.sh (see the reference).

For a PR, the file must be < 10 MB (GitHub free-plan limit). Raw frames are devicePixelRatio× the window (2× on Retina), hence the scale back to <width>. Still over: a smaller width (e.g. 75% of <width>) or a shorter storyboard.

5. Report

Give the path, duration, size, and caption list. Never commit the file.

For a PR, ask before uploading: an attachment is visible to everyone who can see the PR. On approval, append it to the description with gh pr edit <number> --attach <file>, or post it as a comment with gh pr comment <number> --attach <file>. --attach needs gh ≥ 2.99.0 (gh --version). On older versions, the user drags the file into the description.

Common Mistakes

MistakeFix
Long frozen openingscreencast_start belongs in the same message as the take
Captions vanish mid-videoA navigation wiped the overlay. Re-inject after it.
click fails with an unknown uidA reload or re-render changed uids. Re-snapshot.
Target created during the takeIt has no uid yet. Seed it in Setup instead.
Overlay retyped with editsPass the file contents unchanged

Related Skills