Source profileQuality 84/100

tobihagemann/turbo/claude/skills/consult-codex/SKILL.md

consult-codex

Multi-turn consultation with Codex CLI for second opinions, brainstorming, or collaborative problem-solving. Use when the user asks to "consult codex", "ask codex", "get codex's opinion", "brainstorm with codex", "discuss with codex", or "chat with codex".

Source repository stars
398
Declared platforms
1
Static risk flags
1
Last source update
2026-08-03
Source checked
2026-08-04

Decision brief

What it does—and where it fits

Multi-turn consultation with Codex CLI. Maintains a conversation across multiple turns using session persistence, unlike single-shot /codex-exec.

Best for

  • Use when the user asks to "consult codex", "ask codex", "get codex's opinion", "brainstorm with codex", "discuss with codex", or "chat with codex".

Not for

  • Tasks that require unconfirmed production actions or broad system permissions.
  • Environments where the pinned source and install steps cannot be inspected.

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexDeclaredSource recordInstall path and trigger
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/tobihagemann/turbo --skill "claude/skills/consult-codex"
Safe inspection promptEditorial

Inspect the Agent Skill "consult-codex" from https://github.com/tobihagemann/turbo/blob/1c4cc7c9f13514d968e65783f921b82251d3fc0d/claude/skills/consult-codex/SKILL.md at commit 1c4cc7c9f13514d968e65783f921b82251d3fc0d. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Step 1: Gather Context

    Identify the 2-5 files most relevant to the problem. Formulate a clear, specific question. Include what has been tried and relevant constraints.

    Identify the 2-5 files most relevant to the problem. Formulate a clear, specific question. Include what has been tried and relevant constraints.
  2. 02

    Step 2: Start Session

    Run codex exec with -o to capture the response cleanly. Default to -s read-only for safety. Use -s workspace-write when the consultation requires running code or reading files outside the workspace.

    : The concrete question and relevant context.: Desired output shape and brevity requirements.: Same purpose but for structured/schema responses.
  3. 03

    Step 3: Read and Evaluate Response

    The -o file contains only Codex's response (cleaner than stdout, which includes CLI chrome and tool-use logs). Read from .turbo/codex/$CODEXTAG.txt. If the output is too large for the Read tool, read stdout from the Bash tool result instead.

    The answer is sufficient and actionableFollow-up questions would improve the answerThe response contradicts known project facts (verify before accepting)
  4. 04

    Step 4: Follow Up

    Resume the session with the parsed session ID (not --last, which is unsafe for parallel use):

    Resume the session with the parsed session ID (not --last, which is unsafe for parallel use):When the follow-up carries text you did not author, write it to a file with the Write tool and pass - so the prompt is read from stdin instead:With -, stdin is the whole prompt rather than a block appended to an argument, so instruction and context share the one file. Leave off < /dev/null here — the pipe supplies stdin, and cat sends EOF.
  5. 05

    Step 5: Synthesize

    Summarize the key insights from the consultation. Cross-reference suggestions with project documentation and conventions before applying. Codex suggestions are starting points, not guaranteed solutions.

    Summarize the key insights from the consultation. Cross-reference suggestions with project documentation and conventions before applying. Codex suggestions are starting points, not guaranteed solutions.

Permission review

Static risk signals and limitations

Writes files

medium · line 48

The documentation asks the agent to create, modify, or delete local files.

For context that does not belong in the argument, write a context file with the Write tool and pipe it via stdin. The prompt stays as the argument, context pipes in as `<stdin>` automatically:

Writes files

medium · line 54

The documentation asks the agent to create, modify, or delete local files.

Route text you did not author through this channel whatever its size — a diff, file contents, a code comment, a plan or spec, third-party feedback, command output. Keep backticks and `$` out of the quoted argument even in text you wrote, si

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score84/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars398SourceRepository attention, not individual Skill quality
Compatibility1 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
tobihagemann/turbo
Skill path
claude/skills/consult-codex/SKILL.md
Commit
1c4cc7c9f13514d968e65783f921b82251d3fc0d
License
MIT
Collected
2026-08-04
Default branch
main
View the original SKILL.md

Consult Codex

Multi-turn consultation with Codex CLI. Maintains a conversation across multiple turns using session persistence, unlike single-shot /codex-exec.

Step 1: Gather Context

Identify the 2-5 files most relevant to the problem. Formulate a clear, specific question. Include what has been tried and relevant constraints.

Step 2: Start Session

Run codex exec with -o to capture the response cleanly. Default to -s read-only for safety. Use -s workspace-write when the consultation requires running code or reading files outside the workspace.

All codex Bash calls require dangerouslyDisableSandbox: true (network access to OpenAI API). Use .turbo/ as the temp directory — it is in the working directory (sandbox-writable), gitignored, and avoids $TMPDIR path mismatches between sandbox and non-sandbox mode.

Non-piped codex exec invocations require < /dev/null to avoid hanging on stdin. Codex reads from stdin whenever stdin is non-TTY, and in subprocess contexts the harness leaves stdin connected to a pipe that never EOFs — codex blocks forever, printing only Reading additional input from stdin.... The piped form (cat file | codex exec "...") is safe — cat closes the pipe after the file.

Generate a random session tag at the start to keep files unique for parallel use:

CODEX_TAG=$(head -c 4 /dev/urandom | xxd -p) && mkdir -p .turbo/codex
codex exec -s read-only -o ".turbo/codex/$CODEX_TAG.txt" "<question>" < /dev/null

Prompt Shaping

Structure the question using XML tags for clearer Codex responses:

  • <task>: The concrete question and relevant context.
  • <compact_output_contract>: Desired output shape and brevity requirements.
  • <structured_output_contract>: Same purpose but for structured/schema responses.
  • <grounding_rules>: When claims must be evidence-based (review, research, root-cause analysis).
  • <dig_deeper_nudge>: Push past surface-level findings to check for second-order failures.
  • <verification_loop>: When correctness matters — ask Codex to verify before finalizing.

Example prompt for a diagnosis question:

<task>Diagnose why the auth middleware rejects valid tokens after the session refactor.</task>
<compact_output_contract>Return: (1) most likely root cause, (2) evidence, (3) smallest safe next step.</compact_output_contract>
<grounding_rules>Ground every claim in the provided context or tool outputs. Label hypotheses explicitly.</grounding_rules>

For correctness-critical questions, add <verification_loop> asking Codex to verify its answer before finalizing.

Keep prompts compact, with tight output contracts. One clear task per Codex turn.

For context that does not belong in the argument, write a context file with the Write tool and pipe it via stdin. The prompt stays as the argument, context pipes in as <stdin> automatically:

cat ".turbo/codex/$CODEX_TAG-ctx.txt" | codex exec -s read-only -o ".turbo/codex/$CODEX_TAG.txt" "<question>"

Route text you did not author through this channel whatever its size — a diff, file contents, a code comment, a plan or spec, third-party feedback, command output. Keep backticks and $ out of the quoted argument even in text you wrote, since both stay live inside it. Write the context file with the Write tool so nothing is interpreted on the way in.

Parse the session id: line from the CLI output. This UUID is needed for follow-up turns.

The session id: line appears only in the stderr chrome, never on stdout and never in the -o file. When a follow-up turn may be needed, do not discard stderr with 2>/dev/null or capture stdout alone — either silently drops the session id and makes resume impossible. If output must be truncated, 2>&1 | grep for session id: so the id is always retained.

Run via the Bash tool as a foreground call (timeout: 600000, the Bash maximum; do not set run_in_background) per turn. A larger timeout is not honored: the harness backgrounds the call immediately and hard-kills codex at 600s, truncating its output. A consult that outlives a valid timeout is normally force-backgrounded: the result carries a task ID and the run continues to completion, so recover the answer by reading the -o file, then reading it again once the <task-notification> reports completion. For a backgrounded run the session id: is in the task's output file rather than the immediate tool result, so grep that file for it when a follow-up turn is needed. An over-max timeout also returns a task ID but truncates the output at 600s, so check the file for a complete answer rather than assuming the run finished. Rarely the result is an error exit (code 143) reading Command timed out after <duration> with no task ID; codex was hard-killed and the -o file was never written, so resume the session id from Step 2 with a fresh -o path and an instruction to answer immediately, rather than re-running the consult from scratch. Never wait with Monitor, and never return the task ID or an interim file snapshot as the result — each is a false-empty return.

Step 3: Read and Evaluate Response

The -o file contains only Codex's response (cleaner than stdout, which includes CLI chrome and tool-use logs). Read from .turbo/codex/$CODEX_TAG.txt. If the output is too large for the Read tool, read stdout from the Bash tool result instead.

Assess whether:

  • The answer is sufficient and actionable
  • Follow-up questions would improve the answer
  • The response contradicts known project facts (verify before accepting)

If no follow-up is needed, skip to the Synthesize step.

Step 4: Follow Up

Resume the session with the parsed session ID (not --last, which is unsafe for parallel use):

codex exec resume <session-id> -o ".turbo/codex/$CODEX_TAG.txt" "<follow-up question>" < /dev/null

When the follow-up carries text you did not author, write it to a file with the Write tool and pass - so the prompt is read from stdin instead:

cat ".turbo/codex/$CODEX_TAG-followup.txt" | codex exec resume <session-id> -o ".turbo/codex/$CODEX_TAG.txt" -

With -, stdin is the whole prompt rather than a <stdin> block appended to an argument, so instruction and context share the one file. Leave off < /dev/null here — the pipe supplies stdin, and cat sends EOF.

The -s flag is not available for resume. It inherits sandbox settings from the original session.

Return to Step 3. Cap at 5 turns to prevent runaway conversations.

Step 5: Synthesize

Summarize the key insights from the consultation. Cross-reference suggestions with project documentation and conventions before applying. Codex suggestions are starting points, not guaranteed solutions.

Alternatives

Compare before choosing

Computed 10014,225

wanshuiyin/Auto-claude-code-research-in-sleep

kill-argument

Two-thread adversarial review: a fresh reviewer constructs the strongest 200-word rejection memo, then a second fresh reviewer defends the paper point-by-point and surfaces still-unresolved critical issues. Use when user says "kill argument", "adversarial review", "hostile review", "rebuttal preparation", "reviewer-2 simulation", or before submitting a theory paper that has already passed standard review rounds.

Computed 10014,225

wanshuiyin/Auto-claude-code-research-in-sleep

kill-argument

Two-thread adversarial review: a fresh reviewer constructs the strongest 200-word rejection memo, then a second fresh reviewer defends the paper point-by-point and surfaces still-unresolved critical issues. Use when user says "kill argument", "adversarial review", "hostile review", "rebuttal preparation", "reviewer-2 simulation", or before submitting a theory paper that has already passed standard review rounds.

Computed 9814,225

wanshuiyin/Auto-claude-code-research-in-sleep

auto-paper-improvement-loop

Use it for operations tasks; the detail page covers purpose, installation, and practical steps.

Computed 98351

cameronfreer/lean4-skills

lean4

Use when editing .lean files, debugging Lean 4 builds (type mismatch, sorry, failed to synthesize instance, axiom warnings, lake build errors), searching mathlib for lemmas, formalizing mathematics in Lean, finding a counterexample to, refuting, or disproving a Lean statement, or learning Lean 4 concepts. Also trigger when the user asks for help with Lean 4, mathlib, or lakefile. Do NOT trigger for Coq/Rocq, Agda, Isabelle, HOL4, Mizar, Idris, Megalodon, or other non-Lean theorem provers.