/adversarial-review:adversarial-reviewfrom adversarial-review
Runs adversarial code review with Optimizer and Skeptic subagents, supporting auto-fix, path scoping, and cross-provider comparison with Claude.
Ships in adversarial-review. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Run an adversarial review of the current branch using Codex-native workflows.
Use this skill only in Codex. The Claude Code slash command lives in claude/skills/run/SKILL.md and uses Claude-specific Agent({...}) orchestration. Do not try to translate those calls literally. The shared cross-provider contract (artifact layout, finding/verdict schemas, severity and signal-gate definitions, lane preamble template) is normatively specified in docs/review-protocol.md — when changing a shared definition, edit that document first, then sync the copies embedded here.
$adversarial-review # auto-fix (default), auto-detect PR
$adversarial-review 405 # auto-fix, specific PR
$adversarial-review --no-fix # review only, no code modifications
$adversarial-review --paths "src/api/**,src/auth/**" # review only branch changes under these paths
$adversarial-review --compare-claude # compare Codex findings with Claude artifacts
Arguments:
--no-fix runs report-only mode. Without it, auto-fix mode may apply high-confidence Critical/Major fixes.--paths <glob>[,<glob>...] scopes the review to branch changes in matching files instead of the entire branch diff.--compare-claude treats existing .reviews/<branch_safe>/optimizer-merged.md, skeptic-merged.md, or summary.md files as prior Claude review evidence and asks Codex reviewers to confirm, dispute, and find missed issues.Scope handling for --paths: split the value on commas into [paths]. Translate each pattern into one git pathspec — wrap it as ':(glob)<pattern>' when it contains *, ?, or [; otherwise pass it bare (a directory prefix matches everything beneath it). Store the space-joined quoted pathspecs as [pathspec], append -- [pathspec] to every git diff / git log command in this workflow, pass the same scope restriction to every subagent prompt, and report no findings outside the scope (reading out-of-scope code for context is fine). Every report starts with a Scope: [paths] line (Scope: full branch when unscoped). If git diff --name-only origin/[base]...HEAD -- [pathspec] is empty, report that no branch changes match --paths, list the branch's changed files, and stop — spawn no subagents.
Codex is not a drop-in model: "codex" value for Claude Code's Agent tool. For true cross-provider review, run Claude and Codex as separate reviewer lanes that write comparable artifacts, then synthesize agreement and disagreement from those artifacts.
--codex-lane)The Claude Code plugin's /adversarial-review:run --codex-lane runs this workflow headlessly via codex exec, one invocation per pass, each prefixed with a phase preamble. When a preamble says you are the Codex lane of a cross-provider review orchestrated from Claude Code:
Scope: line, treat it exactly like --paths: append -- <pathspecs> to every git diff/log command, restrict findings to matching files, and carry the Scope: header into every artifact you write..reviews/<branch_safe>/mechanical.txt as suite-level mechanical evidence; run only targeted commands.optimizer-merged.md exactly like --compare-claude artifacts: confirm, dispute, or modify each finding, and report missed issues..reviews/ artifacts. If subagents are unavailable, perform the pass yourself in one shot and write the standard-depth artifact.[mode] to auto-fix unless --no-fix is present, and resolve [paths]/[pathspec] per the scope-handling rules above when --paths is present.git branch --show-currentgit rev-parse --show-toplevel[base] from PR metadata when available, otherwise use origin/develop if it exists, then main.git fetch origin [base], git log origin/[base]..HEAD --oneline, git diff origin/[base]...HEAD --stat, and git diff origin/[base]...HEAD (scoped: append -- [pathspec] to the log and diff commands, and stop here if the scoped diff is empty — see Usage).[repo_root]/.reviews/[branch_safe]/ and keep .reviews/ out of commits.REVIEW.mdAGENTS.mdCLAUDE.md.claude/docs/code-review.md.claude/docs/architecture.md.claude/docs/trust-boundaries.md.reviews/[branch_safe]/mechanical.txt.auth, database, crypto, api, frontend, infra, config, test, docs, types, or general. In a scoped run, classify in-scope files only.When this skill is explicitly invoked, spawn Codex subagents and wait for their results.
Standard depth:
gpt-5.5 with high reasoning; it writes .reviews/[branch_safe]/optimizer-codex.md..reviews/[branch_safe]/optimizer-codex.md exists, spawn one Skeptic subagent using gpt-5.5 with high reasoning; it writes .reviews/[branch_safe]/skeptic-codex.md.Full depth:
optimizer-codex-full: use gpt-5.5 with high reasoning; read the full changed files before judging each hunk. Writes .reviews/[branch_safe]/optimizer-codex-full.md.optimizer-codex-diff: use gpt-5.4-mini with medium reasoning; review from diff hunks first, reading surrounding code only when needed. Writes .reviews/[branch_safe]/optimizer-codex-diff.md.optimizer-codex-full.md and optimizer-codex-diff.md into .reviews/[branch_safe]/optimizer-codex-merged.md..reviews/[branch_safe]/skeptic-codex-full.md and .reviews/[branch_safe]/skeptic-codex-diff.md.skeptic-codex-full.md and skeptic-codex-diff.md into .reviews/[branch_safe]/skeptic-codex-merged.md.Trust model:
gpt-5.5 is the primary Codex authority for auto-fix decisions.gpt-5.4-mini is a diversity and recall pass. A mini-only finding is lower confidence unless mechanically confirmed or verified by gpt-5.5.Cross-provider comparison:
--compare-claude is present and Claude artifacts exist, give Codex Skeptic subagents those artifacts as prior findings to verify.agreed, disputed, modified, unverified, or missed-by-claude.Ask each Optimizer subagent to:
Pre-existing..reviews/[branch_safe]/optimizer-*.md file.Severity definitions:
Signal gate:
Ask each Skeptic subagent to:
.reviews/[branch_safe]/mechanical.txt for suite-level evidence instead of re-running full suites..reviews/[branch_safe]/skeptic-*.md file.Verdicts:
AgreeDisagreeAgree with modificationsCannot verifyRead Optimizer and Skeptic reports, plus Claude artifacts when --compare-claude is active.
Auto-fix eligibility in auto-fix mode:
Never auto-fix:
After applying fixes, run the mechanical checks again. Limit fix/verify to two iterations.
Write .reviews/[branch_safe]/summary.md with:
Scope: [paths], or full branch) — in a scoped run, note that out-of-scope branch changes were not reviewed.gpt-5.5, gpt-5.4-mini), lane (codex; plus claude for --compare-claude items, mechanical, or external), Skeptic verdict with confidence, and outcome. Cross-lane agreement must be visible at a glance.If a PR number exists, post a concise summary comment. In a scoped run, the comment must open by stating the scope so the PR is never mistaken for fully reviewed. Use inline comments only for high-confidence, line-specific findings.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub ng/adversarial-review --plugin adversarial-review2 skills in this plugin
Other plugins' skills for the same job