implement-patch — Claude Code skill: what it does, how to install
implement-patch — a Claude Code skill for fixing confirmed bugs at the invariant level. Enforces variant searches, upfront regression tests, and isolated patch records.
CC-BY-SA-4.0 677 installs ★ 8,341 updated 2026-10-24
npx skills add trailofbits/skills --skill implement-patch -a claude-codeWhat implement-patch does
The skill guides an agent through a disciplined bug-fixing protocol once an issue is confirmed. It verifies the repair scope before editing using a uv run validation gate, then locates every matching invariant breach across the boundary. Writing a failing regression test against the project baseline is mandatory before touching production code.
Changes stay scoped to the smallest reviewable fix. The procedure requires exactly one local git commit and forbids pushing branches or opening pull requests. All outputs are exported to separate fix.patch and tests.patch files, alongside a structured patch.json capturing commit hashes and test suite counts.
What it helps with
- resolve confirmed bugs by repairing violated invariants
- discover related flaw variants across the codebase
- capture a failing regression test before patching
- export isolated diff files alongside patch.json metadata
Example prompts for the agent
- Apply an invariant fix for the confirmed parser bug using implement-patch
- Search for all variants of the state desync issue and record patch.json
- Produce a single local commit and regression test for the session leak
How to install implement-patch
1Skills CLI (Vercel)
npx skills add trailofbits/skills --skill implement-patch -a claude-code2Manually: put the files in place
~/.claude/skills/implement-patch/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/implement-patch/
1Skills CLI (Vercel)
npx skills add trailofbits/skills --skill implement-patch -a codex2Manually: put the files in place
.agents/skills/implement-patch/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add trailofbits/skills --skill implement-patch -a cursor2Manually: put the files in place
.cursor/skills/implement-patch/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install trailofbits/skills plugins/patching-bugs/skills/implement-patch2Manually: put the files in place
.github/skills/implement-patch/SKILL.md1Skills CLI (Vercel)
npx skills add trailofbits/skills --skill implement-patch -a gemini-cli2Platform CLI
gemini skills install https://github.com/trailofbits/skills --path plugins/patching-bugs/skills/implement-patchManually: put the files in place
.devin/skills/implement-patch/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add trailofbits/skills --skill implement-patch -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about implement-patch
How to install implement-patch in Claude Code?
Run npx skills add trailofbits/skills --skill implement-patch -a claude-code in your terminal.
What does implement-patch do?
It structures bug fixing into sequential gates: scope verification, invariant repair, regression testing, and creating isolated patch files with run metrics.
What is required to run implement-patch?
A working uv installation is needed to execute pre-repair record validator checks on the target directory.