plan-refine-codex
Refine a Claude Code plan using OpenAI Codex. Use when you have a plan file and want a second opinion or to improve robustness.
Best use case
plan-refine-codex is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Refine a Claude Code plan using OpenAI Codex. Use when you have a plan file and want a second opinion or to improve robustness.
Teams using plan-refine-codex should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/plan-refine-codex/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How plan-refine-codex Compares
| Feature / Agent | plan-refine-codex | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Refine a Claude Code plan using OpenAI Codex. Use when you have a plan file and want a second opinion or to improve robustness.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
SKILL.md Source
# Plan Refinement with Codex Use OpenAI Codex to review and refine implementation plans, adding robustness and catching edge cases. ## Prerequisites - `codex` CLI installed and authenticated (`codex login`) - A plan file exists (typically at `~/.claude/plans/<name>.md`) ## Usage | Invocation | Behavior | |------------|----------| | `/plan-refine-codex` | Refine the current plan file (if in plan mode) | | `/plan-refine-codex /path/to/plan.md` | Refine the specified plan file | ## How to Refine a Plan Run codex exec with `--full-auto` and ask it to read and refine the plan file: ```bash codex exec --full-auto "Please read the file $PLAN_FILE and refine the plan. Make it more robust, handle edge cases, and simplify where possible. Return only the improved plan in markdown format." ``` **Important**: Have codex read the file itself rather than piping content via stdin. Stdin piping has reliability issues. ## Example ```bash codex exec --full-auto "Please read the file /Users/me/.claude/plans/my-plan.md and refine the plan. Look for edge cases like: error handling, input validation, permission issues. Return only the improved plan in markdown format." ``` ## Known Issues & Workarounds ### Issue: Model not available ``` ERROR: The 'o3' model is not supported when using Codex with a ChatGPT account. ``` **Workaround**: Don't specify `-m o3`. Use the default model (`gpt-5.2-codex`). ### Issue: Stdin content not received When piping content via stdin, codex may not receive it: ```bash # This may fail - codex doesn't see the piped content cat plan.md | codex exec "Refine this plan..." ``` **Workaround**: Ask codex to read the file directly in the prompt. ### Issue: Heredoc with embedded bash fails ```bash # This fails due to nested $() and backticks codex exec "$(cat <<'EOF' ...plan with bash code... EOF )" ``` **Workaround**: Reference the file path instead of embedding content. ## Iterating on Refinement You can pass the plan to codex multiple times for progressive improvement: 1. **First pass**: Focus on edge cases and error handling 2. **Second pass**: Focus on simplification and clarity 3. **Final pass**: Focus on production-readiness After each refinement, update your plan file with the improved version. ## Related Skills - `/roborev-review` - Get AI code review on your implementation - `/roborev-refine` - Automated review-fix loop
Related Skills
kitt-create-plans
Create hierarchical project plans optimized for solo agentic development. Use when planning projects, phases, or tasks that the AI agent will execute. Produces agent-executable plans with verification criteria, not enterprise documentation. Handles briefs, roadmaps, phase plans, and context handoffs.
julien-workflow-advice-codex
Get OpenAI Codex CLI's opinion on code, bugs, or implementation. Use when you want a second AI perspective during coding sessions.
consult-codex
Compare OpenAI Codex GPT-5.2 and code-searcher responses for comprehensive dual-AI code analysis. Use when you need multiple AI perspectives on code questions.
codex-team
Use when you have 2+ tasks that Codex agents should execute. Runtime-native: Codex sub-agents when available, Codex CLI fallback otherwise. Handles file conflicts via merge/wave strategies. Triggers: "codex team", "spawn codex", "codex agents", "use codex for", "codex fix".
codex
Run OpenAI's Codex CLI agent in non-interactive mode using `codex exec`. Use when delegating coding tasks to Codex, running Codex in scripts/automation, or when needing a second agent to work on a task in parallel.
codex-sessions-skill-scan
Daily skill health scan: analyze ~/.codex/sessions plus per-repo session logs under ~/dev (default last 1 day) and summarize skill invocations + likely failures for personal skills in ~/dev/agent-skills (missing paths, tool failures, complex-task word triggers). Optional: include best-effort local OTel signals.
codex-reviewer
Use OpenAI's Codex CLI as an independent code reviewer to provide second opinions on code implementations, architectural decisions, code specifications, and pull requests. Trigger when users request code review, second opinion, independent review, architecture validation, or mention Codex review. Provides unbiased analysis using GPT-5-Codex model through the codex exec command for non-interactive reviews.
codex-review
Two-pass adversarial review of design documents and implementation plans using OpenAI Codex CLI. Invokes Codex to review plans section-by-section (pass 1), then holistically (pass 2), feeding critique back for revision. Use when you have a design doc, architecture plan, or implementation plan that should be stress-tested before execution.
codex-cli-bridge
Bridge between Claude Code and OpenAI Codex CLI - generates AGENTS.md from CLAUDE.md, provides Codex CLI execution helpers, and enables seamless interoperability between both tools
codex-advisor
Get a second opinion from OpenAI Codex CLI for plan reviews, code reviews, architecture decisions, and hard problems. Use when you need external validation, want to compare approaches, or are stuck on a difficult problem.
business-plan
Write, structure, and update a business plan for a solopreneur. Use when creating a plan from scratch, updating an existing plan after a pivot or new phase, or preparing a plan to share with investors, partners, or even just to clarify your own strategy. Covers executive summary, market analysis, competitive positioning, revenue model, operations plan, financial projections, and risk assessment — all adapted for a one-person business. Trigger on "write a business plan", "business plan", "create my plan", "business plan template", "update my business plan", "plan for my business", "investor pitch plan".
airtight-plans
Write structured multi-step implementation plans in markdown format. Plans use numbered steps with clear titles and detailed instructions. Use when asked to create an implementation plan, development roadmap, or multi-step task breakdown.