Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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 is slow (2-5 min), so only escalate when truly stuck. Codex runs in read-only mode with full project access — it analyzes, we implement.
.claude/skills/umputun-ask-codex/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-10 | ✗→✓ | ▲ Improved | 107% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 192% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 114% | 0% |
| case-14 | ✗→✓ | ▲ Improved | 66% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 79% | 0% |
Consult OpenAI Codex (GPT-5.5) as a second opinion for investigation, debugging, or review tasks.
Explicit:
Automatic (last resort — stuck detection):
Run which codex to verify the CLI is installed. If not found, inform the user and stop.
Gather context from the current conversation:
Codex does NOT auto-load Claude Code's memory files — it only reads AGENTS.md. To give Codex the same project context Claude follows, prepend the memory-load preamble described in Step 3.
Build a focused prompt. Do NOT dump entire files — codex has full project access and can read them itself. Provide file paths and line references so codex knows where to look.
Prepend a memory-load preamble. Codex auto-loads only AGENTS.md; it does NOT read Claude Code's memory files (CLAUDE.md, CLAUDE.local.md, .claude/rules/, ~/.claude/CLAUDE.md), so the project conventions Claude follows are invisible to Codex unless you tell it to read them. Prepend this line to the prompt:
First read these project guidance files if present: <ABS_HOME>/.claude/CLAUDE.md, CLAUDE.md, CLAUDE.local.md, .claude/rules/<ABS_HOME> to the absolute home path (run echo $HOME, e.g. /home/<user>) and write the literal path — do NOT leave the string $HOME in the prompt. Whether $HOME expands depends on how the prompt is passed to Codex, and Codex may open the file with a non-shell tool that never expands it, so only a literal absolute path is reliable.@ prefix — @file is inert in codex exec (literal text, not an import).Template for investigation/debug:
# [Investigation/Debug] Request
## Problem
[2-3 sentence description]
## Context
- Files: [path/to/file.go:lineNumber, ...]
- Observed: [what's happening]
- Expected: [what should happen]
## What We Tried
[List approaches and outcomes, or "First consultation" if fresh question]
## Question
[Specific, focused question for codex to answer]
Provide:
1. Root cause analysis (if debugging)
2. Concrete recommendation with file:line references
3. Why previous approaches failed (if applicable)
Keep response focused and actionable.Template for code review (adversarial):
When asked for a code review, use this adversarial prompt that requires structured JSON output:
<role>
You are performing an adversarial code review.
Your job is to break confidence in the change, not to validate it.
</role>
<task>
Review the provided changes as if you are trying to find the strongest reasons
this change should not ship yet.
Scope: [files and changes to review — paths, branch diff, or description]
Focus: [specific area if user specified one, otherwise "general"]
</task>
<operating_stance>
Default to skepticism.
Assume the change can fail in subtle, high-cost, or user-visible ways until
the evidence says otherwise. Do not give credit for good intent or partial fixes.
If something only works on the happy path, treat that as a real weakness.
</operating_stance>
<attack_surfaces>
Prioritize failures that are expensive, dangerous, or hard to detect:
- auth, permissions, tenant isolation, and trust boundaries
- data loss, corruption, duplication, and irreversible state changes
- rollback safety, retries, partial failure, and idempotency gaps
- race conditions, ordering assumptions, stale state, and re-entrancy
- empty-state, nil, timeout, and degraded dependency behavior
- version skew, schema drift, migration hazards, and compatibility regressions
- observability gaps that would hide failure or make recovery harder
</attack_surfaces>
<finding_bar>
Report only material findings. No style feedback, naming nitpicks, or speculative
concerns without evidence. Each finding must answer:
1. What can go wrong?
2. Why is this code path vulnerable?
3. What is the likely impact?
4. What concrete change would reduce the risk?
Prefer one strong finding over several weak ones.
</finding_bar>
<grounding_rules>
Every finding must be defensible from actual code you can see.
Do not invent files, lines, code paths, or runtime behavior you cannot support.
If a conclusion depends on an inference, state that explicitly and keep the
confidence score honest.
</grounding_rules>
<structured_output>
Return ONLY valid JSON. Example with concrete values:
{
"verdict": "needs-attention",
"summary": "auth middleware skips token validation on retry paths",
"findings": [
{
"severity": "high",
"title": "token validation bypassed on retry",
"body": "retryHandler re-enters serveHTTP without revalidating the bearer token, allowing expired tokens through on transient failures",
"file": "internal/auth/middleware.go",
"line_start": 42,
"line_end": 55,
"confidence": 0.85,
"recommendation": "move token validation before the retry loop entry point"
}
],
"next_steps": ["add test for expired-token retry scenario"]
}
Allowed values:
- verdict: "approve" or "needs-attention"
- severity: "critical", "high", "medium", or "low"
- confidence: 0.0 to 1.0
Use "needs-attention" if there is any material risk worth blocking on.
Use "approve" only if you cannot support any substantive finding.
</structured_output>Run codex in background (it takes 2-5 minutes for complex analysis):
bashcodex exec -m gpt-5.5 \ --sandbox read-only \ -c model_reasoning_effort="xhigh" \ -c stream_idle_timeout_ms=600000 \ "prompt here" < /dev/null
Execution rules:
< /dev/null (as shown). codex exec reads stdin to append a <stdin> block even when the prompt is a positional arg, so an inherited open pipe (common under a background launch) never closes and codex blocks forever on "Reading additional input from stdin…"; /dev/null gives immediate EOF.run_in_background: true in Bash toolFlags:
--sandbox read-only — codex can read all project files but cannot modify anything-m gpt-5.5 — latest model (adjust as newer versions become available)model_reasoning_effort="xhigh" — deepest reasoning tierFor investigation/debug responses (unstructured):
**Codex Analysis:**
[Codex's response — cleaned up and formatted]
---
**Assessment:** [Your 2-3 sentence evaluation]
**Proposed action:** [What codex suggests — awaiting approval]For review responses (structured JSON):
Parse the JSON output and present findings sorted by severity, filtered by confidence:
**Codex Review: [verdict]**
[summary]
**Findings** (N issues):
1. **[critical]** title (confidence: 0.9)
file.go:42-55
[body]
→ [recommendation]
2. **[high]** title (confidence: 0.8)
...
**Next steps:** [list]
---
**Assessment:** [Your evaluation — which findings are valid, which are false positives]CRITICAL: After presenting findings, STOP. Do not apply fixes, do not touch files, do not start implementing suggestions. Explicitly ask the user what to do next. Codex findings are input for discussion, not automatic work orders.
which codex — install via npm install -g @openai/codexcodex login if getting auth errorsstream_idle_timeout_ms for complex analyses< /dev/null stdin redirect — add it (see Step 4).| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 16,412 | 35,396 | +116% | 1 | 1 | 0% | 2,483 | 2,767 | +11% | 0 | 0 | — |
case-02 | fail→fail | 9,759 | 35,337 | +262% | 1 | 1 | 0% | 1,077 | 7,079 | +557% | 0 | 0 | — |
case-03 | fail→fail | 8,241 | 4,034 | -51% | 1 | 1 | 0% | 1,281 | 2,637 | +106% | 0 | 0 | — |
case-04 | fail→fail | 9,334 | 7,782 | -17% | 1 | 1 | 0% | 1,453 | 2,884 | +98% | 0 | 0 | — |
case-05 | pass→pass | 9,947 | 6,532 | -34% | 1 | 1 | 0% | 1,639 | 3,686 | +125% | 0 | 0 | — |
case-06 | fail→fail | 11,596 | 7,262 | -37% | 1 | 1 | 0% | 1,664 | 2,822 | +70% | 0 | 0 | — |
case-07 | fail→fail | 10,772 | 7,230 | -33% | 1 | 1 | 0% | 1,568 | 2,922 | +86% | 0 | 0 | — |
case-08 | fail→fail | 10,803 | 5,096 | -53% | 1 | 1 | 0% | 1,785 | 3,288 | +84% | 0 | 0 | — |
case-09 | fail→fail | 10,727 | 6,713 | -37% | 1 | 1 | 0% | 1,966 | 2,915 | +48% | 0 | 0 | — |
case-10 | fail→pass | 12,116 | 7,733 | -36% | 1 | 1 | 0% | 1,839 | 3,809 | +107% | 0 | 0 | — |
case-11 | pass→pass | 11,298 | 3,432 | -70% | 1 | 1 | 0% | 2,130 | 3,037 | +43% | 0 | 0 | — |
case-12 | fail→pass | 15,315 | 3,929 | -74% | 1 | 1 | 0% | 1,062 | 3,104 | +192% | 0 | 0 | — |
case-13 | fail→pass | 10,746 | 6,392 | -41% | 1 | 1 | 0% | 1,636 | 3,509 | +114% | 0 | 0 | — |
case-14 | fail→pass | 11,940 | 2,964 | -75% | 1 | 1 | 0% | 1,780 | 2,961 | +66% | 0 | 0 | — |
case-15 | fail→pass | 12,006 | 4,543 | -62% | 1 | 1 | 0% | 1,782 | 3,198 | +79% | 0 | 0 | — |
case-16 | fail→pass | 9,935 | 3,410 | -66% | 1 | 1 | 0% | 1,463 | 2,937 | +101% | 0 | 0 | — |
case-17 | pass→pass | 8,670 | 3,775 | -56% | 1 | 1 | 0% | 1,308 | 3,074 | +135% | 0 | 0 | — |
case-18 | pass→pass | 9,529 | 4,059 | -57% | 1 | 1 | 0% | 1,448 | 3,156 | +118% | 0 | 0 | — |
case-19 | fail→pass | 12,155 | 3,098 | -75% | 1 | 1 | 0% | 1,948 | 2,933 | +51% | 0 | 0 | — |
case-20 | pass→fail | 5,787 | 5,570 | -4% | 1 | 1 | 0% | 920 | 2,729 | +197% | 0 | 0 | — |
case-21 | pass→fail | 2,969 | 7,354 | +148% | 1 | 1 | 0% | 407 | 2,734 | +572% | 0 | 0 | — |
case-22 | pass→fail | 3,603 | 3,525 | -2% | 1 | 1 | 0% | 596 | 2,721 | +357% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 16 counted toward the lift figure. The other 6 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +18 percentage points is the difference between those two pass rates over the 16 comparable cases. 4 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.