Claude-Codex Review Skill
A skill for second-agent review of plans or code: Claude Code starts rounds, Codex reviews, and they exchange files
Install
mkdir -p .claude/skills/codex-dual-review-file-based
cp claude-code/* .claude/skills/codex-dual-review-file-based/Run from a repository clone in the project root.
This is third-party code. Review the repository files before installing.
What it does
Claude Code creates a session in .dual-review, writes a round contract and prints a ready instruction for Codex. Codex claims the round and writes a review with a machine-readable JSON block, while Claude treats each finding as a hypothesis, applies accepted changes and opens the next round. The session ends with final.md marked approved, failed or limit. No MCP server or CLI bridge is needed.
Who it is for. For developers using both Claude Code and Codex who want an independent review by a different model.
Good fit when
- You want a plan reviewed before writing code
- You want a review of a finished code and test change
- You want a second model to evaluate an architecture decision
Not a fit when
- You have no access to Codex
- The agents cannot share the same project directory
Example request
/codex-dual-review-file-based Review the OAuth auth migration plan docs/auth-plan.mdLimitations
Only Claude Code as initiator and Codex as reviewer is supported. Both agents need access to the same worktree for the whole session. File polling may notice transitions a few seconds late, and sessions default to at most five rounds.
How to disable. Remove .claude/skills/codex-dual-review-file-based. Session files stay in .dual-review and do not affect anything.
Security check
- Runs PowerShell or Bash wait scripts
- A second agent gets read and write access to the project directory
README in short
The README describes a file-based review protocol between Claude Code and Codex. Session files are append-only, claim flags allow resuming after crashes, and the review scope stays fixed across rounds. Wait helpers wait-for-review.ps1 and wait-for-review.sh poll for results. Design decisions and protocol limitations are listed separately.
SKILL.md
--- name: codex-dual-review-file-based description: "File-based dual-review с Codex как reviewer. Использует отдельный каталог сессии в `.dual-review`, структурированные файлы раундов и `final.md` как source of truth. Используй для независимой проверки плана, кода, архитектурного решения или гипотезы, когда Claude Code и Codex работают с общим каталогом проекта." --- # Codex Dual Review (File-Based) Текущий чат — initiator. Codex — reviewer. Source of truth — только файлы в `<SESSION_DIR>/`. ## Пути и рабочие деревья Git `SESSION_DIR` — абсолютный путь к каталогу сессии. Вычислить его как `<PROJECT_ROOT>/.dual-review/<session_id>`, где `PROJECT_ROOT` — текущий корень проекта Claude Code. Если Claude Code запущен внутри отдельного рабочего дерева Git, именно оно является `PROJECT_ROOT`; не переносить сессию в основной checkout. Каталог вспомогательных файлов навыка (`SKILL_DIR`) — каталог, содержащий этот `SKILL.md`. Брать `reviewer-prompt.txt` и скрипт ожидания из него, а не строить путь относительно `PROJECT_ROOT`. ## Invocation ``` /codex-dual-review-file-based <описание задачи> [путь/к/плану.md] [max_rounds=5] ``` Если путь к плану передан — прочитать его и использовать как основу `round-start`. Если `max_rounds` не указан — по умолчанию 5. ## Файловый контракт - Внутри одной сессии только добавляются новые файлы. Append-only. - Протокольные файлы не удаляются и не перезаписываются. - Состояние раунда определяется листингом каталога: `.flg`-файлы — это zero-byte sentinel и часть state machine, не «шум». - Область ревью (`scope`) фиксируется в первом раунде и не меняется в пределах одной сессии. - `final.md` означает, что сессия завершена. ## Алгоритм ### Шаг 1. Подготовить контекст раунда Изучить кодовую базу. Подготовить контекст для ревью: - что именно нужно проверить; - какие файлы относятся к задаче; - какой `scope` нужен. Канонические значения `scope`: - `plan-only` - `production-change` - `lookup-test` - `architecture-check`
FAQ
What if an agent crashes mid-round?
State lives in session files and claim flags, so a restarted agent resumes from the same point.
Which review scopes exist?
plan-only, production-change, architecture-check and lookup-test. The scope is fixed in round one.
Related
A skills library that gives coding agents a development process: brainstorming, planning, TDD, subagents and code review
Skills for real engineers by Matt Pocock
Skills For Real Engineers
Small composable skills for engineering with agents: plan grilling, TDD, bug diagnosis, code review and architecture
Reference MCP servers
Model Context Protocol servers
Official reference MCP servers: Filesystem, Fetch, Git, Memory, Sequential Thinking, Time and Everything
Up-to-date, version-specific library docs and code examples in your agent's context, via MCP or a CLI plus skill