record-videolisted
Install: claude install-skill Jbaws4177/background-agents
# record-video
Use this skill when a UI verification depends on interaction over time: opening menus, clicking
through flows, dragging, typing, navigation, loading states, transitions, or animation.
## Key Facts
Use `agent-browser record` as the primary recorder. Record directly to an `.mp4` path so
`agent-browser` encodes the recording as a silent MP4 that can be uploaded with `upload-media`.
## Required Workflow
1. Open the target page with `agent-browser open`.
2. Set the viewport explicitly when layout matters.
3. Use `agent-browser snapshot -i` to inspect accessible names/selectors before recording.
4. Start recording with `agent-browser record start <path>.mp4`.
5. Perform the interaction being verified.
6. Always run `agent-browser record stop`.
7. Use `ffprobe` to read actual encoded dimensions and duration before upload.
8. Report the returned `artifactId` and what interaction was verified.
## Command Pattern
```bash
set -e
agent-browser open "$URL"
agent-browser set viewport 1512 982
agent-browser snapshot -i
STARTED_AT_MS=$(date +%s%3N)
agent-browser record start /tmp/opencode/demo.mp4
recording_started=1
cleanup_recording() {
if [ "${recording_started:-0}" = "1" ]; then
agent-browser record stop || true
fi
}
trap cleanup_recording EXIT
interaction_exit_code=0
agent-browser click "[data-testid=settings]" || interaction_exit_code=$?
agent-browser wait 1000 || interaction_exit_code=$?
agent-browser record stop
recording_started=0
trap - EXIT
ENDED_