Adversarial multi-model code review with progressive cost-gating
npx claudepluginhub ng/adversarial-reviewAdversarial multi-model code review. Dual Optimizer/Skeptic agents (Sonnet + Opus) challenge each other's findings. Pulls GitHub PR feedback, reviews against project conventions, auto-fixes consensus issues, presents disputes for author decision.

Claude Code plugin for adversarial multi-model code review.
Mechanical checks first (free), then AI agents scaled to change complexity. Two agents — The Optimizer and The Skeptic — review your code independently, challenge each other's findings, and only consensus issues get auto-fixed. A bounded verification loop catches regressions from fixes.
/plugin marketplace add ng/adversarial-review
/plugin install adversarial-review
To update to the latest version, re-run both commands.
/adversarial-review:run # auto-fix (default), auto-detect PR
/adversarial-review:run 405 # auto-fix, specific PR
/adversarial-review:run --no-fix # review only, no code modifications
/adversarial-review:run --no-fix 405 # review only, specific PR
Use as a GitHub Action to run adversarial reviews automatically on PRs:
name: Adversarial Code Review
on:
pull_request:
types: [opened, ready_for_review, reopened, labeled]
jobs:
review:
if: >-
github.event.action != 'labeled' ||
github.event.label.name == 'review'
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
issues: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ng/adversarial-review@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
| Input | Required | Default | Description |
|---|---|---|---|
claude_code_oauth_token | Yes | — | Claude Code OAuth token |
pr_number | No | Triggering PR | PR number to review |
mode | No | auto-fix | auto-fix or no-fix (report only) |
allowed_tools | No | — | Additional allowed tools (comma-separated) |
model | No | — | Model override for lead agent |
Avoid synchronize (fires on every push) — the review is slow and expensive. Use labeled with a review label for re-runs after pushing fixes.
flowchart TD
Start(["/adversarial-review:run"]) --> Context["1. Get Context"]
Context --> PR{PR exists?}
PR -->|Yes| Feedback["2. Pull PR/MR Feedback"]
PR -->|No| Docs
Feedback --> Triage["3. Triage Feedback"]
Triage --> Docs["4. Read Convention Docs<br/>REVIEW.md · .claude/docs/"]
Docs --> Mechanical["5. Mechanical Checks<br/>lint · typecheck · build · test"]
Mechanical --> Gate{"6. Cost Gate"}
Gate -->|"Score ≤ 0"| Report
Gate -->|"Score 1–4"| Standard["Sonnet-only<br/>Optimizer + Skeptic<br/>(2 agents)"]
Gate -->|"Score ≥ 5"| Full["Dual-model<br/>Optimizer + Skeptic<br/>(4 agents)"]
Standard & Full --> Synth["7. Synthesize"]
Synth --> ModeCheck{Auto-fix?}
ModeCheck -->|"--no-fix"| Report
ModeCheck -->|"Default"| Apply["Apply consensus<br/>Critical/Major fixes"]
Apply --> Verify{"Verify fixes<br/>(max 2 iterations)"}
Verify -->|"Checks pass"| Report
Verify -->|"Checks fail,<br/>iteration < 2"| Fix["Fix regressions"] --> Verify
Verify -->|"Still failing<br/>after 2 rounds"| Report
Report["8. Structured Report<br/>+ PR/MR comments"] --> Issues{"File issues?<br/>(offered after report)"}
Issues -->|Yes| File["9. File Issues<br/>with full review context"]
Issues -->|No| Done
File --> Done([Author reviews & approves])
flowchart TD
Team["TeamCreate +<br/>TaskCreate with dependencies"] --> Pass1
subgraph Pass1["Pass 1 — The Optimizer"]
Optimizer["Find every issue worth fixing"]
OptSonnet["Sonnet teammate"]
OptOpus["Opus teammate<br/>(full depth only)"]
MergeOpt["Lead merges &<br/>deduplicates"]
Optimizer --> OptSonnet & OptOpus
OptSonnet & OptOpus --> MergeOpt
end
MergeOpt -->|"SendMessage<br/>wake Skeptics"| Skeptic
subgraph Pass2["Pass 2 — The Skeptic"]
Skeptic["Challenge findings +<br/>catch missed issues"]
SkpSonnet["Sonnet teammate"]
SkpOpus["Opus teammate<br/>(full depth only)"]
MergeSkp["Lead merges<br/>challenges"]
Skeptic --> SkpSonnet & SkpOpus
SkpSonnet & SkpOpus --> MergeSkp
end
MergeSkp --> Confidence
subgraph Synthesis["Synthesize"]
Confidence{"Cross-model<br/>consensus?"}
AutoFix["Auto-fix<br/>Critical/Major"]
Dispute["Present dispute<br/>to author"]
Note["Note for author<br/>(Minor/Nit)"]
Confidence -->|"Both models agree"| AutoFix
Confidence -->|"Models disagree"| Dispute
Confidence -->|"Low confidence"| Note
end
AutoFix & Dispute & Note --> Haiku
Claude Code marketplace entries for the plugin-safe Antigravity Awesome Skills library and its compatible editorial bundles.
Directory of popular Claude Code extensions including development tools, productivity plugins, and MCP integrations
Curated collection of 154 specialized Claude Code subagents organized into 10 focused categories