Nestor G Pestelos Jr · Writing · Print
An Adversarial Review Prompt for Claude Code and Codex
The adversarial review prompt I run as a Claude Code skill, with an install path for Codex. Point it at a plan or diff, and loop until it says PROCEED. Template repository: ngpestelos/adversarial-review.
Ask an AI agent to review a plan or diff and it defaults to sycophancy. In July I explained why in 'Tell Me What's Wrong With It' Isn't a Review. Readers asked for the raw prompt file. Here is the template I run in Claude Code, with an install path for Codex.
What the template does
The template consists of two markdown files: the skill definition (SKILL.md) and the output contract (findings-format.md). Together they cover five core areas:
- Independence check. Self-review is the weakest mode. Low stakes and not self-authored: one inline pass. High stakes or drafted this session: parallel read-only reviewers. You can override the reviewer route in the prompt's first line.
- Verify before criticize. Every finding cites a checked fact: file and line for code, source of truth for everything else. Partial reviews never issue a clean verdict.
- Ten evaluation lenses. Goals, assumptions, failure modes, gaps, reversibility, verification, simpler alternatives, evidence, second-order effects, and security. Reviewers must state a reason for any skipped lens.
- Structured verdicts. Output is restricted to PROCEED, PROCEED WITH CHANGES, or REWORK, with findings ranked Blocker, Major, Minor, or Nit. Findings must cite concrete failure paths (such as if orders is empty, line 42 divides by zero) rather than abstract labels like fragile.
- A stop condition. Only the user can accept a Major finding. Accepted Majors sit in a ledger carried between passes. A finding that survives three passes unchanged halts the loop for escalation.
Install
Clone the repository:
git clone https://github.com/ngpestelos/adversarial-review.git
Claude Code. Copy the files into ~/.claude/skills/adversarial-review/:
mkdir -p ~/.claude/skills/adversarial-review
cp adversarial-review/{SKILL.md,findings-format.md} ~/.claude/skills/adversarial-review/
Invoke with /adversarial-review <path>.
Codex. Copy both files to ~/.codex/skills/adversarial-review/, or paste their contents into AGENTS.md under their own headings.
Plain chat. Paste the Verify, Lenses, and Output sections from SKILL.md. The independence and loop parts need an agent that can spawn reviewers; the rest works in any chat window.
Run
In Claude Code:
/adversarial-review plans/migration.md
In Codex:
Review plans/migration.md using the adversarial review prompt.
In plain web chat: paste the template sections directly into the prompt alongside your plan or diff.
Read the VERDICT: line, apply fixes or accept findings, and run again until the output returns PROCEED.
If you script or automate the loop, match the verdict as a whole token: PROCEED is a prefix of PROCEED WITH CHANGES. A reviewer that returns prose instead of the structured format leaves its lenses UNREVIEWED. Do not synthesize around the gap. False PROCEED tokens allow defects to pass through unexamined.
What I cut from the private version
My working file is about 170 lines. Around sixty of them are incident notes: defect classes from my own review sweeps, dated, with which model caught what. The public template retains only the review mechanism. For the defect classes and failure modes, see The Bugs That Hide Between Your Agents.
Limits
In autonomous agent runs, the harness does not parse the verdict; the model reads the token and controls the loop. In an outer shell or CI script, the script parses the token as a string. When an agent cannot spawn parallel reviewers, the template falls back to sequential passes with a fresh adversary and flags reduced independence.
I have run this file in Claude Code since June. I have not tested it in Codex; the Codex install path follows its documented skills layout and remains unverified.
Files
Repository: ngpestelos/adversarial-review
SKILL.md: the template.findings-format.md: the output contract and verdict rules.README.md: install paths and repository overview.