Skip to main content
skill CX Codex

post-patch-validation — Claude Code skill: prove a security patch

Runs exploits and regression checks against both the vulnerable and patched revisions, so you can see whether a security fix actually holds.

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

What post-patch-validation does

This skill takes an existing security patch and builds a validation plan around it. You pin the vulnerable base and the patched side, using commits where possible; uncommitted work gets turned into a binary patch file first, because the skill does not validate inside your working tree. The agent then reads the finding, the diff, callers, sibling paths and error handling before writing the checks.

A diff, an author name or the original proof of concept prove nothing on their own. So the plan needs at least one check of each kind: a control, the original exploit, a variant of the same root cause, unchanged behavior, a targeted regression, an adjacent-vulnerability check and the project suite. The bundled scripts/post_patch_validation.py offers scaffold, print-schema, validate-plan and run. Commands are argv arrays rather than shell strings, the runner pins locale, timezone and hash seed, and it never edits the original worktree. Exploit and variant checks must flush PPV_REACHED to stdout on both sides; a run without it leaves a marker_missing gap. Each check times out after 300 seconds by default, with 1 to 3600 allowed.

You need uv on the machine. Put complex setup in a script and call it through {plan_dir}. The runner only touches local code, so this is the wrong tool for a remote host or production, and running a repository's test suite still needs the owner's go-ahead.

What it helps with

  • Show that a patch stops the original exploit, not just that it builds
  • Catch sibling paths to the same root cause the fix missed
  • Detect behavior changes caused by a security edit
  • Spot a new weakness the patch itself introduced
  • Hand the author failing checks and logs before the next revision

Example prompts for the agent

  • Validate the patch in patch.diff against commit a1b2c3d, scaffold a plan and run it
  • Scaffold a validation plan for this fix PR and add a variant that enters through a different input
  • Re-run the earlier validation and list the checks that came back as gaps

How to install post-patch-validation

1Skills CLI (Vercel)

npx skills add trailofbits/skills --skill post-patch-validation -a claude-code

2Manually: put the files in place

~/.claude/skills/post-patch-validation/SKILL.md

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

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about post-patch-validation

How do I install post-patch-validation in Claude Code?

Run npx skills add trailofbits/skills --skill post-patch-validation -a claude-code, then confirm ~/.claude/skills/post-patch-validation/SKILL.md exists.

What does post-patch-validation do?

It builds an evidence plan for a finished security patch and executes it on the vulnerable and patched revisions. The output is result.json and report.md listing failures and coverage gaps.

Does it work on a remote server or production?

No. It executes local code and tests only, and running a repository's suite requires the owner's authorization.

Similar skills

Everything for Security →

From the same set77

slicing-code-context Extracts bounded, graph-informed source code slices via Trailmark and delegates analysis to a smaller subagent. Useful when running focused tasks on local or constrained models. CX Codex +1 1,300installs github-triage This skill reviews a repository’s open GitHub issues and pull requests, links pending fixes to issues, and prepares local priority and change-size estimates. CX Codex +1 1,300installs open-sourcing Walks a repository through the pre-release checklist: secret audit, license, docs, CI and packaging. CX Codex +1 1,300installs modern-cpp Directs C++ development toward C++20/23/26 idioms, replacing dangerous raw pointers, legacy macros, and SFINAE boilerplate with memory-safe patterns. CX Codex +1 1,200installs writing-lean-proofs Guides Lean 4 proof writing and review using Mathlib conventions. Use it when formalising theorems, restructuring tactic code, or adding project checks. CX Codex +1 1,200installs goal-prompt Generates copy-paste /goal directives for Claude Code and Codex with verified stop conditions and invariant checks. CX Codex +1 1,100installs pr-improver pr-improver runs repeated PR review and fix passes on the current branch until blocking findings are cleared. Use it before opening or updating a pull request. CX Codex +1 995installs review-walkthrough Turns the current branch diff into an HTML walkthrough with logical steps, explanations and review findings. Run it by hand when you want to read a change properly. CX Codex +1 671installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor