Offload technical validation to OpenAI Codex — get automated second opinions on plans, verify implementations, and research libraries, APIs, and code patterns using Codex CLI via hook-triggered reviews.
Give Claude Code a "second opinion" by letting it consult OpenAI's Codex CLI for independent verification.
When Claude Code creates a plan, Codex automatically reviews it before you approve. Two AIs checking each other's work catches more edge cases.
Automatic review on:
Manual use for:
Install Codex CLI:
npm install -g @openai/codex
Configure your OpenAI API key.
| Model | Context | Speed | Best for |
|---|---|---|---|
gpt-5.5 | 400k | Standard | Most capable frontier model — deepest analysis, architecture, novel problems (use with high/xhigh reasoning) |
gpt-5.4 | 1M (272k standard tier) | Standard, text+image | Default — capable enough for most reviews, faster than 5.5 |
gpt-5.3-codex-spark | 128k | ~1200 tok/s (Cerebras) | Quick fact checks, trivial queries |
gpt-5.3-codex | 272k | ~65 tok/s | General-purpose coding tasks |
gpt-5.2-codex | 272k | Standard | Older alternative |
gpt-5.1-codex-max | 272k | Standard | Older alternative |
gpt-5.1-codex-mini | 272k | Fast | Budget option |
Note: for
gpt-5.4, inputs beyond the 272k standard tier trigger a pricing surcharge (input cost doubles).
claude plugin add cathrynlavery/codex-skill
This auto-registers both the /codex skill and the automatic plan review hook. No manual configuration needed.
git clone https://github.com/cathrynlavery/codex-skill.git
mkdir -p ~/.claude/skills/codex
cp codex-skill/skills/codex/SKILL.md ~/.claude/skills/codex/
Copy the hook script:
mkdir -p ~/.claude/hooks
cp codex-skill/hooks/plan-review.sh ~/.claude/hooks/
chmod +x ~/.claude/hooks/plan-review.sh
Add to your ~/.claude/settings.json:
{
"hooks": {
"PostToolUse": [
{
"matcher": "ExitPlanMode",
"hooks": [
{
"type": "command",
"command": "~/.claude/hooks/plan-review.sh",
"timeout": 120
}
]
}
]
}
}
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Claude │────>│ ExitPlanMode│────>│ Codex │
│ creates plan│ │ (hook) │ │ reviews │
└─────────────┘ └─────────────┘ └─────────────┘
│
v
┌─────────────┐
│ You approve │
│ with context│
└─────────────┘
The hook intercepts ExitPlanMode and reads the plan from tool_response.plan (the field where Claude Code stores the plan content). It passes the plan to Codex for review and displays the result before you approve.
Codex reviews for:
Invoke directly:
/codex
Or ask Claude:
"Can you verify this approach with Codex?" "Get a second opinion on this architecture"
The skill uses gpt-5.4 by default — capable enough for most reviews and faster than the frontier model. For the hardest questions (novel architecture, deep analysis), it escalates to gpt-5.5 with high reasoning effort. For trivial fact checks, it can drop to gpt-5.3-codex-spark.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
CODEX SECOND OPINION ON PLAN
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
LGTM - Plan covers the main implementation steps.
Minor suggestions:
- Consider adding error handling for the API timeout case
- Step 3 could be split into separate DB migration and code changes
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Hook doesn't fire: Make sure Codex CLI is installed (codex --version) and on your PATH. The hook exits silently on errors to avoid blocking your workflow.
No plan content found: The hook reads from tool_response.plan (primary) with fallbacks to tool_response.filePath and filesystem search. If you're seeing issues, check that you're using a current version of Claude Code.
MIT
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
Editorial-quality technical and product diagrams — 13 types rendered as standalone HTML with inline SVG, skinnable to match your brand
npx claudepluginhub cathrynlavery/codex-skillAutonomous Claude + Codex review loop. Plan a feature with adversarial pushback, or audit code, all in one window.
Command-driven Claude/Codex review workflows for multi-round plan and implementation review.
Auto-converge a Claude-written plan via Codex (gpt-5) review iterations until clean ALLOW or max-iter.
Independent plan/spec reviewer for AI coding agents. Verifies claims against the workspace and returns structured verdicts with findings.
OpenAI Codex CLI integration with MCP server and skills for plan review, code review, and codebase analysis
Describe your goal, approve the spec, then step away — Claude and Codex loop together until it's right.