claude-reviewer-for-codex
Uses Claude as an independent second-model reviewer inside Codex, performing reviews on disposable Git snapshots with structured findings.
README
Claude Reviewer for Codex
Use Claude as an independent second-model reviewer from inside Codex.
Claude Reviewer gives Codex a managed review workflow instead of a brittle one-off claude -p
shell command. Reviews run in fresh Claude sessions against disposable Git snapshots, so Claude can
inspect surrounding code and run focused tests without changing your real checkout.
Independent open-source project. Not affiliated with or endorsed by Anthropic or OpenAI.
Features
- Normal and adversarial reviews
- Exact commit review that ignores unrelated dirty files
- Working-tree, branch, automatic, and explicit-file scopes
- Disposable snapshots where diagnostic tests may safely write artifacts
- Structured findings with severity, file, lines, evidence, and recommendations
- Background jobs with durable status, results, cancellation, and desktop notifications
- Wait mode that returns the final review through one blocking wait call without polling
- Stale-result detection when source work changes after launch
- Per-review model, effort, and quality profiles
- No runtime npm dependencies
Requirements
- Codex with plugin support
- Git
- Node.js 20 or newer
- Claude Code, authenticated locally
- Linux, macOS, or Windows through WSL
Check Claude before installation:
claude --version
claude auth status
Install from GitHub
Add this repository as a Codex marketplace and install the plugin:
codex plugin marketplace add adsorce/claude-reviewer-for-codex
codex plugin add claude-reviewer@claude-reviewer
Start a new Codex session after installation so the skill and MCP tools are loaded.
You can also open /plugins in Codex, select the Claude Reviewer marketplace, and install the
plugin there.
Usage
Ask naturally:
Have Claude adversarially review my current changes in the background.
Ask Claude to review commit 9f2c1ab only.
Have Claude review this branch against main and wait for the result.
Ask Claude to pressure-test docs/SPEC-payments.md.
Use Claude Opus at max effort to review commit 9f2c1ab.
Run a balanced Claude review against main.
Show me the result of the background Claude review.
Background completion
Background mode returns a job ID immediately and persists the result. The broker emits a best-effort desktop or terminal notification when Claude finishes. Codex currently has no documented plugin API that can spontaneously resume a model turn after a tool call has returned, so the plugin does not secretly launch another Codex session. Use wait mode when the current Codex turn must consume the review before continuing. Start always returns a job ID first; Codex then makes one blocking wait call, which preserves recovery and cancellation if that wait is interrupted.
Normal tool output is deliberately concise: review kind, model, effort, target, elapsed time, job
ID, verdict, and findings. The full Claude stream-json transcript stays in the job log and is only
returned when include_raw=true is explicitly requested for debugging.
During a wait call the MCP server emits progress notifications with the current phase and elapsed seconds. Codex clients that render MCP progress can show those updates directly in the tool card; clients that do not still show the normal elapsed time for the single wait call.
Exact commit scope
Supplying a commit checks out that commit in the disposable snapshot and compares it only with its parent. The source checkout's staged, unstaged, and untracked files are excluded. Merge commits need an explicit parent because each parent produces a different review target.
Model and effort
The built-in default is thorough, which resolves to the rolling opus alias at high effort.
The aliases follow the user's installed Claude Code version rather than pinning an aging dated model
ID.
| Profile | Model | Effort | Intended use |
|---|---|---|---|
thorough |
opus |
high |
Shipping and adversarial review |
balanced |
sonnet |
high |
Routine code review |
economy |
sonnet |
medium |
Smaller, cost-sensitive checks |
inherit |
Claude CLI default | Claude CLI default | Follow local Claude configuration |
Claude Fable is also supported as an explicit model, for example model=fable with effort=high.
It is intentionally not a built-in profile because Fable availability and billing may differ from
the normal Claude subscription path. The portable default remains Opus at high effort.
Any review may override model and effort independently. Persistent defaults may be placed in
~/.config/claude-reviewer/config.json or .claude-reviewer.json at the repository root:
{
"profile": "balanced"
}
Per-review values take precedence, followed by user configuration, repository configuration, and the built-in default. Every job records the resolved profile, model, effort, and configuration sources.
Safety model
The original checkout is used only to resolve Git state and construct a disposable snapshot. Claude runs with that snapshot as its working directory. Edit and write tools are disabled, but shell commands are available so the reviewer can run tests and investigate suspicions.
Snapshot Git objects are copied rather than shared or hard-linked, and the local source remote is removed before Claude starts. The reviewer also receives a reduced environment instead of every repository-specific variable from the invoking shell.
Ignored files, including typical local secret files, are not copied. Tests that depend on ignored virtual environments or dependency directories may be unable to run; Claude must report that as unverified rather than claiming a pass.
The disposable snapshot is the primary cross-platform protection against accidental changes. v0.1 does not claim a hostile-code OS sandbox. Review commands can execute repository code, so use the plugin only in repositories you trust.
Native Windows is not supported in v0.1 because the plugin cannot yet guarantee process-tree cancellation or PID identity there. WSL uses the tested Linux path. Setup fails explicitly on native Windows instead of silently offering weaker cancellation.
Development
npm test
npm run check
python3 ~/.codex/skills/.system/plugin-creator/scripts/validate_plugin.py plugins/claude-reviewer
The test suite uses temporary Git repositories and fake Claude executables; it does not consume Claude usage.
Design and acceptance criteria are in docs/SPEC-v0.1.md.
License
MIT. See LICENSE.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。