Skip to content
Back to skills

Pr Proof

ASecurity

Run the change for real and attach the proof to the PR: screenshots, a video or trace, timings JSON and logs, made on the PR's head commit, so a reviewer checks behaviour first and reads code second. Works with any browser or runtime backend (Playwright traces, Chrome DevTools, gstack /browse, an agent-browser service such as OpenBase, or plain CLI and HTTP runs). Includes a "Proof" section for the PR template, a script that builds it from a proof folder and refuses stale or leaky proof, and ...

  • 9 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 28, 2026
ai-agentsrustgobashsqlrailsgitapibackendsecurityperformance

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned November 28, 2026

npx -y skills add ychampion/ystack --skill pr-proof --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Pr Proof?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Pr Proof
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ychampion-pr-proof/badge)](https://www.skillsdirectory.com/skills/ychampion-pr-proof)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: pr-proof
description: >-
  Run the change for real and attach the proof to the PR: screenshots, a video or trace, timings JSON and
  logs, made on the PR's head commit, so a reviewer checks behaviour first and reads code second. Works
  with any browser or runtime backend (Playwright traces, Chrome DevTools, gstack /browse, an agent-browser
  service such as OpenBase, or plain CLI and HTTP runs). Includes a "Proof" section for the PR template, a
  script that builds it from a proof folder and refuses stale or leaky proof, and what reviewers check
  first. Use before opening or updating a PR that changes runtime behaviour, for "attach proof", "show it
  works", "screenshots for the PR", "before and after timings", or when a reviewer asks "did you run it?".
---

# PR proof

A reviewer who sees the change working on the exact commit can spend their time on what the proof can't
show. A reviewer who sees only a diff has to run it in their head. This skill makes the run real, saves
what it showed, and puts it in the PR where it is checked first.

It pairs with `guardrails` (proof is one of its self-merge gates) and `pr` (which writes the rest of the
PR body). Paths below are relative to this skill's folder.

## When it applies

- Any PR that changes what users, callers or operators see: UI, API responses, CLI output, performance,
  error handling, migrations.
- Not needed for tier-0 changes (docs, tests only, renames): say "No runtime change" in the section.

## 1. Decide what to prove

Write the claims first: one line each, in the words the PR title uses, each one something a run can show
true or false. "Checkout shows the saved card", "`GET /v1/me` returns 401 without a token", "search p95
drops below 200 ms". Add one claim for the main failure path, not only the happy path.

Write down what the proof will not cover (`notShown`): browsers, platforms, data sizes, roles you didn't run.

## 2. Run it on the head commit

Commit first. Proof made from a dirty tree or an older commit doesn't count: the script refuses it.

```bash
git status --porcelain        # must be empty (the proof folder aside)
git rev-parse HEAD            # this sha goes in the manifest
```

Capture by surface, with whatever backend you have:

| Surface | Capture | Backends |
| --- | --- | --- |
| Web UI | Screenshot of each claim's end state (before and after when it changed), a trace or short video of the flow, console errors | Playwright (`--trace on`, `page.screenshot`, `recordVideo`), Chrome DevTools (recorder, performance panel, HAR export), gstack `/browse`, an agent-browser service such as OpenBase |
| API | The request and response (status, headers that matter, body), with tokens redacted | curl or httpie output saved to `.txt`, a HAR, the test client's log |
| CLI | The command and its output, exit code included | `script`, or `cmd 2>&1 \| tee proof/run.txt; echo "exit $?" >> proof/run.txt` |
| Performance | Repeated runs, before and after, same machine and data: `timings.json` | hyperfine `--export-json`, Playwright timings, a benchmark harness |
| Background job or migration | Logs from start to end, row counts before and after | the job's log, a SQL count saved to `.txt` |

Rules for capture:

- **Run the real thing**: the built app, the real binary, a real browser. A unit test's output is a test,
  not proof; link it, but capture the run too.
- **Seeded, repeatable data.** Write the commands so the reviewer can run them again (`commands` in the
  manifest becomes the Reproduce block).
- **At least 5 runs per timing**, before and after, on the same machine. The section reports median and p95.
- **Redact before saving.** Tokens, cookies, keys and personal data never go into proof files. The
  script scans text files and the manifest itself (commands, environment, claims go into the PR body) for
  common key and token shapes and refuses them, but it can't catch everything. Anything that isn't a
  picture, video or text file (a Playwright `trace.zip`, other archives, binaries) can't be scanned and may
  hold request headers and cookies: open it, confirm it's clean, then set `"unscannedChecked": true`, or the
  script refuses the proof.
- **Failing claim? Fix the code, not the claim.** Proof shows `pass` for every claim or the PR isn't ready.

## 3. Write the manifest and build the section

Put everything in `proof/` (or another folder; pass `--dir`), with `proof/manifest.json`:

```json
{
  "sha": "<git rev-parse HEAD>",
  "ran": "2026-11-28T10:00:00Z",
  "environment": "Chromium 141, local build, seeded test data",
  "commands": ["bun run dev", "bunx playwright test e2e/checkout.spec.ts --trace on"],
  "claims": [
    { "claim": "Checkout shows the saved card", "result": "pass", "evidence": ["checkout-after.png", "trace.zip"] },
    { "claim": "An expired card shows the update prompt", "result": "pass", "evidence": ["expired.png"] }
  ],
  "timings": "timings.json",
  "notShown": ["Safari", "mobile layout"],
  "unscannedChecked": true
}
```

`timings.json`: `{ "metrics": { "<name>": { "unit": "ms", "before": [ ... ], "after": [ ... ] } } }`.

```bash
bun scripts/proof-section.ts --dir proof --base-url <where the files are published> --out proof/section.md
```

It exits 1 and lists the reasons when the proof doesn't count: a different sha from `HEAD` (or `--head`),
uncommitted changes, a claim without evidence or not `pass`, a missing file or one outside the folder,
or what looks like a key or token in a text file. Otherwise it writes the section: a claims table with
links, the screenshots inline, a median and p95 timings table, the Reproduce commands and "Not shown".

## 4. Attach the files

The PR body links to the files; pick one place to publish them and use its URL as `--base-url`:

- **CI artifact:** a job on the PR runs the same commands and uploads `proof/` with
  `actions/upload-artifact`. Best when the proof can run in CI: the reviewer trusts CI's run more than
  the author's. Artifact links need a GitHub login and expire.
- **A proof branch:** push `proof/` to a branch such as `proof/pr-<n>` (never the PR branch, so it never
  merges), and use `https://raw.githubusercontent.com/<owner>/<repo>/proof/pr-<n>/` as the base URL. Images
  then show inline. Delete the branch after merge. Private repos need a logged-in viewer.
- **Drag and drop** images into the PR description in the browser, when a person is opening the PR.

Never commit proof files to the PR branch itself, and never upload proof to a public host from a private repo.

Paste `proof/section.md` into the PR body under "## Proof" (`proof-template.md` has the empty section for
`.github/pull_request_template.md`). Update it whenever the head changes: proof for an older commit is
marked stale by the sha line.

## 5. What a reviewer checks first

In this order, before reading code:

1. **The sha line says "the PR head".** If it doesn't, the proof is for another commit: ask for a rerun.
2. **Each claim matches the PR's stated purpose**, and the failure path has one. Missing claims are the
   first review comment.
3. **The evidence shows the claim**: the screenshot shows the saved card; the response is a 401; the trace
   reaches the end state without console errors.
4. **Timings:** enough runs, same machine, and the change is bigger than the spread between runs.
5. **"Not shown"**: decide whether any of it matters for this change; if so, ask for it.
6. **Then read the code**, spending the time on what the proof can't show: error paths, concurrency,
   security, the ledger classes in play (`guardrails` skill).

If the proof contradicts the code (the screenshot can't come from this diff), stop and ask; don't review
around it.

## Report

```
Proof: <n> claims, all pass, on <sha12> (PR head)   Files: <base URL>
Backends: <Playwright | DevTools | /browse | agent browser | CLI>   Not shown: <list or "nothing">
```

## Rules

- No "it works" without a run on the head commit.
- Every claim has evidence a reviewer can open; every timing has repeated runs.
- No secrets, tokens or personal data in proof, ever.
- Proof goes stale when the head moves: rebuild the section after every push that changes behaviour.

Files in this skill

  • SKILL.md8 KB
  • proof-template.md881 B
  • scripts/proof-section.ts8.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.