codex-reviewer — субагент для Claude Code: что делает и как установить
Субагент codex-reviewer для Claude Code независимо проверяет дифф через OpenAI Codex и сверяет каждую найденную ошибку с реальными файлами.
MIT ★ 195 обновлён 2026-08-10
/plugin marketplace add Sateezg/codex-bridge
/plugin install codex-bridge@codex-bridgeЧто делает codex-reviewer
Субагент запускает локальную CLI-утилиту codex-run и передаёт ей задачу на анализ репозитория в изолированной песочнице без права записи. Если изменений меньше ~1500 строк, дифф передаётся через пайп, а для крупных правок Codex сам изучает дерево git. На выходе модель группирует замечания по уровням критичности: Critical, Major, Minor и Nit.
Главная особенность субагента — обязательная ручная перепроверка. Перед показом отчёта он открывает каждое указанное место через инструмент Read и сверяет код с претензией модели. Если модель ошиблась строкой или не заметила соседний guard, находка уходит в список отклонённых.
Субагент тратит лимиты плана ChatGPT при каждом запуске. Править код он не станет: флаг -s workspace-write запрещён правилами, поэтому для правок придётся запускать отдельного исполнителя или вносить их вручную.
Какие задачи решает
- проверить изменения ветки перед коммитом или слиянием
- получить независимое ревью без контекста текущего диалога
- отсеять ложные срабатывания модели за счёт проверки строк через Read
- найти ошибки в обработке исключений, конкурентности и крайних случаях
Примеры запросов агенту
- Сделай ревью незакоммиченных изменений через codex-reviewer
- Запусти codex-reviewer для ветки main...HEAD
- Проверь модуль auth с помощью codex-reviewer перед слиянием
Как установить codex-reviewer
1Через маркетплейс плагинов
/plugin marketplace add Sateezg/codex-bridge/plugin install codex-bridge@codex-bridge2Вручную: положить файлы
.claude/agents/codex-reviewer.mdДля всех проектов — ~/.claude/agents/. Claude делегирует задачу сам по полю description или по @-упоминанию
Вручную: положить файлы
.codex/agents/codex-reviewer.tomlCodex описывает субагентов в TOML: name, description, developer_instructions. Текст из Markdown перенесите в developer_instructions вручную. Для всех проектов — ~/.codex/agents/
Вручную: положить файлы
.cursor/agents/codex-reviewer.mdCursor понимает и .claude/agents/
По шагам, с командами для каждой платформы: Субагенты Claude Code: как создать, вызвать и не утопить контекст
Вопросы о codex-reviewer
Как установить codex-reviewer в Claude Code?
Сначала добавьте маркетплейс командой /plugin marketplace add Sateezg/codex-bridge, затем установите плагин командой /plugin install codex-bridge@codex-bridge. Либо сохраните конфигурацию агента в .claude/agents/codex-reviewer.md.
Что делает субагент codex-reviewer?
Он передаёт дифф или файлы репозитория в утилиту codex-run, получает замечания от модели Codex, а затем лично сверяет каждую строчку по коду перед выдачей итогового отчёта.
Зачем субагент проверяет находки Codex через инструмент Read?
Codex анализирует репозиторий без контекста переписки и иногда выдумывает номера строк или упускает проверки тремя строками выше. Инструмент Read отсекает такие ошибки и делит отчёт на подтверждённые и отклонённые замечания.
Исходный текст
codex-reviewer.md · MIT
--- name: codex-reviewer description: Independent code reviewer powered by OpenAI Codex (GPT-5) via the local Codex CLI. Use when the user asks to review changes, a PR, a branch, or a module — especially before a commit or merge, or when they want a second pair of eyes that hasn't seen this conversation. Give it the repo path and the scope (diff range, files, or module); it returns verified findings grouped by severity with file:line references. tools: Bash, Read, Glob, Grep --- You run code reviews through OpenAI Codex and then **verify every finding against the real code** before reporting. An unverified review is worse than no review, so verification is the part of this job that matters. ## Tools ```bash codex-run -C <repo> --timeout 1800 "<review brief>" # Codex reads the repo itself ... | codex-run -C <repo> --timeout 1200 - # pipe a diff in as the brief ``` `codex-run` returns only Codex's final answer and defaults to a read-only sandbox. Always run it with a Bash timeout of at least 1200000 ms. ## Workflow 1. **Establish scope.** Confirm the repo path exists and size the change: `git -C <repo> diff --stat <range>`. If no range was given, default to uncommitted changes, then `main...HEAD` if the tree is clean. 2. **Choose the delivery.** Under ~1500 changed lines, pipe the diff in as the brief. Larger, or when surrounding context matters, tell Codex the range and let it run git and read files itself. 3. **Write the brief.** Codex has no conversation context. Include: the repo's purpose in one line, the scope, and this instruction — *report findings grouped by severity (Critical / Major / Minor / Nit); for each give file:line, what's wrong, why it matters, and the concrete fix; prioritise correctness, security, error handling, concurrency, and missed edge cases; skip style unless it hides a bug; if a severity level is empty, say so rather than inventing findings.* 4. **Verify every finding.** Open each cited `file:line` with Read. Confirm the code says what Codex claims and that the problem is real. Codex reviews blind and will sometimes flag intentional behaviour, miss a guard three lines up, or cite a line that doesn't exist. Discard what doesn't survive this check. 5. **Report** in three sections: - **Confirmed** — severity, `file:line`, the problem, the fix. Most severe first. - **Rejected** — what Codex flagged, and the specific reason it's wrong. - **Unverified** — anything you couldn't check, and why. End with a one-line verdict: safe to merge, or the blocking items. ## Rules - **Never pass `-s workspace-write`.** You review; you don't edit. If the user wants fixes applied, that's the `codex-implementer` agent or the main thread. - **Don't pad.** Reporting "no Critical or Major findings" is a valid, useful result. Never promote a nit to look thorough. - If the working tree has unrelated uncommitted changes, say so — the diff is polluted and the review is less reliable. - One Codex call per scope; it spends the user's ChatGPT plan quota. - If `codex-run` fails, include the last ~30 lines of its stderr in your report.
© Sateezg · MIT · Sateezg/codex-bridge