Skip to content
Back to skills

Narrate Video

ASecurity

Generate a narrated walkthrough video of a running web app. Use when the user asks to record, narrate, or produce a video tour / screencast / demo of a website or feature, or create a walkthrough with voiceover.

  • 4 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 16, 2026
developmentrustgobashnodeexpressdebugginggitapiperformance

Works with

  • claude code
  • cursor
  • cli
  • api
  • mcp

Security analysis

A100/100

Scanned December 1, 2026

npx -y skills add tomek-i/narrate-plugin --skill narrate-video --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Narrate Video?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Narrate Video
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tomek-i-narrate-video/badge)](https://www.skillsdirectory.com/skills/tomek-i-narrate-video)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: narrate-video
description: Generate a narrated walkthrough video of a running web app. Use when the user asks to record, narrate, or produce a video tour / screencast / demo of a website or feature, or create a walkthrough with voiceover.
argument-hint: "[what to demo, e.g. the signup flow with test@example.com]"
---

# Narrate a walkthrough video

If you were invoked with a request (the user's words, available as `$ARGUMENTS`),
treat that as the walkthrough to produce. If it's empty, ask what flow/feature to
demo and for any test credentials or data needed.

Produce a narrated video tour using the bundled `@narrate/core` engine: it
generates speech with a TTS provider, records the browser continuously with a
headless Playwright (each beat held on screen for its narration length plus a
short pause, so audio sync is automatic), and muxes narration onto the video with ffmpeg.

## Narrate like a presenter (use all your context)

You're not just clicking around — you're a product person **showcasing** something
to a viewer who can't see your screen. Before authoring anything, build a mental
model of *what story to tell and what to point at*, using every source you have:

- **The prompt** (`$ARGUMENTS`) — the explicit ask ("demo the signup flow", "show
  what changed in this PR", "walk through the dashboard").
- **The codebase** — components, routes, and the **real selectors** for the
  surfaces involved (read the source; don't guess selectors).
- **The running site** — what's actually on screen (use the Playwright MCP to
  snapshot the live page and confirm selectors/structure).
- **Git / GitHub context** — when the ask is about a change ("the new feature",
  "this PR", "what I just built"), inspect it: current branch vs. the base, recent
  commits, and any open PR (`gh pr view`, `gh pr diff`). The diff tells you which
  files/UI changed, so you demo *those* surfaces and **highlight exactly what's
  new** — not a generic tour.

Then translate that into beats: each beat says one thing and **points at the thing
it's describing** (cursor for interactions, a brief `focus`/`highlight` pulse for
the element/section the narration calls out). This is what makes the highlighting
feel deliberate rather than random — it's driven by what you actually decided to show.

## Evaluative walkthroughs → also emit a task list

Sometimes the ask isn't "show this off" but "critique this" / "review my home
page" / "suggest improvements". Then the narration is full of **actionable
findings** — but spoken in a video, they're easy to lose. Whenever the walkthrough
is evaluative (you're pointing out problems, gaps, or things to improve), also
write a **task list in Markdown** next to the video so the suggestions are
reviewable and a coding agent (or the user) can act on them:

- Path: `./.narrate/tmp/<slug>.tasks.md` (delivered to `./docs/<slug>.tasks.md`).
- One GitHub-style checkbox (`- [ ]`) per concrete, actionable change — not a
  restatement of the narration. Each item: a short imperative title, *why* it
  matters, and where it applies (the page/section, and the **real selector or
  source file** when you know it, so an agent can jump straight to it).
- Group by area (e.g. Hero, Navigation, Performance, Accessibility) and, where it
  helps, note rough priority (high/medium/low).
- Keep it in sync with the beats: every critical thing the narration calls out
  should have a corresponding task, so nothing stays buried in the audio.

This is your own authoring step (the engine doesn't generate it) — produce it from
the same analysis that drove the beats. For a pure showcase (no critique), skip it.

## Authenticated walkthroughs (login-gated pages)

Recording starts in a **clean, signed-out** browser context, so anything behind a
login wall needs auth set up first. **Never ask the user to paste real credentials
into the chat, and never write real credentials into the scene file** — both expose
secrets (to the LLM and on disk, including any `keepScene`/`docs` copy). Use one of
the two safe paths instead:

1. **`auth.storageState` (preferred).** Capture the user's session once, then point
   the scene at it — the recorder starts already authenticated and never visits the
   login screen. You can run this on demand: it opens a real browser, **blocks while
   the user logs in, and returns the instant they close the window**, so just invoke
   it and continue once it exits:
   ```bash
   node "${CLAUDE_PLUGIN_ROOT}/bin/narrate.mjs" auth <login-url>   # saves .narrate/auth.json
   ```
   Tell the user plainly: "a browser will open — log in, then close the window."
   (Default output is `.narrate/auth.json`; pass `--out .narrate/<name>.json` for a
   different path.) Then add `"auth": { "storageState": ".narrate/auth.json" }` to the
   scene and author beats that start *inside* the authenticated UI. The session file
   is gitignored automatically. If a later render shows the login screen, the session
   expired — just run `auth` again.
2. **`${ENV_VAR}` in `fill`/`type` (only if the login itself is the thing to demo).**
   Put placeholders like `${DEMO_PASSWORD}` in the typed text; they resolve from the
   user's environment at render time, so the secret never enters the scene or the
   chat. Ask the user to export the vars and run `render` themselves (e.g.
   `DEMO_PASSWORD=… node …/narrate.mjs render …`). Prefer a throwaway/test account.

Default to **#1**; it's the only one that keeps the credential out of the recorded
page entirely. Confirm which the user prefers rather than assuming.

## The CLI

The engine is bundled inside this plugin. Always invoke it as:

```bash
node "${CLAUDE_PLUGIN_ROOT}/bin/narrate.mjs" <command> …
```

(In the source monorepo you can instead use `pnpm narrate …`.)

Commands:

- `init`: scaffold the project override file `.narrate/settings.local.json`
  (settings and keys normally come from the global `~/.narrate/settings.json`).
- `check`: check ffmpeg and the config; exit 0/1.
- `validate --scene <file> [--json] [--untrusted] [--site <url>] [--allow-origin <url…>]`:
  check a scene without rendering (no browser, voice or network); exit 0/1, with
  a JSON path per problem. Unknown keys are problems too.
- `render --scene <file> [--out <dir>] [--json] [--log <file>] [--provider <p>] [--voice <v>]
  [--same-origin] [--untrusted] [--no-env] [--storage-state <file>] [--site <url>] [--allow-origin <url…>]`.
  With `--json` it prints one result object on stdout: on success `ok`, absolute
  `video` / `captions` / `log` paths and the `audio` check; on failure `stage`
  (`validate` | `setup` | `tts` | `record` | `mux`), `error` and `log`.
- `auth <login-url> [--out <file>]`: log in once and save a session for
  authenticated scenes (see above).
- `setup`: install Playwright (normally automatic on first render) and write the
  stable launchers in `~/.narrate/bin`.

Outside Claude Code (scripts, CI on a machine with the plugin), call
`node ~/.narrate/bin/narrate.mjs <command>`, never the versioned cache path: the
launcher runs the installed plugin version. TTS provider/key onboarding lives in
the **`/narrate-setup`** skill.

## Prerequisites

- **ffmpeg + ffprobe** on PATH (`ffmpeg -version`) — the only manual dependency.
  Playwright + Chromium are auto-provisioned on the first render.
- The **target app running** and reachable at the scene's `site` URL.
- **TTS works out of the box** with the OS voice (no key). For higher-quality
  cloud narration, the user can run **`/narrate-setup`** to add a Gemini/ElevenLabs
  key (stored once, globally, in `~/.narrate/settings.json`); it's optional.

## Workflow (from a plain-English request)

1. **Scaffold + validate (deterministic).**
   ```bash
   node "${CLAUDE_PLUGIN_ROOT}/bin/narrate.mjs" init
   node "${CLAUDE_PLUGIN_ROOT}/bin/narrate.mjs" check
   ```
   `init` creates an empty, gitignored project override file
   `./.narrate/settings.local.json` the first time (settings come from the global
   `~/.narrate/settings.json`, else defaults — the OS voice); `check` validates
   ffmpeg + config and prints `RESULT: PASS|FAIL`. Act on it:
   - **ffmpeg MISSING** → give install instructions and stop (the one hard dependency).
   - **PASS** → continue. Don't block on a key: with defaults narration uses the OS
     voice. If `check` shows `provider=os` and the user wants studio-quality narration,
     mention they can run **`/narrate-setup`** first (optional), then proceed either way.
2. **Investigate & decide what to showcase.**
   - **Run/serve info:** `package.json` dev/start script, framework, URL/port,
     required env/seed.
   - **Scope from git/GitHub when the ask is about a change.** Find what's new and
     demo *that*:
     ```bash
     git branch --show-current && git log --oneline -15
     git diff --stat $(git merge-base HEAD main 2>/dev/null || echo main)...HEAD
     gh pr view --json title,body,url,headRefName 2>/dev/null   # open PR for this branch?
     gh pr diff 2>/dev/null                                     # which files/UI changed
     ```
     Map changed files → the UI surfaces they affect → the beats to record, so the
     walkthrough spotlights the new/changed behavior (use the PR title/body as the
     storyline). For a plain feature/flow ask, skip the diff and just map the flow.
   - **Selectors:** identify the pages + **real selectors** (read component source,
     or snapshot the live page with the Playwright MCP). Prefer robust selectors:
     `role=`, `text=`, `[name=...]`, stable ids.
3. **Run the app** if needed — start the dev server in the background, wait until
   the URL responds, and remember to stop it afterward.
4. **Author a scene** at `./.narrate/tmp/<slug>.scene.json` (format below). Use any
   credentials/data the user gave; treat signup/email flows as test-only. Drive it
   like a presenter (same overlay features the demo uses):
   - **Cursor carries interactions** — it auto-glides to each click/type/fill, so
     the viewer follows along. Don't hand-ring form fields.
   - **Brief highlights for what you're describing** — when a beat's narration
     calls out a specific element/section (especially a changed one from the diff),
     set that beat's **`focus`** selector (or a `highlight` step *after* any scroll),
     so a ~3s pulse points right at it, then fades. Add a `focusLabel` to name it.
5. **Validate, then render** to the temp dir. `validate` is instant and needs no
   browser or voice; fix every reported `path` before rendering:
   ```bash
   node "${CLAUDE_PLUGIN_ROOT}/bin/narrate.mjs" validate --scene ./.narrate/tmp/<slug>.scene.json
   node "${CLAUDE_PLUGIN_ROOT}/bin/narrate.mjs" render --json \
     --scene ./.narrate/tmp/<slug>.scene.json --out ./.narrate/tmp
   ```
   Read the JSON line on stdout (progress is on stderr). If `ok` is false, fix
   what `stage` and `error` point at (`validate`: the scene; `setup`: ffmpeg or
   the browser; `tts`: the key or voice; `record`: the app or a selector — the
   `log` file has the details) and re-render.
6. **Deliver**: copy `./.narrate/tmp/<slug>.mp4` → `./docs/<slug>.mp4`, ensure
   `.narrate/` is in the project `.gitignore`, and stop the dev server. Deliver any
   sidecars produced alongside the video too: `<slug>.vtt` (captions, if
   `output.vtt` is on), `<slug>.scene.json` (if `output.keepScene` is on), and the
   `<slug>.tasks.md` task list you authored for an evaluative walkthrough — copy
   each to `./docs/` next to the mp4.
7. **Report audio + artifacts, then clean up.** Quote the result's `audio`
   (stream present? mean volume in dB) so the user can verify the narration is
   real. (With `--json`, a silent or missing audio track already fails the render,
   except with the silent `mock` voice.) List every delivered file (video, and any
   captions / scene / task list). If something looks wrong, keep `./.narrate/tmp`
   (it has `narrate.log`) for debugging; otherwise **delete `./.narrate/tmp`**
   automatically — the deliverables live under `./docs/`. Report those paths. (Note: VS Code's built-in preview can't decode the audio — verify in
   VLC or a browser.)

## Scene format

```jsonc
{
  "name": "signup",                       // output file = <name>.mp4
  "site": "http://localhost:3000",
  "viewport": { "width": 1440, "height": 900 },
  "theme": "dark",                         // optional: light | dark | system
  "waitUntil": "load",                     // optional: load | domcontentloaded | networkidle (default)
  "allowedOrigins": ["http://localhost:3000"],  // optional: same-origin guard (see Notes)
  "auth": { "storageState": ".narrate/auth.json" },  // optional: start signed in (see Authenticated walkthroughs)
  "beats": [
    {
      "id": "intro",
      "say": "Spoken narration for this beat.",
      "voice": "Kore",                     // optional per-beat voice override
      "focus": "#hero",                    // optional: highlight this element for the whole beat
      "focusStyle": "ring",                // optional: ring | glow | spotlight (default from config)
      "focusLabel": "Welcome",             // optional: caption next to it
      "do": [ { "action": "wait", "ms": 800 } ]
    }
  ]
}
```

**Voice tags:** cues in square brackets in `say`, like `[excited]`, `[whispers]`
or `[short pause]` (always lowercase), make the narration more expressive with
Gemini (results vary by tag) or an ElevenLabs v3 model (`tts.elevenlabs.model:
"eleven_v3"`). Other voices get the text without them, and captions never show
them. Use them sparingly (a cue at the start of a beat, or before a key point).
Capitalized brackets like `[Enter]` or `[Save]` aren't tags and are spoken.

Use `focus` to spotlight whatever the narration is talking about — it highlights
for the beat's whole duration and clears automatically. The synthetic cursor and
highlights are injected into the page (never the OS cursor) and are on by default;
they're configurable under `overlay` in settings.

Beat ids must be unique. For editor autocomplete, add the hosted schema
(`render` only warns about unknown keys and renders anyway; `validate` reports them as problems, so run it to catch typos):
`"$schema": "https://raw.githubusercontent.com/tomek-i/narrate-plugin/main/narrate.scene.schema.json"`.

## Step vocabulary (the `do` array)

Selectors are real Playwright selectors. Steps run in order within a beat.

**Timing**
- `{ "action": "wait", "ms": 1000 }`
- `{ "action": "waitFor", "selector": ".x", "state": "visible" }` — state: `attached|detached|visible|hidden`
- `{ "action": "waitForUrl", "url": "**/dashboard" }`

**Navigation**
- `{ "action": "navigate", "url": "http://localhost:3000/path" }`
- `{ "action": "back" }` · `{ "action": "forward" }` · `{ "action": "reload" }`

**Mouse**
- `{ "action": "click", "selector": "..." }`
- `{ "action": "dblclick", "selector": "..." }`
- `{ "action": "hover", "selector": "..." }`
- `{ "action": "dragTo", "from": "...", "to": "..." }`

**Keyboard / forms**
- `{ "action": "fill", "selector": "#email", "text": "a@b.com" }` — set value instantly
- `{ "action": "type", "selector": "#email", "text": "a@b.com", "delay": 60 }` — key-by-key (lifelike)
- `{ "action": "clear", "selector": "#email" }`
- `{ "action": "press", "key": "Enter", "selector": "#email" }` — `selector` optional; supports combos like `Control+A`
- `{ "action": "selectOption", "selector": "select", "label": "Blue" }` — or `"value": "..."`
- `{ "action": "check", "selector": "#agree" }` · `{ "action": "uncheck", "selector": "#agree" }`
- `{ "action": "focus", "selector": "..." }` · `{ "action": "blur", "selector": "..." }`
- `{ "action": "uploadFile", "selector": "input[type=file]", "files": ["./a.png"] }`

**Scrolling** (smoothly animated over `over` ms)
- `{ "action": "scrollTo", "y": 600, "over": 2000 }`
- `{ "action": "scrollThrough", "selector": "article", "over": 7000 }` — selector optional (whole page)
- `{ "action": "scrollIntoView", "selector": "#section", "over": 800 }`

**Highlighting / pointer** (injected overlay — never the OS cursor; on by default)
- `{ "action": "highlight", "selector": ".cta", "style": "ring", "label": "Start here" }` — `style`: `ring`|`glow`|`spotlight`. Pulses ~3s then fades (config `holdMs`); add `"hold": 0` to keep it until `unhighlight`/beat end.
- `{ "action": "unhighlight", "selector": ".cta" }` — omit `selector` to clear all
- `{ "action": "point", "selector": "role=button[name=Save]" }` — glide the cursor (no click). Clicks/hover/type already auto-glide the cursor.

Two roles — keep them separate so it doesn't look random:
- **Cursor carries interactions.** Don't hand-highlight form fields; the cursor
  already glides to each element you act on (consistent by construction).
- **Highlights are brief accents** for what the narration *describes* — they pulse
  and fade, so they don't obscure the page. Use `focus` (in-view elements) or a
  `highlight` step placed *after* any scroll so the pulse lands when it's visible.

**Convenience / escape hatch**
- `{ "action": "menu", "trigger": "role=button[name=\"Toggle theme\"]", "item": "Light" }` — click trigger, then a `menuitem` by text
- `{ "action": "eval", "fn": "document.body.classList.add('x')" }` — arbitrary in-page async JS; last resort

## Notes

- **Pacing:** a beat is held for its narration length plus a short pause
  (`record.beatGapMs`, default 600ms; `record.endHoldMs` after the last beat). If
  its `do` steps run longer than the narration, the engine warns — split the beat
  or lengthen the narration.
- **Config:** global `~/.narrate/settings.json`, overridden per project by
  `.narrate/settings.local.json` (deep-merged), holds output settings plus a `tts`
  block with per-provider settings nested under their own key (`tts.gemini`,
  `tts.elevenlabs` — each with its own `voice`/`model`/`key`); default is the OS
  voice (no key). Override per-run with `--provider` / `--voice`. To switch to a
  cloud voice, run **`/narrate-setup`** (or have the user run `! narrate set-key <provider> --clipboard` after copying the key, never pasting it into chat).
  Two optional `output` flags add sidecar files next to the video: `"vtt": true`
  writes a `<name>.vtt` caption track (one cue per beat, timed to the narration),
  and `"keepScene": true` keeps a `<name>.scene.json` copy for later re-renders.
- **Environment:** narrate reads `NARRATE_HOME` (global settings dir), the key
  variables `NARRATE_GEMINI_API_KEY` / `NARRATE_ELEVENLABS_API_KEY` (or the custom
  name in `tts.<provider>.apiKeyEnv`), any `${NAME}` a scene references,
  `PATH` (ffmpeg, OS voice) and Playwright's `PLAYWRIGHT_BROWSERS_PATH`. When
  you run it with a filtered environment, pass those through. A missing-key
  error lists every settings file and variable it checked. Full table:
  `docs/configuration.md#environment-variables` in the narrate repo.
- **Untrusted scenes:** if the scene's content comes from untrusted input (issue
  text, a web page, another agent), render with `--untrusted`. It rejects `eval`,
  `uploadFile` and off-site `navigate` before anything runs (the error lists each
  `beats[i].do[j]`), types `${NAME}` literally, ignores the scene's `auth` (pass
  `--storage-state .narrate/auth.json` instead) and its `allowedOrigins` (pass
  `--allow-origin` instead), requires an http(s) `site` and plain `name`/beat
  `id`s, and turns on the same-origin guard. `--no-env` alone just types text
  literally.
- **Same-origin guard:** pass `--same-origin` to `render` (or set the scene's
  `allowedOrigins`) whenever the video will be published, so it can never show
  another site. Requests to other origins are blocked; if the page navigates
  away (link, redirect, timed redirect), the render fails, naming the beat/step
  and URL, and no video is written. Fix the scene (or add the origin to
  `allowedOrigins` if it's legitimately part of the app) and re-render.
- **Page loads:** each navigation (and the settle after clicks) waits for
  `networkidle` by default. Apps that poll (dashboards, dev servers with HMR,
  analytics) never go idle: the render still works but logs a "never went idle"
  warning and loses up to `record.navigationTimeoutMs` (30s) per load. If you see
  that warning, or the app polls, set `"waitUntil": "load"` on the scene (or
  `record.waitUntil` in the settings for every scene).
- **Theme:** the optional scene-level `theme` emulates the browser's
  `prefers-color-scheme` (the standard OS/browser color-scheme signal), so it
  works for any site that honors that media query. Apps with a *manual* toggle
  (a button/switch) won't change from this alone — drive that toggle with a
  `click`/`menu` step. Omit `theme` entirely if it doesn't apply.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.