v1-prove-work
/v1-prove-work
Nagrywa dowód w przeglądarce albo demo GIF dla gotowej zmiany w interfejsie, np. do pull requestu.
- Autor
- v1-io ↗
- Repozytorium
- v1tamins ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 24.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 4
- Skrypty
- 1
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 8
Brak sygnałów. Repozytorium zmienione 24.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
- 1 skrypt w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.
Skrypty: scripts/video_to_gif.py
Co robi i kiedy
Nagrywa dowód w przeglądarce albo demo GIF dla gotowej zmiany w interfejsie, np. do pull requestu.
Wyzwalacze z opisu
Oryginalny opis (EN)
Use when explicitly recording browser proof or a demo GIF for a completed UI change. Triggers on "prove work", "record demo", or "visual proof".
Jak działa
- Recording or explanation
- Quick Start
- Usage
- Workflow
- Examples
- Error Handling
- Reference Files
Podgląd SKILL.md
---
name: v1-prove-work
description: Use when explicitly recording browser proof or a demo GIF for a completed UI change. Triggers on "prove work", "record demo", or "visual proof".
disable-model-invocation: true
allowed-tools:
- Bash
- Read
- Write
- Grep
- Glob
---
# Prove Work
Generate an animated GIF showing the result of work done during a session and embed it in a GitHub PR.
## Recording or explanation
This skill records actual browser behavior. For a requested conceptual animation, use `v1-explainer-video`; an illustration is not proof that the implementation works. If a backend change cannot be recorded here, explain that limit rather than automatically substituting an animation. When the user requests a narrated explanation using an existing recording, pass that footage, what it demonstrates, and its verification limits to the video skill. Keep observed footage distinct from illustrative scenes.
## Quick Start
Typical invocations:
- Claude Code: `/v1-prove-work http://localhost:3000/settings --pr 42`
- Codex: invoke `v1-prove-work` from the skills menu or use `$v1-prove-work http://localhost:3000/settings --pr 42`
This records a browser interaction with `localhost:3000/settings`, converts the recording to a GIF, uploads it to GitHub, and embeds it in PR #42's `## Demo` section.
Without arguments, the skill infers the URL from the git diff and auto-detects the PR:
```text
/v1-prove-work
```
In Codex, the slash examples below map directly to `$v1-prove-work ...`.
## Usage
Typical invocations:
- Claude Code: `/v1-prove-work [url] [--pr NUMBER] [--no-upload]`
- Codex: invoke `v1-prove-work` from the skills menu or use `$v1-prove-work [url] [--pr NUMBER] [--no-upload]`
- `url` -- Override the target URL (default: inferred from context)
- `--pr NUMBER` -- PR number to embed the GIF into (default: auto-detected)
- `--no-upload` -- Save GIF locally without uploading to GitHub
## Workflow
### Step 1: Analyze Context
Determine what to demonstrate. Read the recent git diff to identify changed files:
```bash
git diff --name-only HEAD~1..HEAD 2>/dev/null || git diff --name-only --cached
```
**Decision tree:**
1. **User provided a URL** -> Use that URL directly
2. **Changed files include frontend code** (`.tsx`, `.jsx`, `.vue`, `.html`, `.css`, templates) -> Infer the route/page affected, construct localhost URL
3. **Changed files are backend only** (`.py`, `.rb`, `.go`, API routes with no views) -> Tell the user: "This change has no visual component. Skipping proof-of-work." and exit
4. **Changed files are config/infra, documentation, or otherwise have no visible output** -> Same as above, exit with message
5. **Cannot determine URL** -> Ask the user for the URL
When inferring the URL, look for:
- Route definitions in the changed files
- Component/page names that map to routes
- Test files that reference specific URLs
Default base URL: `http://localhost:3000` (override if project uses a different port).
Verify the URL is reachable before recording:
```bash
curl -s -o /dev/null -w "%{http_code}" http://localhost:3000/ROUTE
```
If the server is not running (connection refused), tell the user:
> "Dev server is not running on localhost:3000. Start it and run the `v1-prove-work` skill again."
### Step 2: Select Environment and Check Prerequisites
Do this only after Step 1 establishes a reachable visual target. Backend-only
and configuration-only changes exit before any environment or package setup.
Reuse a suitable project-local Python virtual environment if one exists;
otherwise create the default below. Use its Python for dependency checks,
package installation, Playwright browser setup, recording, and GIF conversion.
Environment setup is part of the requested recording workflow; follow the
user's existing scope and local policy without a redundant approval loop.
```bash
REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
# Set this to the existing project-local environment when reusing one.
VENV_DIR="$REPO_ROOT/.venv/prove-work"
if [ ! -x "$VENV_DIR/bin/python" ]; then
python3 -m venv "$VENV_DIR" || exit 1
fi
PYTHON="$VENV_DIR/bin/python"
if ! "$PYTHON" -c "import playwright; import av; from PIL import Image" 2>/dev/null; then
"$PYTHON" -m pip install playwright av pillow || exit 1
fi
if ! "$PYTHON" -c "from playwright.sync_api import sync_playwright; p=sync_playwright().start(); p.chromium.launch(headless=True).close(); p.stop()" 2>/dev/null; then
"$PYTHON" -m playwright install chromium || exit 1
fi
# gifsicle is optional; conversion works without it.
command -v gifsicle >/dev/null 2>&1 || echo "WARNING: gifsicle not found; optional optimization will be skipped."
printf '%s\n' "$PYTHON"
```
Record the emitted absolute Python path. Replace `<selected-python>` below
with that exact path in every fresh shell. If setup fails, report the failure
before recording. The converter reports missing dependencies and exits; it
does not install packages or change the active Python environment.
### Step 3: Generate Interaction Script
Create one directory for this run and keep its exact path through the following
steps. Write a Python Playwright script to `$RUN_DIR/interact.py` that
demonstrates the feature. Do not reuse or clear another run's directory.
```bash
RUN_DIR="$(mktemp -d "${TMPDIR:-/tmp}/v1-proof-run.XXXXXX")"
printf '%s\n' "$RUN_DIR"
```
Record the emitted absolute path. Shell variables do not persist across tool
calls. Replace `<recorded-run-directory>` below with that exact path in each
fresh shell; never create another directory for a later step.
Read [references/recording-patterns.md](references/recording-patterns.md) for the script template, interaction patterns, and timing guidelines. Use the template from that file as the starting point -- fill in the interaction section based on context analysis.
### Step 4: Execute Recording
```bash
RUN_DIR="<recorded-run-directory>"
PYTHON="<selected-python>"
# Run the interaction script
"$PYTHON" "$RUN_DIR/interact.py" "$RUN_DIR"
```
If the script fails, read the error output. Common issues:
- **Selector not found** -> Take a screenshot first to inspect the page, then adjust selectors
- **Timeout** -> Increase `wait_for_load_state` timeout or check if the server is responding
- **Navigation error** -> Verify the URL is correct
### Step 5: Convert to GIF
Run the conversion script:
Run this shell block with Bash. If your tool defaults to zsh or another shell,
select Bash first; cache glob handling depends on it.
```bash
RUN_DIR="<recorded-run-directory>"
PYTHON="<selected-python>"
REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
RESOLVER=""
for candidate in \
"$REPO_ROOT/plugins/v1tamins/scripts/resolve-skill-root.sh" \
"${CLAUDE_PLUGIN_ROOT:-}/scripts/resolve-skill-root.sh" \
"$HOME/.claude/skills/v1-prove-work/../../scripts/resolve-skill-root.sh" \
"$HOME/.codex/skills/v1-prove-work/../../scripts/resolve-skill-root.sh" \
"$HOME/.claude/plugins/cache"/*/v1tamins/*/scripts/resolve-skill-root.sh \
"$HOME/.codex/plugins/cache/v1tamins/v1tamins"/*/scripts/resolve-skill-root.sh; do
[ -x "$candidate" ] && RESOLVER="$candidate" && break
done
if [ -z "${RESOLVER:-}" ]; then
echo "ERROR: Could not find resolve-skill-root.sh" >&2
exit 1
fi
SKILL_DIR="$("$RESOLVER" v1-prove-work scripts/video_to_gif.py)"
"$PYTHON" "$SKILL_DIR/scripts/video_to_gif.py" \
--input "$RUN_DIR" \
--output "$RUN_DIR/demo.gif" \
--max-size-mb 10
```
The script:
1. Finds the most recent .webm in the input directory
2. Decodes frames via pyav at 10fps
3. Quantizes and assembles into GIF via Pillow
4. Optimizes with gifsicle (if available)
5. Progressively reduces quality if over 10MB
Every size-reduction attempt preserves the complete recording. If it cannot
fit, report the failure and make a shorter recording of the complete action
and its result. Inspect the GIF's important states and final feedback before
calling it proof; successful encoding alone does not establish the behavior.
### Step 6: Upload and Embed
**If `--no-upload` was specified:** Report the local path and stop.
**Auto-detect PR number** (if not provided):
```bash
gh pr view --json number --jq .number 2>/dev/null
```
**If a PR exists**, upload and embed:
```bash
RUN_DIR="<recorded-run-directory>"
PYTHON="<selected-python>"
# Reuse the $SKILL_DIR resolved in Step 5 (re-run that resolver block first if this is a fresh shell).
"$PYTHON" "$SKILL_DIR/scripts/video_to_gif.py" \
--input "$RUN_DIR" \
--output "$RUN_DIR/demo.gif" \
--max-size-mb 10 \
--upload \
--pr PR_NUMBER
```
**If no PR exists**, save locally and report:
```
GIF saved to: <actual-run-directory>/demo.gif
No open PR found for this branch. Run the `v1-prove-work` skill again with `--pr NUMBER` after creating a PR, or use `--no-upload` to keep the GIF local.
```
### Step 7: Report Result
After completion, report:
```
Proof of work recorded!
GIF: <actual-run-directory>/demo.gif (X.X MB)
URL: https://github.com/owner/repo/releases/download/media-assets/demo-pr42-20260224-143022.gif
PR: #42 -- ## Demo section updated
Recorded: [brief description of what was demonstrated]
```
## Examples
**Example 1: New settings page**
```
Input: /v1-prove-work
Diff: app/pages/settings.tsx, app/api/settings.ts
Output:
Proof of work recorded!
GIF: <actual-run-directory>/demo.gif (1.8 MB)
URL: https://github.com/acme/app/releases/download/media-assets/demo-pr12-20260224-091500.gif
PR: #12 -- ## Demo section updated
Recorded: Navigated to /settings, filled display name, clicked Save, showed success toast
```
**Example 2: Explicit URL with PR number**
```
Input: /v1-prove-work http://localhost:5173/dashboard --pr 27
Output:
Proof of work recorded!
GIF: <actual-run-directory>/demo.gif (2.4 MB)
URL: https://github.com/acme/app/releases/download/media-assets/demo-pr27-20260224-143000.gif
PR: #27 -- ## Demo section updated
Recorded: Navigated to /dashboard, scrolled through widgets, toggled dark mode
```
**Example 3: Backend-only change**
```
Input: /v1-prove-work
Diff: app/services/billing.py, tests/test_billing.py
Output: This change has no visual component. Skipping proof-of-work.
```
**Example 4: Local only**
```
Input: /v1-prove-work --no-upload
Output:
GIF saved to: <actual-run-directory>/demo.gif (1.1 MB)
```
## Error Handling
| Error | Action |
|---|---|
| Dev server not running | Report the error, suggest starting the server |
| Playwright not installed | Auto-install via pip + playwright install chromium |
| No .webm produced | Check interact.py output, report the error |
| GIF exceeds 10MB after all reductions | Report the size, suggest a shorter recording |
| gh CLI not authenticated | Report the error, suggest `gh auth login` |
| No visual changes detected | Tell the user, exit cleanly |
## Reference Files
- **[references/recording-patterns.md](references/recording-patterns.md)** -- What to record for each change type, interaction patterns, timing, script template
Pliki w paczce (4)
- SKILL.md 11 KB
- agents/openai.yaml 1 KB
- references/recording-patterns.md 4 KB
- scripts/video_to_gif.py 13 KB
Wersje
W bazie nie ma innych skilli o nazwie v1-prove-work.
Migawka bazy z 13.11.2026 · wersja paczki eef4e598e235 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 3 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100browser-recording
Nagrywa przepływ w przeglądarce jako wideo lub GIF (Playwright i ffmpeg do mp4 oraz GIF), by udokumentować animacje, przejścia i wieloetapowe interakcje, których nie pokaże zrzut ekranu. - 95demo-gif
Nagrywa, renderuje, optymalizuje i osadza demonstracyjny GIF w README repozytorium, aby pokazać narzędzie w działaniu. - 100record-browser-gif
Nagrywa interakcje w przeglądarce jako zoptymalizowane GIF-y i dołącza je do pull requestu, z wyborem metody nagrywania i kodowania. - 100record-e2e-gif
Nagrywa testy e2e w Playwright jako osobny GIF dla każdego przypadku testowego i zwraca tabelę markdown do opisu pull requestu. - 100pr-demo
Tworzy animowane dema w formie GIF do pull requestów i dokumentacji: nagrywa terminal w asciinema i konwertuje do GIF lub SVG pod osadzenie na GitHubie. - 100record-browser-gif
Nagrywa demonstracje interakcji w przeglądarce jako zoptymalizowane GIF-y i dołącza je do pull requestu przez gh, a w razie potrzeby przez osobną gałąź z zasobami.