Skip to content
Skills Library
AI & agents · Tool integration

codex-consulting

/codex-consulting

Consult OpenAI Codex for fresh analytical perspective. Use when: - Stuck after 3 failed attempts with identical errors (auto-escalation) - Want a second opinion on a problem or approach - Need web research on unfamiliar errors or technologies <example> Context: Claude has tried 3 different approaches to fix a TypeError but the same error persists user: "I've been trying to fix this null pointer error for a while now" assistant: "I've attempted three different fixes but the same error persists. Let me consult Codex for a fresh perspective." <commentary> Three failed attempts with identical erro

Repository
ai-tools ↗
Licence
MIT
Last repository change
26.10.2026

Assessment and security

87/ 100Class: good
Format20 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability17 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 26.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Consult OpenAI Codex for fresh analytical perspective. Use when: - Stuck after 3 failed attempts with identical errors (auto-escalation) - Want a second opinion on a problem or approach - Need web research on unfamiliar errors or technologies <example> Context: Claude has tried 3 different approaches to fix a TypeError but the same error persists user: "I've been trying to fix this null pointer error for a while now" assistant: "I've attempted three different fixes but the same error persists. Let me consult Codex for a fresh perspective." <commentary> Three failed attempts with identical erro

Triggers from the description

assistant:
Original author description

Consult OpenAI Codex for fresh analytical perspective. Use when: - Stuck after 3 failed attempts with identical errors (auto-escalation) - Want a second opinion on a problem or approach - Need web research on unfamiliar errors or technologies <example> Context: Claude has tried 3 different approaches to fix a TypeError but the same error persists user: "I've been trying to fix this null pointer error for a while now" assistant: "I've attempted three different fixes but the same error persists. Let me consult Codex for a fresh perspective." <commentary> Three failed attempts with identical erro

How it works

  1. Step 1: Pre-Flight Check
  2. Step 2: Assess the Request
  3. Step 3: Gather Context
  4. Step 4: Consult Codex
  5. Step 5: Research if Needed
  6. Step 6: Implement and Verify
  7. Step 7: Second-Level Escalation
  8. Output Format
  9. Recognition Patterns
Original SKILL.md headings · 235 lines, 912 words
SKILL.md preview
---
name: codex-consulting
description: |
  Consult OpenAI Codex for fresh analytical perspective. Use when:
  - Stuck after 3 failed attempts with identical errors (auto-escalation)
  - Want a second opinion on a problem or approach
  - Need web research on unfamiliar errors or technologies

  <example>
  Context: Claude has tried 3 different approaches to fix a TypeError but the same error persists
  user: "I've been trying to fix this null pointer error for a while now"
  assistant: "I've attempted three different fixes but the same error persists. Let me consult Codex for a fresh perspective."
  <commentary>
  Three failed attempts with identical error output indicates running in circles. Fresh analytical perspective from a different model may reveal blind spots.
  </commentary>
  </example>

  <example>
  Context: User wants a second opinion from a different model
  user: "Ask Codex what it thinks about this approach"
  assistant: "I'll consult Codex for an independent analysis of this approach."
  <commentary>
  User explicitly requests Codex consultation. No failure threshold needed for on-demand use.
  </commentary>
  </example>

  <example>
  Context: Unfamiliar error with an external dependency
  user: "I keep getting this cryptic error from the SDK"
  assistant: "Let me consult Codex — it can also search the web for recent information about this error."
  <commentary>
  Unfamiliar or cryptic errors benefit from web search capability and a second opinion.
  </commentary>
  </example>

  Do NOT use for:
  - Making progress (each attempt reveals new errors or reduces failures)
  - First or second attempts at fixing an issue
  - Questions that can be answered directly without a second opinion
context: fork
agent: codex-integration:codex-escalation
allowed-tools:
  - mcp__codex-cli__codex
  - mcp__codex-cli__websearch
  - mcp__codex-cli__ping
  - Read
  - Edit
  - Bash
  - Grep
  - Glob
---

# Codex Consultation Protocol

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.

## Step 1: Pre-Flight Check

Verify the Codex MCP server is available:

```json
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.

## Step 2: Assess the Request

Determine the consultation mode:

**Auto-escalation** (stuck after 3+ failed attempts):
- Thorough context gathering required
- Use `reasoningEffort: "high"` for deep analysis
- Follow the full protocol (Steps 3-7)

**On-demand consultation** (user asked for second opinion):
- Lighter context gathering
- Default reasoning effort
- Skip escalation tracking (Steps 6-7 optional)

## Step 3: Gather Context

Codex has NO filesystem access. You must provide all relevant code and context.

### Required Information

1. **Problem description and goal**
   - What are you trying to accomplish?
   - What is the expected outcome?

2. **Attempt history** (escalation mode)
   - Summarize 3+ failed attempts with specific outcomes
   - Include error messages, test failures, or unexpected behavior

3. **Code context**
   - Use Read tool to gather relevant code snippets
   - Include problematic code and related files
   - Note file paths for all code
   - Keep snippets focused but complete

4. **Environment details** (if relevant)
   - Recent changes, dependencies, configuration

## Step 4: Consult Codex

### Format Your Prompt

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.

### Call Codex

```json
mcp__codex-cli__codex({
  "prompt": "[Your structured prompt]",
  "reasoningEffort": "high",
  "sessionId": "escalation-[brief-topic]"
})
```

- Use `reasoningEffort: "high"` for escalation, omit for on-demand
- Use `sessionId` to enable multi-turn conversation
- Default model is `gpt-5.2-codex` (optimized for coding, no need to override)

### Multi-Turn Conversations

If Codex asks for clarification or more information:

1. Gather the requested information using your tools (Read, Grep, Bash)
2. Call `mcp__codex-cli__codex` again with the **same `sessionId`**:

```json
mcp__codex-cli__codex({
  "prompt": "[Response with additional context]",
  "sessionId": "escalation-[same-topic]"
})
```

Continue until Codex provides actionable recommendations.

## Step 5: Research if Needed

Use web search for unfamiliar errors, dependencies, or APIs:

```json
mcp__codex-cli__websearch({
  "query": "[error message or technology question]",
  "numResults": 10
})
```

Use when:
- Error messages reference unfamiliar libraries or APIs
- Codex suggests a solution involving tools you're not familiar with
- The problem might be a known issue with a recent update

## Step 6: Implement and Verify

### Validate the Recommendation

1. **Verify the diagnosis** — Does Codex's root cause match all observed symptoms?
2. **Assess feasibility** — Can this be implemented in the project context?
3. **Check blind spots** — What project-specific constraints might Codex miss?

### Implement

- You are the decision-maker; Codex provides recommendations
- Use your tools (Read, Edit, Bash) to implement, test, and verify
- Adapt the solution as needed based on project context

### Verify

1. Run relevant tests
2. Verify the original error is resolved
3. Check for new issues introduced
4. Confirm the goal is achieved

## Step 7: Second-Level Escalation

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.

## Output Format

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]
```

## Recognition Patterns

**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:**
- Same error after three different fix attempts
- Tests fail identically after three iterations
- Build/logic errors unresolved after three approaches
- Repeated timeouts/performance issues without improvement

Versions

The database has no other skills named codex-consulting.

Database snapshot: 13.11.2026 · package version 89af08cbb7a4 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100ask-codex
    Consult OpenAI Codex for investigation, debugging, or code review. Use when user explicitly asks to "ask codex", "check with codex", "codex review", or as a last resort when stuck after 4+ failed attempts at debugging, investigation, or bug fix and completely out of ideas. Codex…
  • 100consult-codex
    Consult the codex MCP server as a second AI opinion via a three-phase Claude-orchestrated flow. Use for proactive reviews (design, plan, code) or reactive stuck recovery. Requires codex.enabled=true in .feature-flow.yml and a configured codex MCP server.
  • 90codex
    Ask OpenAI's Codex CLI for help — a second opinion, a code review or a delegated task. Use when the user says "/codex", "ask Codex", "have Codex do it" or "second opinion".
  • 100codex-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.
  • 100ask-codex
    Consult OpenAI Codex for investigation, debugging, or code review. Use when user explicitly asks to "ask codex", "check with codex", "codex review", or as a last resort when stuck after 4+ failed attempts at debugging, investigation, or bug fix and completely out of ideas. Codex…
  • 100codex-skill
    Leverage OpenAI Codex/GPT models for autonomous code implementation, code review, and plan review. Triggers: "codex", "use gpt", "gpt-5", "let openai", "full-auto", "adversarial review", "second opinion review", "用codex", "让gpt实现", "对抗式审查", "让codex审查计划", "第二意见". Use this skill…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.