Use when the user wants a local second-opinion code review via OpenAI Codex CLI — on the current branch, staged changes, a single file, or a piped diff. Triggers include "codex review", "review with codex", "run codex on this diff", "second opinion from codex", or pre-commit / pre-PR review requests that ask for codex specifically.
90
97%
Does it follow best practices?
Impact
97%
2.25xAverage score across 2 eval scenarios
Passed
No known issues
{
"context": "Tests whether the agent correctly handles a large multi-file diff by splitting the review into backend and frontend slices, writing each diff to /tmp/, piping via stdin, passing PROMPT.md, and using --sandbox read-only for each invocation.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Split into separate passes",
"description": "Runs at least two separate codex exec invocations — one scoped to the backend directory and one to the frontend directory — rather than a single invocation covering all files",
"max_score": 20
},
{
"name": "Path-scoped git diff",
"description": "Uses path arguments on git diff to restrict each pass (e.g., 'git diff main...HEAD -- backend' and '-- frontend')",
"max_score": 15
},
{
"name": "Write diff to /tmp/",
"description": "Each diff is written to a file under /tmp/ before being passed to codex",
"max_score": 10
},
{
"name": "Pipe via stdin not inline",
"description": "Each codex exec call receives the diff via stdin pipe (cat /tmp/... | codex exec ...), not as an inline argument",
"max_score": 10
},
{
"name": "PROMPT.md passed each time",
"description": "Each codex exec invocation includes the contents of .claude/skills/codex-review/resources/PROMPT.md as its prompt",
"max_score": 15
},
{
"name": "--sandbox read-only flag",
"description": "Both codex exec invocations include --sandbox read-only",
"max_score": 10
},
{
"name": "Output captured separately",
"description": "Each pass captures its output to a separate file (e.g., /tmp/codex-review-backend.out and /tmp/codex-review-frontend.out)",
"max_score": 10
},
{
"name": "Branch vs main diff",
"description": "Uses 'git diff main...HEAD' (three-dot syntax) to diff the feature branch against main",
"max_score": 10
}
]
}