v0.9.4: Cross-host adversarial review for coding workflows. Works in Claude Code, Codex, Pi, and Grok from the same source: detects which agent host you're running in and routes the heavy critique to the OTHER agent.
Critique discipline (v0.8.1): break confidence rather than validate; expensive attack surfaces first; material-only findings; mandatory simplicity counterfactuals; steerable focus; terse ship/no-ship summary. Lessons adapted from OpenAI Codex Companion and Matt Pocock's engineering skills.
Version note: v0.9.4 makes Codex-host review author-aware. Codex-authored plans
and contracts go to Grok first, while Grok-authored worker diffs go to Codex
Luna max first. Omitted authors infer codex for plans and grok for code.
It also changes the Antigravity default to Gemini 3.7 Flash High. The previous
release replaced the OpenCode Go fallback with DeepSeek V4 Flash xhigh.
Antigravity discovery now accepts the CLI's tabular model catalog, and empty
provider responses fall through instead of ending the review with no output.
Accounts without the required China-hosting opt-in receive a 403 on that leg
and fall through to Moonshot Kimi K3. v0.9.1 originally made Gemini 3.6 Flash
High the first Antigravity model, with provider and quota fallthrough
unchanged. Routing policy 2026-07-23
makes Grok 4.5, xAI's frontier model, the sole direct-xAI model at high effort.
v0.9.0 moved the direct Moonshot leg to Kimi K3 xhigh and made Antigravity
choose from a quality-first Claude, Gemini, and GPT ladder with quota fallback.
v0.8.2 pinned the Codex reviewer; the current release uses Luna at max effort.
Every plan and code review now asks whether the same required behavior and safety can be delivered with fewer concepts, layers, seams, entry points, or configuration surfaces. It checks YAGNI, pass-through layers, hypothetical adapters, duplicate ownership, and missed reuse of existing in-repo modules.
Effect is conditional, not a framework preference: when the repository already has a canonical Effect implementation for the concern, the reviewer challenges a parallel implementation. It does not recommend introducing Effect merely to reduce line count or enforce framework consistency. Fewer lines are a clue, never the verdict.
The partner reviews, never the host.
Two models examining the same artifact from different angles catch more issues than either alone. Each has different training biases, blind spots, and reasoning patterns. Disagreements between the two surface the highest-value findings - the ones a single reviewer would miss.
This plugin enforces that principle automatically:
- Running in Claude Code -> external reviewer is Codex (
codex exec,gpt-5.6-luna maxvia ChatGPT subscription auth) for plans, with Grok first for code/diff reviews - Running in Codex -> routing uses
ADVERSARIAL_REVIEW_AUTHOR. Codex-authored artifacts go to Pi xAI OAuth Grok 4.5 xhigh first. Grok-authored artifacts go to Codex Luna max first, then Claude and a non-xAI Pi chain. If author is omitted, plans infercodexand code/diffs infergrok - Running in Grok -> external reviewer is Codex Luna max, then Claude (Opus, xhigh), then a non-xAI Pi chain using DeepSeek then direct Moonshot Kimi K3 xhigh, never Grok
- Running in Claude Code plan review uses Codex, direct-xAI Grok, then the
Pi model chain. Code/diff review uses direct-xAI Grok, Codex, then the Pi
model chain (
xai-oauth/grok-4.5with--thinking xhigh,opencode-go/deepseek-v4-flash:xhigh,moonshotai/kimi-k3:xhighdirect API). Both paths then use the quality-first Antigravity ladder (agy -p "$prompt" --model ...) - Everything unavailable -> degraded mode with explicit banner: the host reviews itself, but the user is told the cross-host principle was bypassed
SKILL.md (same file in both hosts)
│
├─ host runs lib/call-external.sh
│ │
│ ├─ lib/detect-host.sh (override -> env -> PPID walk)
│ ├─ partner = NOT host
│ ├─ ADVERSARIAL_REVIEW_DEPTH = 1 (anti-recursion guard)
│ ├─ select ordered partners from host + artifact + author
│ ├─ try Codex, Claude, direct xAI, or Pi in that route's order
│ ├─ on fail -> quality-first Antigravity ladder
│ └─ on fail -> degraded mode (exit 2)
│
├─ host runs its own independent analysis (no peeking at partner output)
├─ cross-validate: tag findings [cross-validated] / [external-only] / [host-only]
└─ return unified output (P0-P3 severity, evidence, recommendation, partner-attribution)
No haiku courier subagent (removed in 0.5.0 - added complexity without value). The main session does the dispatch and synthesis directly.
| Skill | What it does |
|---|---|
/adversarial-review:adversarial-review |
Single entry point. Classifies input (plan, code, prompt) and runs the matching procedure: plan critique with revised plan, red-team code review with patch, or prompt-engineering analysis (host-side, no external). |
In Codex, after running the install script, the same skills are available
as $<skill-name> (Codex prompt-prefix convention).
# Add the marketplace and install the plugin
claude plugin marketplace add ~/repos/skills/plugins/adversarial-review
claude plugin install adversarial-review@adversarial-review
# Reload in current session
/reload-plugins# Symlinks each skills/<name>/ into ~/.codex/skills/
bash ~/repos/skills/plugins/adversarial-review/adapters/codex-skill/install.shVerify both:
claude plugin list # should show adversarial-review enabled
ls -la ~/.codex/skills/ # should show the adversarial-review symlink back to this repoAt least one external partner CLI must be authenticated for cross-host review to work (otherwise you'll get DEGRADED mode):
# When host=claude, partner=codex:
codex login
# When host=codex and author=codex, partner=Pi xAI OAuth Grok 4.5 first:
pi --version
# Host=codex fallback after Pi:
claude # interactive once to register OAuth, then `claude -p` works headless
# Optional fallback:
grok --version
agy --version # Antigravity CLI, authenticated through the Antigravity appFor ChatGPT-account Codex users, also add to ~/.codex/config.toml:
forced_login_method = "chatgpt"(Without this, codex exec returns 404 "Model not found" even though the
TUI works. See references/codex-integration.md for the gotcha details.)
# Detection in Claude Code
bash ~/repos/skills/plugins/adversarial-review/lib/detect-host.sh
# -> claude
# Detection inside Codex
codex exec --sandbox read-only --skip-git-repo-check \
"bash $HOME/repos/skills/plugins/adversarial-review/lib/detect-host.sh"
# -> codex
# Override
ADVERSARIAL_REVIEW_HOST=codex bash lib/detect-host.sh
# -> codex
# Degraded mode (non-destructive smoke)
echo "test" | ADVERSARIAL_REVIEW_FORCE_DEGRADED=1 \
bash lib/call-external.sh
# -> exit 2, stdout begins with "⚠️ DEGRADED MODE"
# Anti-recursion
echo "test" | ADVERSARIAL_REVIEW_DEPTH=1 \
bash lib/call-external.sh
# -> exit 1, stderr "recursion detected"# In Claude Code
/adversarial-review:adversarial-review # paste anything - plan, code, diff, prompt, or "review uncommitted"
# In Codex (after running adapters/codex-skill/install.sh)
$adversarial-review please review the plan I'm about to implement: ...
$adversarial-review review my changes: ...references/codex-lessons.md- stance/attack-surface/finding-bar adopted from Codex Companionreferences/output-standards.md- P0-P3, material bar, header/summary contractPLANS.md- upgrade plan + future pi-companion planreferences/host-detection.md- the override -> env -> PPID walk priorityreferences/codex-integration.md- Codex CLI specifics +forced_login_methodgotchareferences/claude-integration.md-claude -p --model opus --effort xhighreferences/pi-integration.md- Pi model chainreferences/antigravity-integration.md- quality-first Claude, Gemini, and GPT ladder through non-interactive Antigravity CLIreferences/fallback-chain.md- external chain + Antigravity + degraded pathAGENTS.md- agent-side rules (severity, honesty, anti-recursion contract)CLAUDE.md- Claude Code dev workflow
MIT