Skip to main content
skill CX Codex

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

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add trailofbits/skills --skill implement-patch -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/implement-patch/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/implement-patch/

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.

Similar skills

All skills for Security →

From the same set95

The whole set →
patching-bugs The patching-bugs skill takes one known bug through reproduction, a patch, independent proof, regression checks, and a local report. CX Codex +1 699installs reproduce-bug The reproduce-bug Claude Code skill checks whether a named compiler or runtime bug can be reproduced in a local repository. It runs against the project baseline before any edits. CX Codex +1 692installs validate-bug validate-bug — a skill for Claude Code that runs an independent rerun and judgment of a bug PoC package before patching. CX Codex +1 691installs regression-hunt regression-hunt — a skill for Claude Code that investigates regressions in PRs and commits. It coordinates error-hunting campaigns and resumes saved progress. CX Codex +1 685installs 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. CX Codex +1 676installs hunt-regressions hunt-regressions — a skill for Claude Code that discovers potential regressions before reproduction. Runs when analyzing code changes and their callers. CX Codex +1 675installs reproduce-regression The reproduce-regression Claude Code skill reproduces a regression candidate on live systems before and after a change. It builds a PoC and compares both versions using the same input. CX Codex +1 671installs report-regressions report-regressions — a skill for Claude Code builds regression reports from saved campaign decisions and links findings to evidence. It runs when a campaign report is created or refreshed. CX Codex +1 670installs

Project sponsors

Companies that keep this analytics open