prove-it: a Claude Code skill for security changes
Make your agent prove a security fix with a real request before it says "done".

- What it does
- A Claude Code skill that fires before your agent calls an auth, permission, payment or database-access change finished. It makes the agent send the real request an attacker would send, see it succeed on the broken code, then see it fail after the fix.
- Who it is for
- Anyone shipping apps with an AI coding agent who has a login, a paywall, user data or an admin screen.
Why you want it
AI coding agents are good at writing a fix and a test that passes. For security, that is not enough: a test that checks the code text can pass while the live database still lets a signed-in user make themselves an admin. prove-it changes what "done" means. The agent has to send the real request an attacker would send, watch it work on the broken code, and watch it fail after the fix.
What is in the skill
| Part | What it makes the agent do |
|---|---|
| When it fires | Before calling auth, permissions, paywalls, payments, schema or storage changes done |
| The seven steps | Read the live system, probe red first, cover every write path, check docs, probe green after deploy, use zero-effect probes, get a second pass |
| What done means | Five things the agent must have before it says "fixed" |
| The claim rule | Never report a result it has not read back from the thing itself |
| Report shape | Code, test and deployment, reported separately |
Get the files
Everything on this page, ready to keep.
Install it
Claude Code loads skills from a skills folder: ~/.claude/skills/ for every project, or .claude/skills/ inside one repo. Download the ZIP below, then:
mkdir -p ~/.claude/skills
unzip prove-it-skill.zip -d ~/.claude/skills/
ls ~/.claude/skills/prove-it/SKILL.md
Start a new Claude Code session. The skill loads on its own when you work on auth, permissions or payments, or you can ask for it by name.
Use it
Ask for it when you hand the agent a security change:
Use the prove-it skill. Before you fix this, write a probe that sends the real request as a normal signed-in user, show me it succeeds now, then fix it and show me the same probe is refused.
Or when you get an audit finding:
Use prove-it on this finding. Read the live policy first, not the migration file, and tell me whether you could reproduce it.
The skill file
This is the full SKILL.md inside the ZIP. Copy it into ~/.claude/skills/prove-it/SKILL.md if you prefer.
---
name: prove-it
description: "Use before calling any change to auth, a database privilege, an entitlement, a payment path, a schema, or any security boundary done, and whenever verifying a security or audit finding. Turns 'the code says it is safe' into 'a real hostile request proved it is safe'."
---
# prove-it: verify against the running system, not the code text
The rule: **a claim about a security boundary is a hypothesis until a real request, sent the way an attacker would send it, reproduces the problem and then fails to.** Source-string tests, a clean static analysis and a passing unit suite are not evidence about privileges. They test what the code says; an attacker exercises what the database does.
Why it exists: in one real project, an owner-scoped row-level policy plus a column guard trigger still let any signed-in user set their own admin flag and move a timestamp back, several paid database functions were callable with the public key, and the first fix silently disabled a guard. Audits, hundreds of unit tests and two review passes missed all of it. A 15-minute probe that sent the real requests found each one on the first run.
## When this skill fires
Before you report done, or claim a finding is fixed or not exploitable, on anything that touches:
auth or sessions, a database privilege or row-level security policy, an entitlement or paywall gate, a payment or webhook path, a schema change, a function's security attribute, storage access, or admin capability.
Also whenever you are handed an audit finding (yours, a tool's, a teammate's) on one of those surfaces.
## The discipline (do every step)
1. **Read the live system, not the migration.** For a database claim, query the running catalog: `has_function_privilege('anon', oid, 'EXECUTE')`, `pg_policies`, `pg_default_acl`, the actual trigger and function bodies (`pg_get_functiondef`). Migration text and docs are claims to check, never the fact.
2. **Write the probe before the fix, and see it RED.** The probe sends the real hostile request as the real principal: create a throwaway account, sign in as it with the public key, and try the abuse (forge the column, call the function, delete-and-reinsert, download another user's file). A probe step that cannot fail is not a test: an insert probe that ignores duplicates on a row that already exists is a guaranteed no-op that "passes". Confirm each assertion goes red against the current, broken system first.
3. **Cover every write path, not just the one the finding named.** For a table: INSERT, UPDATE, DELETE-then-reINSERT, and upsert. An owner-delete policy plus a recreate is a real bypass even when UPDATE is locked. For a function: call it as anonymous AND as an ordinary signed-in user.
4. **Re-read a security attribute against the current official docs before you ship it.** In Postgres, `SECURITY DEFINER` makes `current_user` the function owner, so a role check inside the body is dead; use the caller's identity instead. Function EXECUTE starts granted to PUBLIC (and on some platforms to the anonymous and authenticated roles), so revoking one grant leaves the others. Verify with the vendor's current docs, never from memory. Changing a security attribute is a change to every check inside that function.
5. **Deploy, then run the probe GREEN.** Same probe, same requests, now refused. Keep it as a standing gate that runs after every future deploy touching this surface. If it cannot be automatic yet, say so and name where it should live.
6. **A mutating probe uses a zero-effect argument.** If proving reachability means calling a function that writes, pass an argument that changes nothing (a zero amount, an empty id list). The refusal is the assertion; the side effect must not happen. Do not rely on luck in the data.
7. **Two independent passes beat one careful pass.** A second reviewer with a different method (another model, an external tool, a fresh probe) often finds what the first missed. Invite the second pass on anything money- or auth-critical, and run its findings through steps 1 to 5.
## What done means here
You have: a live read of the current privilege, a probe that was red before and green after, coverage of every write path, the security attribute checked against current docs, and the probe wired (or a named place to wire it) as a standing gate. Anything short of that is "I believe it is fixed", which is not what you report.
## The claim rule (any domain)
**Never report an outcome you have not read back from the thing itself.** Every report says where the fact came from.
- **A wrapper's exit code is not the command's.** A background task can report exit code 0 while its own output says the export or the push failed. Read the output, or make the command's own last line the verdict (`echo "EXIT=$?"`), and quote that line.
- **A filename is not a timestamp.** Read the manifest or the data itself, not a name that looks like a date.
- **A plausible cause is not the cause.** Check before naming a cause, or say "I have not checked".
A test written after the fix and never seen red is the same error: it says "this works" without evidence the assertion can fail. Run every new test against the pre-fix code and say which ones went red.
## Report shape
State separately: **code** (what changed), **test** (the probe, red to green, with the exact requests), **deployment** (applied where, read back how). Never fold them together: "tests pass" has hidden a live hole more than once.
Good to know
- The probes create a throwaway account and send real requests. Run them against a development or test database first, never with real customer data at risk.
- Step 6 matters: a probe that calls a function that writes must pass an argument that changes nothing.
- The skill works with any Claude Code project. Database examples are written for Postgres, but the method fits any backend.