/codex:plan-reviewfrom codex
Uses Codex to critique implementation plans for gaps, risks, and missing steps before building. Triggered by second-opinion phrasing like 'sanity-check my plan' or 'poke holes in it'.
Ships in codex. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use Codex to critique implementation plans for gaps, risks, and better alternatives. Codex consults; Claude writes.
Always use the MCP tool. The plugin's MCP server (scripts/codex-mcp-server.mjs, started from .mcp.json) runs codex exec for each call. Tool name: mcp__plugin_codex_cli__codex. If the example below errors with an unknown-tool error, run /mcp and substitute the actual prefix (e.g., mcp__codex_cli__codex).
Pin model: "gpt-6.2-sol" with config: { "model_reasoning_effort": "medium" } on the opening call. Plan review benefits from flagship reasoning — don't downgrade to gpt-6-luna here. Set both on the first codex call only; codex-reply reuses them unless you escalate. Honor an explicit user-named model if given. See ../references/patterns.md → Models and Reasoning effort. Escalate to gpt-6.2-astra (pass model + config on the codex-reply) from round 3, when a disagreement survives a round, or when re-reviewing the same plan in a fresh thread — see ../references/patterns.md → Escalating to Astra.
Codex reads files from the project root. For plans living outside the repo (e.g., ~/.claude/plans/...), read them with Claude's Read tool first and embed the content in the prompt — Codex can't see paths outside its cwd.
Give Codex enough context to critique against reality, not assumptions. A plan reviewed blind gets flagged for things you've already handled. State the plan's goal, the hard constraints it must respect (tech stack, deadlines, backward-compat, what's already decided), and what's deliberately out of scope. The critique is only as good as the context you prime it with.
mcp__plugin_codex_cli__codex({
"prompt": "<task>\nReview this implementation plan before it is built.\nGoal: [GOAL]\nConstraints already decided: [CONSTRAINTS]\nOut of scope: [OUT OF SCOPE]\n---\n[PLAN CONTENT HERE]\n---\n</task>\n\n<structured_output_contract>\nReturn, most serious first:\n1. Gaps or missing steps\n2. Risks not addressed\n3. Better alternatives, if any\nName the plan step each point applies to. If the plan is sound, say so in one line.\n</structured_output_contract>\n\n<grounding_rules>\nCheck claims about the codebase against the actual files. Label inferences.\n</grounding_rules>",
"sandbox": "read-only",
"model": "gpt-6.2-sol",
"config": { "model_reasoning_effort": "medium" }
})
If the plan lives inside the repo, you can just reference the path:
mcp__plugin_codex_cli__codex({
"prompt": "Review the implementation plan at docs/plans/auth-rewrite.md. Flag gaps, risks, and better alternatives.",
"sandbox": "read-only",
"model": "gpt-6.2-sol",
"config": { "model_reasoning_effort": "medium" }
})
Let Codex cross-check the plan against the actual code:
mcp__plugin_codex_cli__codex({
"prompt": "Review this plan:\n\n[PLAN CONTENT]\n\nRead these source files for context before critiquing:\n- src/auth/login.ts\n- src/middleware/session.ts\n\nEvaluate whether the plan accounts for the real code structure.",
"sandbox": "read-only",
"model": "gpt-6.2-sol",
"config": { "model_reasoning_effort": "medium" }
})
Risk assessment:
mcp__plugin_codex_cli__codex({
"prompt": "Risk review of this plan:\n\n[PLAN CONTENT]\n\nEvaluate:\n- Breaking changes\n- Data loss potential\n- Rollback complexity\n- Dependencies that could fail",
"sandbox": "read-only",
"model": "gpt-6.2-sol",
"config": { "model_reasoning_effort": "medium" }
})
Completeness check:
mcp__plugin_codex_cli__codex({
"prompt": "Completeness review of this plan:\n\n[PLAN CONTENT]\n\nEvaluate:\n- Edge cases covered?\n- Testing addressed?\n- Missing steps?",
"sandbox": "read-only",
"model": "gpt-6.2-sol",
"config": { "model_reasoning_effort": "medium" }
})
codex-reply)When you're still iterating on the same plan, continue the existing thread rather than starting a new codex call. Codex keeps the plan and its prior critique in context; starting fresh discards that reasoning and forces re-reading.
Typical loop: initial critique → Claude revises the plan → codex-reply with the revised sections asking "does this address your concern?" → Codex confirms or pushes back → repeat.
Cap at 3–4 rounds total, and run round 3 onward on gpt-6.2-astra. Plan review should converge fast; if you're still going at round 5, stop and surface the open questions to the user rather than letting the dialog spiral.
threadId is an MCP argument — pass it as the threadId field of codex-reply, not in the prompt text. See ../references/mcp-schema.md for wrong-vs-right examples.
Example — three rounds on the same plan:
# Round 1 — initial critique (opening call pins model + effort)
mcp__plugin_codex_cli__codex({
"prompt": "Review this plan:\n\n[PLAN CONTENT]\n\nFlag gaps, risks, and better alternatives.",
"sandbox": "read-only",
"model": "gpt-6.2-sol",
"config": { "model_reasoning_effort": "medium" }
})
# → threadId: "019da14b-..." / flags: "No rollback strategy for the schema migration in step 3."
# Round 2 — Claude revises and resubmits only the changed section
mcp__plugin_codex_cli__codex-reply({
"threadId": "019da14b-...",
"prompt": "Revised step 3 to use an expand-contract migration with a reversible intermediate state:\n\n[REVISED SECTION]\n\nDoes this address the rollback concern?"
})
# Round 3 — triage remaining risks; escalate to gpt-6.2-astra (the thread keeps its history)
mcp__plugin_codex_cli__codex-reply({
"threadId": "019da14b-...",
"prompt": "Of the risks you flagged, which would actually block merge vs. which can be mitigated post-launch?",
"model": "gpt-6.2-astra",
"config": { "model_reasoning_effort": "medium" }
})
Start a fresh thread when: reviewing a different plan, the threadId is no longer in context, or the plan has been rewritten so substantially that re-priming is cleaner than patching. See ../references/patterns.md.
Codex's critique is input, not instructions — treat it the way you'd treat a thoughtful colleague's review, not a verdict.
../references/patterns.md → Validation). Weigh each point against the actual constraints before revising.../references/patterns.md → Presenting results. For more prompt blocks, see ../references/prompting.md.sandbox: "read-only".workspace-write, danger-full-access, or --dangerously-bypass-approvals-and-sandbox.If the MCP server is unavailable, see ../references/commands.md for the Bash codex exec form. Requires dangerouslyDisableSandbox: true. Don't pipe with $(cat plan.md) — Codex doesn't expand shell substitutions; either embed the content or pass a repo-relative path.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
4 skills in this plugin
/adversarial-reviewHave Codex try to break a change before it ships — a skeptical review that challenges the design, assumptions, and failure modes of a diff or branch and returns structured findings (verdict, severity, file:line, confidence). Trigger on "adversarial review", "challenge this change/design with Codex", "pressure-test this before I ship", "have Codex try to break this", "is this safe to merge", or a review focused on a risk area (auth, data loss, rollback, race conditions, retries). Do NOT use for a routine bug/style pass over a diff (that's diff-review), for critiquing a plan before code exists (plan-review), or for mapping architecture (codebase-analysis)./codebase-analysisCodebase analysis via the Codex MCP server with a read-only sandbox. Trigger when user needs architecture overview ("analyze this codebase with Codex", "have Codex map dependencies"), onboarding to unfamiliar code, understanding legacy systems, or identifying technical debt./diff-reviewGet Codex's code review of git changes via the Codex MCP server. Trigger when user wants a second opinion on code changes ("have Codex review my changes", "get code review from Codex", "review this diff with Codex"), or as a final check before committing.npx claudepluginhub robbyt/claude-skills --plugin codexOther plugins' skills for the same job