/software-engineering:gen-vhs-demo [--output=<path>] [--theme=<name>] [--no-render] [--dry-run] [--force] [<what to demo>]from software-engineering
Generates a terminal demo GIF using VHS: discovers CLI commands, validates they exit 0, writes a .tape script, renders the GIF, wires a task runner target, pins VHS version, and embeds the demo in the README.
Ships in software-engineering. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Produce an animated terminal demo of the current project's CLI using
VHS: a .tape script, the rendered .gif, a task
runner entry to regenerate it, a pinned vhs version in mise.toml, and a Demo section in the
README that displays it.
Problem: A CLI's README is a wall of text. A demo GIF is the single highest-value thing you can add to it, but producing one means learning VHS tape syntax, guessing which commands make a good 40-second story, wiring a regeneration task, pinning the tool, and editing the README - 20-30 minutes per repo. Worse, demo tapes rot silently: flags get deprecated, fixture paths move, and nobody notices until the GIF shows a broken command to every visitor.
Solution: One invocation that:
.tape, renders the .gif, and wires task demo / a make demo targetvhs in mise.toml so local and CI renders match reference into the README at the right heading depthCRITICAL: When generating any content (tape files, task entries, README sections, or any other output):
Additionally, for recorded terminal content:
[email protected]) or generate the
material inside a Hide block (openssl rand -hex 32).Validate Git repository:
git rev-parse --git-dir
Resolve repository root:
git rev-parse --show-toplevel
Store as repoRoot. All default paths resolve against it.
Detect the VHS toolchain (non-blocking - a tape is still worth writing without it):
command -v vhs && vhs --version
command -v ttyd
command -v ffmpeg
vhsInstalled, ttydInstalled, ffmpegInstalled.vhs alone is enough to write and vhs validate a tape.canRender = vhsInstalled && ttydInstalled && ffmpegInstalled.Verify skill assets:
${CLAUDE_PLUGIN_ROOT}/assets/gen-vhs-demo/vhs-cheatsheet.md
exists.Parse $ARGUMENTS (or $argument, depending on host syntax). Tokenize on spaces, then partition
into flags and a free-text remainder.
Supported flags:
--output=<path> - explicit path for the .tape file. The GIF path is the same path with
.tape replaced by .gif.--theme=<name> - VHS theme name. Validate against vhs themes 2>&1 (it prints to stderr).
Invalid name: warn and omit Set Theme rather than writing a name that aborts the render.--no-render - write the tape and wiring, skip the vhs render step.--dry-run - print the tape and the planned edits; write nothing.--force - skip the confirmation gate.Everything else is joined with spaces as focus - a free-text hint about what the demo should
show (e.g. "the encode and decode flow, plus JSON output"). Empty is fine; Phase 3 then picks the
scenes itself.
Default output path (when --output is absent), in order:
<repoRoot>/doc/ if that directory exists<repoRoot>/docs/ if that directory exists<repoRoot>/doc/Default filenames: demo.tape and demo.gif.
Read the cheatsheet to ground the tape in real VHS syntax:
Read: ${CLAUDE_PLUGIN_ROOT}/assets/gen-vhs-demo/vhs-cheatsheet.md
Launch one Explore subagent to map the CLI:
Task(
subagent_type: "Explore",
description: "CLI surface for demo",
prompt: "
Map this repository's CLI so a terminal demo can be scripted. Return JSON:
{
binaryName: string,
buildCommand: string, // how the binary is produced
buildOutputDir: string, // where it lands, relative to repo root
subcommands: [{name, purpose, requiredFlags, exampleInvocation}],
readmeExamples: [copy-pasteable command lines found in README],
testExamples: [command lines found in integration tests, with the literal
fixture values they use],
fixtureDependencies: [file paths any example reads],
buildSystem: 'taskfile' | 'makefile' | 'none',
buildTaskName: string | null, // e.g. 'binary' - the task that builds the CLI
hasMiseToml: boolean,
readmeTopHeadingLevel: 1 | 2, // '# Title' vs '## Title' convention
readmeDemoSectionExists: boolean
}
Detection strategy:
- Entry point: main.go, cmd/root.go, src/main.rs, bin/*, package.json 'bin'
- Subcommands: cobra/clap/click/commander registrations, or the --help text
- Integration tests are the best source of literal working arguments
- Note DEPRECATED flag aliases explicitly so they can be avoided
Return concise JSON, no prose.
"
)
Filter out unreproducible examples. For every path in fixtureDependencies:
git ls-files --error-unmatch <path>
A non-zero exit means the fixture is untracked or gitignored. Drop any example that depends on
it, or replace it with a scene that generates the fixture inside a Hide block.
Draft 3-5 scenes. A scene is one narration comment plus one or two commands. Structure the
sequence as a story: the primary use case first, then a variation, then an error case or a
power-user flag. Honour focus when it was supplied. Keep the whole tape under ~45 seconds.
Verify every candidate command. This is the step that keeps the GIF honest:
# build first
<buildCommand>
# then run each candidate, from repoRoot, with the binary on PATH
bash -c 'export PATH="<repoRoot>/<buildOutputDir>:$PATH"; <candidate command>'
Build the preview message:
🎬 VHS Demo Preview
Tape: <relative tape path>
GIF: <relative gif path>
Theme: <theme or "(VHS default)">
Render: <"yes" if canRender && !--no-render else "no (tape only)">
Scenes (~<N>s total):
1. <narration> -> <command>
2. ...
Files to change:
• <tape path> <create | overwrite>
• <Taskfile.yml | Makefile> add '<demo>' <task | target>
• mise.toml add vhs = "<version>" <or "already pinned">
• README.md add Demo section <or "already present">
<CONDITIONAL WARNINGS>
Conditional warnings:
If canRender = false:
ℹ️ VHS toolchain incomplete - tape will be written, rendering skipped
Missing: <list of vhs / ttyd / ffmpeg>
Install:
• mise: mise use [email protected]
• macOS: brew install vhs ttyd ffmpeg
• Verify: vhs --version && command -v ttyd && command -v ffmpeg
If the tape or GIF already exists:
⚠️ WARNING: <path> already exists
This will OVERWRITE the current demo.
Consider committing the existing version first.
If buildSystem = 'none':
ℹ️ No Taskfile.yml or Makefile found
The regeneration command will be reported instead of wired up.
Confirmation logic:
If --dry-run: print [DRY RUN MODE - No files will be written], jump to Phase 6, print the tape
and the planned edits, write nothing.
If --force: print [--force mode enabled, skipping confirmation] and proceed to Phase 5.
Otherwise use AskUserQuestion:
Question: "Create the demo at <tape path> and update the task runner, mise.toml, and README?"
Options:
- "Yes, create the demo" (proceed to Phase 5)
- "Tape only, no other edits" (Phase 5 step 1 only)
- "No, cancel" (exit with "Operation cancelled by user")
Every edit is idempotent - detect the existing state first and skip anything already correct.
Write the tape. Follow the cheatsheet. Shape:
# <Project> demo - regenerate with: <task demo | make demo | vhs <path>>
Output <gif path relative to repo root>
Set Shell "bash"
Set FontSize 18
Set Width 1200
Set Height 700
Set Padding 20
Set Theme "<theme>" # omit when no valid theme was resolved
Hide
Type "export PATH=$PWD/<buildOutputDir>:$PATH" Enter
Type "export PS1='$ '" Enter
Type "clear" Enter
Show
Type "# <narration for scene 1>" Enter
Sleep 500ms
Type "<verified command>" Enter
Sleep 2s
...
Output is relative to the directory vhs runs from (the repo root), not to the tape.Hide PATH preamble over Require <binary>; a repo-built binary is not on
$PATH.# ... comment line - a silent GIF needs captions.Sleep 1500ms-Sleep 2s after each command; use Sleep 500ms
between typed lines.mkdir -p "$(dirname <tape path>)".Wire the task runner:
Taskfile.yml exists → add, preserving the file's existing indentation and quoting style:
demo:
desc: "Generate demo.gif"
deps: [<buildTaskName>]
cmds:
- vhs <tape path>
Omit deps when no build task exists. If a demo task is already present, update its cmds
and deps rather than adding a duplicate.Makefile exists → add a .PHONY demo target that depends on the build
target and runs vhs <tape path>.vhs <tape path> command in Phase 6.Pin the tool in mise.toml:
[tools] table → append vhs = "0.11.0" if absent. Only add; never
reorder or rewrite other entries (/gen-taskfiles owns this file canonically).[tools]
vhs = "0.11.0"
Decline → skip and note it.Update the README:
readmeDemoSectionExists → verify the image path matches the GIF actually produced, correct
it if it drifted, otherwise leave the section untouched.# or ## per
readmeTopHeadingLevel):
# Demo

Place it after the intro/description and badges, before Install or Usage - high enough that a
visitor sees it without scrolling past the whole feature list.Validate the tape (works even without ttyd/ffmpeg):
vhs validate <tape path>
Non-zero exit means a syntax error - fix the tape before rendering. VHS points at the offending line.
Render when canRender && !--no-render && !--dry-run, from the repo root:
vhs <tape path>
Rendering takes roughly the tape's wall-clock duration plus encoding. Treat a non-zero exit as a soft failure - the tape and wiring were still produced.
Verify the artifact:
test -f <gif path> && ls -lh <gif path>
If --dry-run: report that nothing was written, print the full tape content, list the edits
that would have been made, and note that dropping --dry-run performs them.
Otherwise report - cover these facts; no fixed layout required:
open <gif> on macOS, xdg-open <gif> on Linux); edit the tape
and re-render with task demo / make demo / vhs <tape>; commit both the tape and the GIF so
the demo stays reproducible.Sleep
durations, lower Set Framerate to 24, then reduce Set Width/Set Height.canRender = false, name exactly which of vhs/ttyd/ffmpeg is missing
and give the mise use [email protected] / brew install line, then the command to render once
installed.vhs exited non-zero, quote its stderr and note that the tape was written
successfully, so a manual vhs <tape path> is all that is needed after fixing the cause./gen-vhs-demo: /gen-taskfiles (go-specialist) creates the Taskfile.yml and
mise.toml this skill extends. Running it first produces cleaner wiring./gen-vhs-demo:
/gen-claude picks up the new demo task when regenerating CLAUDE.md./upd-project-description benefits from a README that now leads with a demo.# Auto-discover the CLI and record a demo
/gen-vhs-demo
# Focus the demo on a specific flow
/gen-vhs-demo the encode and decode round trip, plus JSON output
# Custom path and theme
/gen-vhs-demo --output=docs/assets/cli.tape --theme="Catppuccin Mocha"
# Preview the tape without writing anything
/gen-vhs-demo --dry-run
# Write the tape and wiring, render later (e.g. ttyd not installed)
/gen-vhs-demo --no-render
# Regenerate non-interactively
/gen-vhs-demo --force
vhs, ttyd, and ffmpeg. Without all three only the tape
is produced.Set FontFamily silently falls back when the font is not
installed, so renders differ across machines unless the font is guaranteed. This skill omits
Set FontFamily by default.Sleep/Wait directives.Sleep gets its output cut off. Use
Wait for anything with variable duration.If vhs validate fails:
Output and all Set directives precede the first Type.If the render produces a GIF with "command not found":
$PATH. Confirm the build ran and that the Hide preamble points at the
real build output directory.demo task so the binary always exists before vhs runs.If output is cut off mid-command:
Sleep after that command, orWait (optionally Wait+Line /<regex>/) followed by a short Sleep.If the GIF is too large:
Sleep durations - usually 40% of the runtime.Set Framerate 24.Set Width/Set Height; keep the aspect ratio.If ttyd or ffmpeg is missing:
mise use [email protected] # pins vhs only
brew install ttyd ffmpeg # macOS
Then re-render with task demo (or vhs <tape path>).
vhs themes 2>&1 (prints to stderr)vhs new demo.tapevhs record > demo.tape${CLAUDE_PLUGIN_ROOT}/assets/gen-vhs-demo/vhs-cheatsheet.mdWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
vhs, cli-demo, terminal-recording, readme-gif, demo-automation
18 skills in this plugin
/auto-mrPush current branch, create MR/PR on GitHub, GitLab, or Forgejo, wait for CI pipeline, merge, and clean up branch using auto-mr CLInpx claudepluginhub sgaunet/claude-plugins --plugin software-engineeringOther plugins' skills for the same job