# prove-patch

prove-patch — a skill for Claude Code validates a local security patch with scoped cases and a three-arm comparison. It runs when a patch commit needs independent proof.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 676 installs · ★ 8341 repo stars
- Author: trailofbits
- License: CC-BY-SA-4.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/trailofbits/skills/tree/HEAD/plugins/patching-bugs/skills/prove-patch/SKILL.md
- Updated: 2026-10-24
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/prove-patch

## What it does

The skill tests a security patch against the original baseline and the final patch commit, keeping the harness, inputs, and command consistent between both trees. Cases inside the declared scope should fail before the fix and pass after it; valid controls should pass on both sides. Raw output, exit status, timing, commands, and harness source go into `receipts/`.

It also checks the reverted tree: baseline must fail, the patch must pass, and a complete revert must fail again. Project checks are retained, then `prove.json` and a manifest are created and validated with `uv run --no-project <script>`. An uncommitted tree is not validated; setup errors, timeouts, missing markers, and ambiguous observations become evidence gaps.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add trailofbits/skills --skill prove-patch -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/prove-patch/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/prove-patch/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add trailofbits/skills --skill prove-patch -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/prove-patch/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add trailofbits/skills --skill prove-patch -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/prove-patch/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install trailofbits/skills plugins/patching-bugs/skills/prove-patch
```

2. **Manually: put the files in place**
- File: `.github/skills/prove-patch/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add trailofbits/skills --skill prove-patch -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/trailofbits/skills --path plugins/patching-bugs/skills/prove-patch
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/prove-patch/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add trailofbits/skills --skill prove-patch -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/trailofbits/skills/tree/HEAD/plugins/patching-bugs/skills/prove-patch/SKILL.md

## When to use it
- verify a fix across baseline and patch commits
- compare failing cases with a valid control
- confirm behavior after a complete patch revert
- retain raw test output and harness commands
- create and validate the proof manifest

## Example prompts
- Check this local security patch against the baseline and patch commits, and keep every receipt in `receipts/`.
- Run the three-arm proof: baseline should fail, the patch should pass, and the reverted tree should fail again.
- Create `prove.json`, build the manifest, and validate it with `uv run --no-project <script>`.

## Similar
- [mantis-patch](https://affpapa.org/en/nevibecode/skills/mantis-patch.md) — skill · 1600 installs
- [threat-patch](https://affpapa.org/en/nevibecode/skills/threat-patch.md) — skill · 232 installs
- [create-prove](https://affpapa.org/en/nevibecode/skills/create-prove.md) — skill · ★ 797 repo stars
- [patch-verifier](https://affpapa.org/en/nevibecode/agents/patch-verifier.md) — subagent · ★ 47914 repo stars
- [patch-creation](https://affpapa.org/en/nevibecode/skills/patch-creation.md) — skill · ★ 2619 repo stars
- [patch-generator](https://affpapa.org/en/nevibecode/agents/patch-generator.md) — subagent · ★ 47914 repo stars

From the same set: [trailofbits/skills](https://affpapa.org/en/nevibecode/by/trailofbits/skills.md) — 95 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
