lucidpaths/claude.md-workflow/adversarial-review
Claude Code and agent skill by lucidpaths/claude.md-workflow
- community
Checking that the SKILL.md file is still in the repository.
Three-pass adversarial verification that finds real bugs in a change before merge — an overclaiming bug-hunt, an overclaiming disproof, then adjudication. Use when the user runs /adversarial-review or asks to adversarially review, stress-test, or prove the correctness of a diff, function, smart contract, or PR before merging. Mandatory before merging smart-contract / fund-release changes and any complex change (crosses modules; changes a contract, schema, guardrail, permission or persistence; or an agent rule on a guardrail, permission, merge, deploy, external write or deletion). A smaller change gets one fresh-context pass over its diff against its spec instead. Run by a fresh agent, never in the author's context.
Install
npx vskill@latest install lucidpaths/claude.md-workflow/adversarial-reviewSKILL.md
The same SKILL.md was published earlier as lucidpaths/claude.md-workflow/adversarial-review.
Adversarial Review — Three-Pass Verification
Exploit sycophancy bias against itself to find real bugs. Models find what they think you want, so run two opposing passes that each overclaim in opposite directions, then adjudicate. Opposing passes expose assumptions a single pass keeps; surviving the disproof is not confirmation — a finding counts when it carries its triggering input.
Who runs it: a fresh agent that holds no part of the author's conversation (a subagent briefed with the diff and the spec), never the author's own context: an author reviewing in its own context agrees with itself.
Before you start — ground the review
Do this first, every time. Skipping it is how reviews miss defects the diff itself shows.
- Pin the candidate, then read the actual code. Record the base and head commit and any uncommitted changes, and review that exact diff; an edit made after the review starts invalidates the findings and test results on the files it touches. Pull the real
git diff, open the changed files, read the function signatures and callers. Never review from memory, from the PR description, or from how similar code "usually" looks. - Define "correct" for *this* change. State the concrete success conditions and the invariants it must not break — not generic ones. (e.g. "90/10 split stays exact," "no state transition skips Verified," "no revert path leaves funds locked.")
- List the high-risk surfaces it touches: money / fund release, access control, state machines, external calls & reentrancy, integer math / overflow, error and revert paths, concurrency, auth flows, anything refactored since the repository's last release tag (
git log <tag>..HEAD -- <file>; with no tag, the branch's own commits). - Hunt the structural defects tests rarely catch: a box boundary crossed (core importing an adapter, an inbound adapter reaching the composition root), a second place that wires the same dependency, a second source of truth for one list or definition, a contract changed without its version step; and on every error path: a failure returned as an empty result ("none" where the read failed), a silent fallback or default (
/unverified), an error that does not say what happened, why, and what to do. Standalone default for the fallback hunt: search the diff for||,??,catch, default values and demo or mock modes, and on each error path check that a failed read yields an error, never an empty or plausible value. If/unverifiedis installed, it replaces this default.
Pass 1: Bug Hunter (overclaim bias)
Adopt an aggressive bug-finding stance. Be exhaustive — cast the widest net you can; over-reporting here is the point, Pass 2 will prune it. Report every potential issue with:
- File and line
- Severity: critical when the scenario breaks a success condition or invariant of step 2 on a high-risk surface of step 3; medium when it breaks one elsewhere; low when it breaks none
- What could go wrong
- Proof — a concrete scenario or input that triggers it. No proof, no entry.
Order bias: when hunting across more than one file, or ranking more than one finding, randomize the order you take them in. Models systematically favour items by their position in context rather than by quality — first and last items get unfair treatment. (Source: Wang et al. 2023)
Pass 2: Adversarial Disprover (underclaim bias)
Switch roles. For each Pass-1 issue, try to disprove it:
- Is it actually handled elsewhere (guard, modifier, earlier check)?
- Is the scenario unreachable given the code's real constraints?
- Does a framework / library / compiler guarantee already prevent it?
Be skeptical but honest: only disprove what you can actually disprove, with a citation to the specific code that handles it. Bias toward caution — wrongly dismissing a real bug costs far more than carrying a false positive into Pass 3 — so an issue you cannot disprove with such a citation survives to the verdict.
Pass 3: Final Verdict
| Issue | Bug Hunter said | Disprover said | Verdict | |
|---|---|---|---|---|
| #1 | Critical: X | Disproved: line N handles it | False positive | |
| #2 | Critical: Y | Could not disprove | Unresolved until a reproduction or a line-by-line trace in the actual code supports it | |
| #3 | Critical: Z | Reproduced: input I gives wrong output O | Confirmed |
Then output a clean report: confirmed defects ranked by severity, each with the concrete triggering input, the evidence (state whether it rests on execution or on a line-by-line trace in the actual code) and the minimal fix; then a separate residual risk section listing every unresolved concern. Never silently drop an unresolved concern and never promote it to confirmed. Failure to refute is not proof.
Run this final pass as the person who inherits the code and gets paged when it breaks at 3am — not as its author. The author wants it to be done; the inheritor wants it to be right.
Separate the three categories explicitly and keep them separate in the report:
- Verified — you traced it in the actual code and can point to the line.
- Inferred — follows from premises you've stated, but you didn't run it.
- Assumed — depends on something unverified; flag it as a residual risk.
Done when
The defined success conditions are demonstrably met — every confirmed issue has a concrete triggering input and a fix, and every "disproved" issue cites the code that handles it. Stop when you can show it's right, not when it looks finished.
Closing block (required)
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingclaude-starter-kit/.claude/skills/adversarial-review/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/lucidpaths/claude.md-workflow/adversarial-review)