/codex-integration:codex-consultingfrom codex-integration
Consults OpenAI Codex for a fresh analytical perspective when stuck after 3 failed attempts, needing a second opinion, or requiring web research on unfamiliar errors.
Ships in codex-integration. 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.
You are consulting OpenAI Codex for fresh analytical perspective. You were invoked either because the main Claude instance is stuck after three failed attempts, or because the user explicitly requested a second opinion.
Verify the Codex MCP server is available:
mcp__codex-cli__ping({})
If ping succeeds: Proceed to Step 2.
If ping fails: Report and stop immediately:
Codex MCP server is not available.
This typically means:
1. Codex CLI is not installed (run: npm i -g @openai/codex)
2. Claude Code needs restart (required after plugin installation)
3. Authentication not configured (run: codex login)
4. OpenAI account lacks Codex access (requires ChatGPT Plus/Pro/Team)
Run /codex-check for detailed diagnostics.
Do NOT continue without a successful ping.
Determine the consultation mode:
Auto-escalation (stuck after 3+ failed attempts):
reasoningEffort: "high" for deep analysisOn-demand consultation (user asked for second opinion):
Codex has NO filesystem access. You must provide all relevant code and context.
Problem description and goal
Attempt history (escalation mode)
Code context
Environment details (if relevant)
Structure your prompt with clear sections. Keep it concise — Codex performs deep analysis automatically.
Stuck on: [ONE-LINE PROBLEM DESCRIPTION]
**Goal:** [Clear objective]
**Failed attempts (3x):**
1. [Approach] -> [Specific outcome/error]
2. [Approach] -> [Specific outcome/error]
3. [Approach] -> [Specific outcome/error]
**Error:**
[Full error message/stack trace]
**Code:**
File: [file-path]
[language]
[Minimal but complete relevant code]
**Environment:** [Only if relevant]
What's the root cause and how should I fix it?
For on-demand consultation, adapt the template — omit failed attempts if not applicable, focus on the question.
mcp__codex-cli__codex({
"prompt": "[Your structured prompt]",
"reasoningEffort": "high",
"sessionId": "escalation-[brief-topic]"
})
reasoningEffort: "high" for escalation, omit for on-demandsessionId to enable multi-turn conversationgpt-5.2-codex (optimized for coding, no need to override)If Codex asks for clarification or more information:
mcp__codex-cli__codex again with the same sessionId:mcp__codex-cli__codex({
"prompt": "[Response with additional context]",
"sessionId": "escalation-[same-topic]"
})
Continue until Codex provides actionable recommendations.
Use web search for unfamiliar errors, dependencies, or APIs:
mcp__codex-cli__websearch({
"query": "[error message or technology question]",
"numResults": 10
})
Use when:
If still running in circles after 3 more implementation attempts, notify the user:
I consulted Codex and implemented their recommendations, but I'm still not making progress.
**Codex's diagnosis:**
[Root cause and solution Codex provided]
**Implementation attempts:**
1. [Approach based on Codex recommendation] — [outcome]
2. [Adjusted approach] — [outcome]
3. [Alternative approach] — [outcome]
Would you like me to:
- Try a completely different direction?
- Research alternative solutions?
- Pause and reassess the requirements?
Do NOT re-consult Codex infinitely. Wait for user guidance.
When consultation is complete, provide a structured summary:
## Consultation Result
**Status:** [Resolved | Partially Resolved | Requires User Input]
**Root Cause Identified:**
[Summary of what Codex determined was the underlying issue]
**Solution Implemented:**
[Description of the fix, with file paths and key changes]
**Verification:**
- Tests: [Pass/Fail with details]
- Original error: [Resolved/Persists]
- New issues: [None/List any introduced]
**Remaining Concerns:**
[Any caveats, edge cases, or follow-up recommendations]
DO escalate (running in circles):
Attempt 1: Add null check -> Error: "Cannot read property 'name' of null"
Attempt 2: Initialize object -> Error: "Cannot read property 'name' of null"
Attempt 3: Different null check -> Error: "Cannot read property 'name' of null"
DO NOT escalate (making progress):
Attempt 1: Fix syntax error -> New error: undefined variable
Attempt 2: Define variable -> New error: type mismatch
Attempt 3: Fix types -> Test passes
Common escalation scenarios:
What SKILL.md sets; muted values are Claude Code's defaults
codex-integration:codex-escalation), in the backgroundnpx claudepluginhub it-bens/ai-tools --plugin codex-integrationOther plugins' skills for the same job