Skip to content
Conduit

skill

code-review-adversarial

Adversarial multi-agent code review — a committee of specialist reviewers that catches what single-pass AI review misses.

yuefanxiao/code-review-adversarialcommunitylistedunreviewed

Set up

Skills are installed by placing their folder where your agent loads skills.

The download comes from github.com/yuefanxiao/code-review-adversarial itself, not from our server, so what you get is exactly what its author published.

Install instructions come from the README

Skills do not use an MCP config. Follow the steps in the README below.

README

synced Oct 17, 2026

code-review-adversarial

One reviewer isn't enough. Adversarial multi-agent code review — a committee of specialist reviewers that catches what single-pass AI review misses.

English | 中文

License: MIT PRs Welcome GitHub stars GitHub issues

Quick start:

git clone https://github.com/yuefanxiao/code-review-adversarial.git
ln -s "$(pwd)/code-review-adversarial" ~/.agents/skills/code-review-adversarial  # ZCode
ln -s "$(pwd)/code-review-adversarial" ~/.claude/skills/code-review-adversarial  # Claude Code
ln -s "$(pwd)/code-review-adversarial" ~/.codex/skills/code-review-adversarial   # Codex

Then just ask your agent: "adversarial review PR #123" or "深度评审这个 PR".


What is this?

An Agent Skill that turns a single AI coding agent into a committee of specialized reviewers. Instead of one agent giving you one opinion, this skill dispatches 2–4 reviewers from distinct stances, converges their findings, and outputs a structured verdict.

Before vs After

Single-agent review:

"The CAS implementation looks correct. The WHERE updated_at=? condition properly guards against concurrent updates. Looks good ✅"

Adversarial committee:

Root-cause auditor (P1): The DECISIONS doc claims "no transaction infrastructure exists" but repository.go already has 3 Transaction() call sites — the fix rationale is based on a factual error.

Regression auditor (P1): The new update_mask field is server-enforced as required. The shipped frontend doesn't send it yet → every existing edit will 400 until the frontend is updated.

Devil's advocate: 9 attack vectors tested, no blocking defects found. CAS token source is correctly client-side (cmd.ExpectedUpdatedAt), not the internal read snapshot — no TOCTOU.

Verdict: ready-with-fixes — fix the DECISIONS doc error + track frontend update as follow-up.

How it works

PR diff
  │
  ▼  Phase 0: Baseline — lock merge-base, prevent diff pollution
  ▼  Phase 1: Classify — detect PR type → select personas
  ▼  Phase 2: Dispatch — 2-4 specialized reviewers in parallel
  ▼  Phase 3: Triage — discard out-of-scope, uncited, layer-violating findings
  ▼  Phase 4: Converge — independent→accept, conflict→arbitrate → verdict
  │
  ▼  Output: markdown / JSON / PR comment (asks first)

PR-type-aware

The review focus adapts to what kind of PR it is:

PR typeWhat gets reviewedWhat gets skipped
FeatureBetter alternatives? Design soundness? Edge cases?—
BugfixRoot cause vs symptom? Regression risk?"Consider alternative architecture" (scope creep)
RefactorBehavior preserved? Tests unchanged?New feature suggestions
Design-heavy (proto/API only)AIP compliance? Backward compat? Error codes?Implementation correctness (no code yet)
PerformanceBenchmark evidence? Hot path? Trade-off acceptable?—

11 Reviewer personas

PersonaRoleUsed for
Design auditorEvaluate better alternativesFeature
Correctness auditorLogic, edge cases, concurrencyFeature / Perf
Root-cause auditorRoot cause vs symptomBugfix
Regression auditorNew defects introducedBugfix
Behavior auditorSemantic equivalenceRefactor
Test coverage auditorTest adequacyRefactor
Security auditorVulnerabilities, secretsChore / Feature
Performance auditorBenchmark validityPerformance
Devil's advocateAdversarial — assume defects existOptional (high-stakes)
Contract auditorAIP, compatibility, completenessDesign-heavy
Simplification auditorUnnecessary complexityOptional (all types)

Installation

Prerequisites

Any agent runtime that supports the Agent Skills format.

Install via symlink (recommended — share one copy across agents)

git clone https://github.com/yuefanxiao/code-review-adversarial.git
cd code-review-adversarial

# Pick your agent(s):
ln -s "$(pwd)" ~/.agents/skills/code-review-adversarial  # ZCode
ln -s "$(pwd)" ~/.claude/skills/code-review-adversarial  # Claude Code
ln -s "$(pwd)" ~/.codex/skills/code-review-adversarial   # Codex

Install via copy

cp -r code-review-adversarial ~/.agents/skills/  # or ~/.claude/skills/, ~/.codex/skills/

Usage

Just describe what you want — the skill auto-triggers on:

  • "adversarial review PR #123"
  • "深度评审 PR #123"
  • "对抗复核 this PR"
  • "does this PR have a better alternative?"
  • "契约评审"

Options

ParameterDefaultDescription
reviewersauto by PR typeManually specify: design,security,devils-advocate, etc.
devils-advocateoffEnable devil's advocate persona
max-rounds2Convergence round limit
formatmarkdownmarkdown / json / comment (asks before posting)
pr-typeauto-classifyOverride: feature / bugfix / refactor / ...

File structure

code-review-adversarial/
├── SKILL.md                          # Main workflow (326 lines)
├── DESIGN.md                         # Full design rationale + research
├── README.md                         # This file
├── assets/                           # README images (before-after, pipeline, committee)
├── references/
│   ├── type-playbooks.md             # Per-PR-type checklists
│   ├── reviewer-personas.md          # Persona index + shared constraints
│   ├── convergence-protocol.md       # Convergence rules
│   └── personas/                     # One file per persona (15-73 lines)
│       ├── design.md
│       ├── correctness.md
│       ├── root-cause.md
│       ├── regression.md
│       ├── behavior.md
│       ├── test-coverage.md
│       ├── security.md
│       ├── perf.md
│       ├── devils-advocate.md
│       ├── contract.md
│       └── simplification.md
└── examples/
    └── bugfix-cas-review.md          # Sample review output

Design principles

  1. Specialized committee, not pro/con debate — Collaborative > adversarial (NeurIPS 2025)
  2. PR type determines focus — Feature → L3; Bugfix → L2 (L3 forbidden); Refactor → invariants
  3. Free exploration + finding-type constraints — Explore freely, but out-of-diff findings must be "diffusion-impact" only
  4. Independent Triage Filter — Primary precision lever (~51% false-positive reduction)
  5. Convergence by finding type — Independent → accept; intersection → high-confidence; conflict → arbitrate
  6. Merge-base baseline lock — Prevents diff pollution (the #1 real-world lesson)

See DESIGN.md for full rationale and ROADMAP.md for what's coming.

Compatibility

AgentStatus
ZCode✅ Native
Claude Code✅ Via ~/.claude/skills/
Codex✅ Via ~/.codex/skills/
Cursor📋 Planned
Gemini CLI📋 Planned
GitHub Copilot📋 Planned

Platform-agnostic — works with GitHub, GitLab, Gitea, or any git-based PR system.

Examples

See examples/ for real review outputs:

  • bugfix-cas-review.md — A concurrency-fix PR reviewed by root-cause + regression auditors + devil's advocate

Contributing

Contributions welcome! See CONTRIBUTING.md.

Areas where help is especially appreciated:

  • New persona templates (e.g., accessibility, i18n, database migration)
  • Benchmark data (single-agent vs committee detection rates)
  • Platform-specific integration guides (Cursor, Gemini CLI, Copilot)

License

MIT

↑↓ navigate openesc close