agentleFS
ychampionychampion/ystack/skills/pr-proof/SKILL.md

pr-proof

Skill9 starsChanged 16 days agoMITView on GitHub

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?".

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 7 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Not needed for tier-0 changes (docs, tests only, renames): say "No runtime change" in the section.

    line 26
  2. Very specific:

    Write the claims first: one line each, in the words the PR title uses, each one something a run can show true or false.

    line 30
  3. Very specific:

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

    line 34
  4. Distinctive:

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

    line 38
  5. Very specific:

    Seeded, repeatable data: Write the commands so the reviewer can run them again (commands in the manifest becomes the Reproduce block).

    line 59
  6. Very specific:

    Put everything in proof/ (or another folder.

    line 72
  7. Distinctive:

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

    line 113
  8. Distinctive:

    The sha line says "the PR head": If it doesn't, the proof is for another commit: ask for a rerun.

    line 123
  9. Distinctive:

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

    line 133
  10. Distinctive:

    Every claim has evidence a reviewer can open.

    line 146
  11. Distinctive:

    No secrets, tokens or personal data in proof, ever.

    line 147

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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.

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:

SurfaceCaptureBackends
Web UIScreenshot of each claim's end state (before and after when it changed), a trace or short video of the flow, console errorsPlaywright (--trace on, page.screenshot, recordVideo), Chrome DevTools (recorder, performance panel, HAR export), gstack /browse, an agent-browser service such as OpenBase
APIThe request and response (status, headers that matter, body), with tokens redactedcurl or httpie output saved to .txt, a HAR, the test client's log
CLIThe command and its output, exit code includedscript, or cmd 2>&1 | tee proof/run.txt; echo "exit $?" >> proof/run.txt
PerformanceRepeated runs, before and after, same machine and data: timings.jsonhyperfine --export-json, Playwright timings, a benchmark harness
Background job or migrationLogs from start to end, row counts before and afterthe 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:

{
  "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": [ ... ] } } }.

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.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.