Use when a local security patch commit needs independent scoped and three-arm proof.
Getting started
Full instructionsInstall the skill, then ask your AI tool for the task in plain words. The full SKILL.md below shows what it covers.
Instructions: SKILL.mdv1.0.0
Prove Patch
Use the original baseline, final patch commit, declared repair_scope, and unchanged
reproduction package. Read the record contract. Do not
edit the patch or validate an uncommitted tree. Return failures for a new attempt.
Before target commands, follow its project guidance.
- Review the scoped cases and the patch without the patcher's conclusion. Execute
each planned input on clean baseline and patched trees with the same retained
harness source and command. The harness must print exactly one
PATCH_CASE {"input": ..., "actual": ...}from the exercised input and observed
result, then printPATCH_REACHEDas its final stdout line immediately before
the assertion. Representatives must fail on the
baseline and pass on the patch. Valid controls must pass on both. Keep the
baseline and patched stdout, stderr, exit status, elapsed time, command, and
harness source underreceipts/. A timeout, setup failure, missing marker,
mismatched input, or ambiguous observation is an evidence gap. A trustworthy
patched failure is a finding. Never relabel a gap as a pass. - Run relevant project checks on the patch and retain the same raw receipts. Use
baseline comparison for behavior checks and to attribute failed project checks;
a passing patched suite may omit a baseline run. Include focused tests, regression
and security checks where relevant. Record specific unproven limits; an empty
list leaves the result inconclusive. - Run the three-arm helper with the proof-type recipe in
the record contract,reproduce.baseline_commit, and finalpatch_commit.
Require the baseline to fail, patch to pass, and complete baseline revert to
fail again. Requirereceipts/source.jsonto identify the pinned commits and
the reverted tree to equal the original baseline tree. Require the type's build
identity result. Retain all source-tree,
build, and execution receipts. - Write
prove.jsonand a final manifest covering it and every receipt. Run
uv run --no-project <script> manifest <prove-attempt-dir>and then
uv run --no-project <script> check <run-dir>with the validator.
Independently inspect the native proof assessment
and raw receipts before reporting a result. A complete proof has no findings or
gaps. Return exact failures and receipt paths to the orchestrator.
Prove record schema:
{
"schema_version": 2,
"attempt": 1,
"failure_type": "runtime",
"baseline_commit": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"patch_commit": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
"reverted": "pass",
"build_identity": "pass",
"hashes": {
"baseline": "1111111111111111111111111111111111111111111111111111111111111111",
"patched": "2222222222222222222222222222222222222222222222222222222222222222",
"reverted": "1111111111111111111111111111111111111111111111111111111111111111"
},
"reverted_hash_note": null,
"cases": [{
"check_id": "reported-input",
"argv": ["python", "receipts/case.py", "reported-input"],
"source": "receipts/case.py",
"runs": {
"baseline": {"exit_code": 1, "elapsed_ms": 15, "stdout": "receipts/case-base.stdout", "stderr": "receipts/case-base.stderr"},
"patched": {"exit_code": 0, "elapsed_ms": 14, "stdout": "receipts/case-patched.stdout", "stderr": "receipts/case-patched.stderr"}
}
}],
"project_checks": [{
"check_id": "focused-suite",
"kind": "suite",
"argv": ["pytest", "tests/test_upload.py"],
"baseline": null,
"patched": {"exit_code": 0, "elapsed_ms": 860, "stdout": "receipts/suite.stdout", "stderr": "receipts/suite.stderr"}
}],
"unproven": ["Inputs outside the declared boundary were not assessed."],
"agent": "prover-1"
}
For a bounded class, include at least two distinct failing representatives and a
valid control. The record must cover every planned case by unique check_id.
Use the same harness and command on both commits; do not reveal the side to the
harness or change expectations by side. Review the selected cases for relevance;
retained receipts establish only what those cases exercised.
Explore more skills
Browse all- Variant AnalysisHunts for the other instances of a bug already found — the variants of one root cause across a codebase. Use…
- Modern CppGuides C++ code toward modern idioms (C++20/23/26). Use when writing new C++ code, modernizing legacy patterns, or…
- codeqlScans a codebase for security vulnerabilities using CodeQL's interprocedural data flow and taint tracking analysis.…
- Firebase Apk ScannerScans Android APKs for Firebase security misconfigurations including open databases, storage buckets, authentication…
- Code ImproverRuns an autonomous review-and-fix improvement loop over any code target — a skill, plugin, module, or directory — using…
- Dimensional AnalysisAudits code for unit and decimal-scaling bugs and annotates it with dimensional comments recording the units of each…
Security
Signing
SignedSLSA L2- Signed by
- skills-hub.ai distributor
- Method
- Distributor-signed by skills-hub.aiSigned with the skills-hub.ai Ed25519 distributor key over this exact slug, version and content. Check it with `npx @skills-hub-ai/cli verify`.
- Key
- skills-hub-ed25519-2026-11
- Signed
Reviews (0)
More from Trail of Bits
View source →Frequently asked questions about prove-patch
What does the prove-patch skill do?
Use when a local security patch commit needs independent scoped and three-arm proof. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.
How do I install the prove-patch skill?
Run `npx @skills-hub-ai/cli install trail-of-bits-prove-patch` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/trail-of-bits-prove-patch/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.
Which AI tools does prove-patch work with?
prove-patch runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.
Is the prove-patch skill free?
Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.
How do I use prove-patch after installing it?
In Claude Code, type `/trail-of-bits-prove-patch` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.
Can I share the prove-patch skill with my team?
Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.
Badge for your README
Show that this skill is on Skills Hub. The badge links back to this page and shows the live install count.
[](https://skills-hub.ai/skills/trail-of-bits-prove-patch)<a href="https://skills-hub.ai/skills/trail-of-bits-prove-patch"><img src="https://skills-hub.ai/api/badges/skill/trail-of-bits-prove-patch" alt="Install on Skills Hub"></a>More options in the badge docs.