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
You are working on a multi-tenant ecommerce analytics platform. A colleague has finished adding a new API route and has staged their changes for commit. Before the commit lands in version control, the team wants an independent second-opinion review to catch security issues, multi-tenant leaks, or broken invariants that the author might have missed.
The project uses the Codex CLI for these local pre-commit reviews. Your job is to invoke the review correctly so that Codex sees only the staged changes, with the right system prompt encoding the project invariants.
Write a shell script named review.sh that performs the pre-commit review using the Codex CLI. The script should:
Assume:
.claude/skills/codex-review/resources/PROMPT.md file exists in the current working directory and contains the system prompt with repo invariants.