Skip to content

Commit 857a59a

Browse files
authored
chore(claude): add record demo skill (#403)
1 parent f3767d6 commit 857a59a

3 files changed

Lines changed: 105 additions & 0 deletions

File tree

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
name: record-demo
3+
description: Record terminal demos as GIFs using VHS tape files. Use when asked to record a demo, create a terminal recording, or generate a GIF of CLI usage.
4+
argument-hint: <description>
5+
---
6+
7+
Record a demo of `$ARGUMENTS` using VHS.
8+
9+
1. **Check VHS is installed**: Run `which vhs`. If not found, tell the user to install it with `brew install vhs`.
10+
11+
2. **Create a `.tape` file** in `demos/` (create the directory if needed). Use this template:
12+
13+
```tape
14+
# Demo: <description>
15+
Output demos/<name>.gif # Always use .gif format
16+
17+
Set Shell "zsh"
18+
Set FontSize 16
19+
Set Width 1200
20+
Set Height 600
21+
Set Theme "Catppuccin Mocha"
22+
Set TypingSpeed 75ms
23+
Set Padding 20
24+
25+
Type "<command>"
26+
Sleep 500ms
27+
Enter
28+
Sleep 3s
29+
```
30+
31+
3. **VHS Tape DSL reference**: For the full command reference, see [vhs-reference.md](vhs-reference.md).
32+
33+
4. **Tips for good demos**:
34+
- Add `Sleep` after commands to let output render and be readable
35+
- Use `Hide`/`Show` to run setup commands invisibly
36+
- Keep demos short and focused (under 30 seconds)
37+
- Add a `Sleep 3s` at the end so viewers can see final output
38+
- Always add a `Sleep 500ms` pause after each `Type` line (before `Enter`) to mimic a human pause
39+
- For this project, use `./bin/slack` directly as the CLI binary path (do NOT export PATH)
40+
- When demoing from an app directory, use `Hide` to `cd` into the app, then use `../bin/slack` as the binary path
41+
- Prefer passing app IDs directly (e.g. `--app A12345`) to avoid interactive prompts when the ID is known
42+
5. **Run the recording**: Execute `vhs <filename>.tape` to generate the output file.
43+
44+
6. **Review**: Open the `demos/` directory with `open demos/` so the user can review the output.
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# VHS Tape DSL Reference
2+
3+
## Output
4+
5+
- `Output <path>.gif` - Create a GIF output at the given path
6+
7+
## Require
8+
9+
- `Require <string>` - Ensure a program is on the $PATH to proceed
10+
11+
## Settings
12+
13+
- `Set FontSize <number>` - Set the font size of the terminal
14+
- `Set FontFamily <string>` - Set the font family of the terminal
15+
- `Set Height <number>` - Set the height of the terminal
16+
- `Set Width <number>` - Set the width of the terminal
17+
- `Set LetterSpacing <float>` - Set the font letter spacing (tracking)
18+
- `Set LineHeight <float>` - Set the font line height
19+
- `Set LoopOffset <float>%` - Set the starting frame offset for the GIF loop
20+
- `Set Theme <json|string>` - Set the theme of the terminal
21+
- `Set Padding <number>` - Set the padding of the terminal
22+
- `Set Framerate <number>` - Set the framerate of the recording
23+
- `Set PlaybackSpeed <float>` - Set the playback speed of the recording
24+
- `Set MarginFill <file|#000000>` - Set the file or color the margin will be filled with
25+
- `Set Margin <number>` - Set the size of the margin (no effect without MarginFill)
26+
- `Set BorderRadius <number>` - Set terminal border radius, in pixels
27+
- `Set WindowBar <string>` - Set window bar type (Rings, RingsRight, Colorful, ColorfulRight)
28+
- `Set WindowBarSize <number>` - Set window bar size, in pixels (default: 40)
29+
- `Set TypingSpeed <time>` - Set the typing speed of the terminal (default: 50ms)
30+
31+
## Sleep
32+
33+
- `Sleep <time>` - Sleep for a set amount of time in seconds
34+
35+
## Type
36+
37+
- `Type "<characters>"` - Type characters into the terminal
38+
- `Type@<time> "<characters>"` - Type characters with a custom delay between each character
39+
40+
## Keys
41+
42+
All keys accept an optional `@<time>` delay and an optional repeat `[number]`.
43+
44+
- `Escape` - Press the Escape key
45+
- `Backspace` - Press the Backspace key
46+
- `Delete` - Press the Delete key
47+
- `Insert` - Press the Insert key
48+
- `Enter` - Press the Enter key
49+
- `Space` - Press the Space key
50+
- `Tab` - Press the Tab key
51+
- `Up` / `Down` / `Left` / `Right` - Press arrow keys
52+
- `PageUp` / `PageDown` - Press Page Up/Down keys
53+
- `Ctrl+<key>` - Press Control + key (e.g. `Ctrl+C`)
54+
55+
## Display
56+
57+
- `Hide` - Hide subsequent commands from the output
58+
- `Show` - Show subsequent commands in the output

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,6 @@ package-lock.json
3737

3838
# End to End Test files
3939
test-e2e
40+
41+
# VHS demo recordings
42+
demos/

0 commit comments

Comments
 (0)