name: demo-video-watcher
description: Watch demo videos linked in GitHub issue/PR comments. Downloads the video, transcribes audio with whisper and extracts frames. Use when encountering a video URL in a teamniteo or mayetrx repository.
argument-hint: "
- Bash(curl *)
- Bash(file *)
- Bash(gh api*)
- Bash(gh auth token*)
- Bash(ls *)
- Bash(mkdir *)
- Bash(nix-shell *)
- Glob
- Read
Demo Video Watcher
Extract context from demo videos linked in GitHub issues or PR comments. These are typically User Story demos — screen recordings with narration showing the implemented feature.
Parse $ARGUMENTS to extract a video URL. Accept:
- GitHub comment URL:
https://github.com/<owner>/<repo>/issues/<n>#issuecomment-<id>— fetch the comment body to find the video attachment URL withgh api repos/<owner>/<repo>/issues/comments/<id> --jq '.body'. - GitHub PR comment URL:
https://github.com/<owner>/<repo>/pull/<n>#issuecomment-<id>—#issuecomment-<id>is an issue comment even on a PR, so use the same endpoint:gh api repos/<owner>/<repo>/issues/comments/<id> --jq '.body'. - Direct video URL:
https://github.com/user-attachments/assets/<uuid>
If $ARGUMENTS is empty, use AskUserQuestion to ask for the URL.
GitHub user-attachment URLs require authentication. Download with:
curl -sL -H "Authorization: token $(gh auth token)" \
-o /tmp/demo-video.mp4 "<VIDEO_URL>"
Verify the download:
ls -lh /tmp/demo-video.mp4 && file /tmp/demo-video.mp4
If the file is tiny (< 1KB) or contains "Not Found", the download failed.
Audio transcription gives the best context. Always do this first.
- Check for audio track:
nix-shell -p ffmpeg --run "ffprobe -i /tmp/demo-video.mp4 2>&1 | grep Audio"
- Extract audio:
nix-shell -p ffmpeg --run \
"ffmpeg -y -i /tmp/demo-video.mp4 -vn -acodec pcm_s16le -ar 16000 -ac 1 /tmp/demo-audio.wav"
- Transcribe with whisper:
nix-shell -p openai-whisper --run \
"whisper /tmp/demo-audio.wav --model tiny --language en --output_format txt --output_dir /tmp/demo-transcript"
Present the transcription with timestamps.
After audio transcription, extract frames to capture visual context.
mkdir -p /tmp/demo-frames
nix-shell -p ffmpeg --run \
"ffmpeg -i /tmp/demo-video.mp4 -vf 'fps=1' -q:v 2 /tmp/demo-frames/frame_%03d.jpg"
Use fps=0.5 for longer videos (> 60s) or fps=2 for short ones (< 10s)
where detail matters.
View frames with the Read tool. Start with a sample (every 5th frame) to get an overview, then fill in gaps if needed.