codex-review
Skill4 starsChanged 6 months agoMITView on GitHub
A standalone adversarial PLAN-review loop where Claude Code (builder) and OpenAI Codex (read-only critic) tag-team an implementation plan before any code is written. Use this when you ALREADY have a plan or a clear idea and just want the cross-model stress-test — no requirements interview first. Claude drafts/loads the plan into PLAN.md, Codex reviews it in a read-only sandbox and returns VERDICT:APPROVED or VERDICT:REVISE, Claude revises and re-submits to the SAME Codex session (context preserved) until APPROVED or a configurable MAX_ROUNDS cap is hit. Human approves the converged plan before code. Use when the user says "/codex-review", "codex review my plan", "have Codex review my plan", "argue this plan with Codex", "adversarial plan review", "make Claude and Codex argue/fight over the plan", or is about to build something high-stakes (auth, schema, concurrency, migrations, payments) and wants a second-model sanity check on the PLAN before implementation. For a guided requirements interview BEFORE the review, use /grill-me-codex instead. NOT for reviewing already-written CODE (that is the Codex plugin's /codex:review) and NOT for trivial changes.
91 other projects use a version of this, 3 of them edited.
Adopted by
Most recently taken up by
- p-chan/agent-skillstheir own version, first seen Nov 8, 2026
- p-chan/skillstheir own version, first seen Nov 8, 2026
- Smirnov-Labs/claude-skillstheir own version, first seen Nov 8, 2026
- juriwiens/skillstheir own version, first seen Nov 8, 2026
- ryanportfolio/winuse-mcptheir own version, first seen Nov 8, 2026
- fab-codes/agent-workflow-templatetheir own version, first seen Nov 8, 2026
Used with
Projects with it also use addskill, apply-firmware and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
ryanportfolioSkilladdskill
Create, import, update, or install repo or personal skills: runtime ownership, resources, discovery checks.
Also in 6 projects that use this
ryanportfolioSkillapply-firmware
Bring current folder (plain folder, existing repo, old or partial firmware copy) up to full Harness Firmware in place. Mirror external repo → adopt-repo.
Also in 6 projects that use this
- +10 more from ryanportfolio
Other versions91 projects use a version of this.
Word for word · 0
None found.
Edited · 3
- will-pagane/claude-superdev-harness★ 439% same
- gregpa/claude-skills★ 091% same
- jaron-goh-centr/claude-skills★ 083% same
Wrote their own version · 88
- ClickHouse/ClickHouse★ 51ksame name
- chaseai-yt/claudex-loop★ 3.2ksame name
- morethanwords/tweb★ 2.7ksame name
- alinaqi/maggy★ 711same name
- alinaqi/claude-bootstrap★ 708same name
- ThibautBaissac/rails_ai_agents★ 665same name
- ai-analyst-lab/ai-analyst★ 304same name
- Sateezg/codex-bridge★ 248same name
- sd0xdev/sd0x-dev-flow★ 192same name
- sd0xdev/sd0x-harness★ 192same name
78 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository79 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- 21st-magicSkill
- alpacaSkill
- ask-mattSkill
- autoresearchSkill
- auto-stage-commitSkill
- browser-harnessSkill
- codebase-designSkill
- codeburnSkill
- compact-memorySkill
- connect-recommendSkill
- connect-required-verification-informationSkill
- decision-mappingSkill
- delegate-taskSkill
- design-an-interfaceSkill
- design-mdSkill
- diagnosing-bugsSkill
- domain-modelingSkill
- edit-articleSkill
- extract-designSkill
- ffmpegSkill
- find-skillsSkill
- firecrawlSkill
- generateSkill
- git-guardrails-claude-codeSkill
- grillingSkill
- grill-me-codexSkill
- grill-meSkill
- grill-with-docs-codexSkill
- grill-with-docsSkill
- gwSkill
- handoffSkill
- implementSkill
- improve-codebase-architectureSkill
- kie-aiSkill
- lightragSkill
- llmfitSkill
- loop-meSkill
- migrate-to-shoehornSkill
- notebooklmSkill
- obsidian-vaultSkill
- openspaceSkill
- playwrightSkill
- prototypeSkill
- qaSkill
- request-refactor-planSkill
- resolving-merge-conflictsSkill
- reviewSkill
- roastSkill
- scaffold-exercisesSkill
- session-handoffSkill
- setup-matt-pocock-skillsSkill
- setup-pre-commitSkill
- site-teardownSkill
- skill-discoverySkill
- skilluiSkill
- spline-3dSkill
- stripe-appsSkill
- stripe-best-practicesSkill
- stripe-directorySkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 2 are distinctive, and 7 are very specific to this project.
0
Common
Most of the 79 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
Do NOT pin -m unless the user asks.
- Very specific: line 27
If the user invoked the skill with an argument like rounds=3, use that for MAX_ROUNDS.
- Very specific: line 37
Do real planning: read the relevant code, think through the approach, surface decisions and tradeoffs.
- Very specific: line 101
Read /tmp/codex-verdict.txt.
- Very specific: line 105
If ROUND > MAX_ROUNDS → break to Step 3 (deadlock).
- Very specific: line 123
Don't use this to review existing code — that's /codex:review.
- Very specific: line 124
Don't pin a -codex model variant on ChatGPT-account auth — it 400s.
- Distinctive: line 125
Don't skip the log — the argument transcript is the most valuable artifact.
- Distinctive: line 126
Don't let Codex edit files.
“Common” is measured: kept by at least 6 in 10 of the 79 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Codex-Review — Adversarial Plan-Review Loop
Two models, one plan, a bounded argument. Claude is the builder and orchestrator. Codex is a read-only critic that can read the repo and the plan but cannot touch a single file. They communicate strictly through PLAN.md + a Codex session that persists across rounds. The human enters at exactly two points: kickoff and final sign-off.
This is a deliberate, high-stakes tool — reach for it on auth, data models, concurrency, migrations, payments, anything expensive to get wrong. Skip it for obvious/cheap work.
Prerequisites (verify once, fast)
- Codex CLI installed and recent:
codex --version(need ≥ 0.130; the defaultgpt-5.5model errors on older CLIs). - Codex authenticated: a prior
codex login(ChatGPT account is fine). If a run returns an auth/model error, surface it to the user — do not silently retry. - Do NOT pin
-munless the user asks. The user's~/.codex/config.tomldefault model is used. Pinninggpt-5.x-codexvariants fails on ChatGPT-account auth. - Sandbox flag differs between the two commands.
codex execaccepts-s read-only.codex exec resumedoes NOT — it rejects-s("unexpected argument"). On resume you MUST force read-only via-c sandbox_mode="read-only", becauseconfig.tomlmay defaultsandbox_modetodanger-full-access(+approval_policy="never") — which would let Codex WRITE files mid-loop. This is the single most important safety detail in this skill: verified end-to-end on 2026-06-04.
Tunable variables (read from skill args, else default)
| Var | Default | Meaning |
MAX_ROUNDS | 5 | Hard cap on review rounds. The loop ALWAYS terminates at this. |
PLAN_FILE | PLAN.md | Where the evolving plan lives (repo root). |
LOG_FILE | PLAN-REVIEW-LOG.md | Append-only transcript of the argument (every round's critique + what changed). The artifact. |
If the user invoked the skill with an argument like rounds=3, use that for MAX_ROUNDS. Echo the resolved values back before starting.
Flow
Step 0 — Kickoff (human gate #1)
The invocation itself is the kickoff. Confirm scope in one line: what is being planned. If the user gave no task, ask for it (one question). Then proceed — do NOT ask for approval round-by-round; that comes at the end.
Step 1 — Claude plans
Do real planning: read the relevant code, think through the approach, surface decisions and tradeoffs. Then write the plan to PLAN_FILE in this structure:
# Plan: <task>
_Round 0 — initial draft by Claude_
## Goal
<one paragraph>
## Approach
<numbered steps, concrete>
## Key decisions & tradeoffs
<the contestable choices — name them explicitly so Codex has something to bite>
## Risks / open questions
<what you're unsure about>
## Out of scope
<bounds>Initialize LOG_FILE:
# Plan Review Log: <task>
Started <stamp the user's local time if known, else "session start">. MAX_ROUNDS=<n>.Show the user the plan inline and say you're sending it to Codex for adversarial review.
Step 2 — The loop
Maintain ROUND (start 1) and THREAD_ID (empty until round 1 returns).
The review prompt sent to Codex each round (adjust the task line):
You are an adversarial reviewer for an implementation plan. Be skeptical and specific — your job is to find what breaks, not to be agreeable. Read the plan at
PLAN.md(and any repo files you need; you are read-only). Identify concrete flaws: security holes, race conditions, missing edge cases, schema conflicts, wrong assumptions, observability gaps, simpler alternatives. For each, give a one-line fix. Do NOT modify any files. End your reply with EXACTLY one line:VERDICT: APPROVEDif the plan is sound enough to implement, orVERDICT: REVISEif it still has material problems.
Round 1 (creates the session — capture thread_id):
codex exec -s read-only --json \
-o /tmp/codex-verdict.txt \
"$(cat REVIEW_PROMPT)" \
2>/dev/null | grep '"type":"thread.started"'Parse thread_id from the {"type":"thread.started","thread_id":"..."} line → that is THREAD_ID. The critique text lands in /tmp/codex-verdict.txt (Codex's last message). Read that file.
Note: stderr carries cosmetic MCP/auth noise on some setups —
2>/dev/nullis intentional. Confirm success by the presence of the verdict file + athread.startedline. If neither appears, the run failed (auth/model) — stop and tell the user.
Rounds 2..MAX (resume the SAME session — Codex remembers its earlier critiques, won't re-litigate settled points):
# NOTE: resume rejects -s. Force read-only via -c sandbox_mode, or Codex
# inherits config.toml (possibly danger-full-access) and could write files.
codex exec resume "$THREAD_ID" -c sandbox_mode="read-only" --json \
-o /tmp/codex-verdict.txt \
"I revised the plan. Re-review PLAN.md. Same rules. End with VERDICT: APPROVED or VERDICT: REVISE." \
2>/dev/null >/dev/nullBoth codex exec and codex exec resume support --json (stream → parse thread_id first round) and -o/--output-last-message (verdict capture).
Each round, after Codex returns:
- Read
/tmp/codex-verdict.txt. Append toLOG_FILE:## Round <n> — Codex+ the full critique. - Grep the last line for the verdict token.
VERDICT: APPROVED→ break the loop, go to Step 3 (converged).VERDICT: REVISE→ Claude reads the critique, decides what's actually worth acting on (Claude has final say — Codex advises, it does not command). RevisePLAN_FILE. Append toLOG_FILE:### Claude's response+ what you changed and what you rejected and why. IncrementROUND.
- If
ROUND > MAX_ROUNDS→ break to Step 3 (deadlock).
Step 3 — Resolution (human gate #2)
If APPROVED: Present to the user — the final PLAN_FILE, a 3-bullet summary of what the argument improved, and the round count. Ask: "Plan survived N rounds of Codex. Implement it now?" Only on a yes does Claude write code. No code is written during the loop.
If MAX_ROUNDS hit without APPROVED (deadlock): Do NOT pretend it converged. Surface the unresolved disagreements explicitly: list each point Codex still flags and Claude's counter-position. Hand it to the human to break the tie. This is a legitimate, useful outcome — a flagged disagreement beats a false "approved."
Hard rules
- Codex is read-only EVERY round —
-s read-onlyfor the first call,-c sandbox_mode="read-only"for every resume (resume has no-s). It never writes. If you're tempted to give it write access, stop — that's a different skill. - The loop ALWAYS terminates at
MAX_ROUNDS. No unbounded recursion. - Claude is the final arbiter on every REVISE — incorporate good critiques, reject bad ones with a reason logged. Don't cave to Codex on everything (that defeats the cross-model check) and don't ignore it (that defeats the point).
- Code only after human gate #2.
LOG_FILEis the deliverable — it tells the whole story of the argument. Keep it complete.
What NOT to do
- Don't use this to review existing code — that's
/codex:review. - Don't pin a
-codexmodel variant on ChatGPT-account auth — it 400s. - Don't skip the log — the argument transcript is the most valuable artifact.
- Don't let Codex edit files. Read-only, always.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

