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 invokes a staged-only pre-commit Codex review: using 'git diff --staged' to scope the diff, writing to a /tmp/ file first, piping via stdin (not inline), passing PROMPT.md, using --sandbox read-only, and capturing output.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Staged-only diff command",
"description": "Uses 'git diff --staged' (not 'git diff HEAD' or 'git diff main...HEAD') to capture only staged changes",
"max_score": 15
},
{
"name": "Write diff to /tmp/",
"description": "Writes the diff output to a file under /tmp/ (e.g., /tmp/codex-review.diff) before passing it to codex",
"max_score": 15
},
{
"name": "Pipe via stdin not inline",
"description": "Passes the diff to codex exec via stdin pipe (cat /tmp/... | codex exec ...) rather than embedding the diff inline in the command string",
"max_score": 15
},
{
"name": "PROMPT.md passed",
"description": "Passes the contents of .claude/skills/codex-review/resources/PROMPT.md as the prompt argument to codex exec",
"max_score": 15
},
{
"name": "--sandbox read-only flag",
"description": "Includes --sandbox read-only in the codex exec invocation",
"max_score": 10
},
{
"name": "Output captured",
"description": "Redirects codex output to a file (e.g., /tmp/codex-review.out) rather than only printing to terminal",
"max_score": 15
},
{
"name": "CRITICAL/HIGH surfacing",
"description": "Script or accompanying comment indicates that CRITICAL and HIGH findings should be surfaced / reviewed after capture",
"max_score": 15
}
]
}