brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
codex-cliRun OpenAI Codex CLI for coding tasks, implementation, reviews, and second-opinion audits with mandatory task-based routing across GPT-5.6-or-newer models. Use when a user asks to run, ask, or use Codex; says "codex prompt"; wants a Codex code/logic/plan audit; or wants Claude to delegate work to OpenAI models. Inspect the live Codex model catalog, explicit…
Independent GitHub snapshot · Automated classification · Original documentation governs
Use OpenAI's local agentic coding CLI (codex) for second opinions, delegated builds, code review, diagnosis, and non-interactive execution. Treat the live CLI model catalog as authoritative; the current GPT-5.6 family is:
gpt-5.6-sol: frontier capability for ambiguous, difficult, or high-value work.gpt-5.6-terra: balanced everyday capability, speed, and usage.gpt-5.6-luna: rapid, economical execution for clear, repeatable, high-volume work.Prefer explicit catalog slugs over the gpt-5.6 alias so the selected route is auditable.
Apply these rules to every Codex call made under this skill:
5.6 or newer.o3, another older/non-GPT model, or --oss as a fallback.Within the same version, escalate unavailable tiers upward in capability: Luna -> Terra -> Sol. Never cross below the version floor. For a Max-required task, choose an eligible catalog model that supports max; do not silently lower its effort.
Before the first Codex invocation, inspect health and the refreshed model catalog. Reuse the result for later calls in the same session unless a model error or update makes it stale.
codex doctor 2>&1 | rg "version|model|auth|updates" | head -20
codex debug models | jq -r '.models[] | select(.visibility == "list") | [.slug, .default_reasoning_level, ([.supported_reasoning_levels[].effort] | join(","))] | @tsv'
Use codex debug models --bundled only when refresh is unavailable. If jq is unavailable, inspect codex debug models directly. Confirm:
supported_reasoning_levels.Surface an available CLI update but do not run codex update automatically. Do not skip catalog validation for a fast request; cache the result instead.
Use the lowest-cost route below that matches the actual task. The explicit audit rule takes precedence over all other rows.
| Route | Model | Effort | Use for |
|---|---|---|---|
| Rapid | Luna | low | Exact, bounded, repeatable work: extraction, classification, formatting, simple searches, mechanical edits, boilerplate, and high-volume transformations |
| Rapid+ | Luna | medium | Clear implementation with modest checking: a narrow bug fix, a small test, or a repetitive migration with validation |
| Balanced | Terra | medium | Everyday coding: normal features, routine refactors, tests, documentation, and well-scoped reviews |
| Investigative | Terra | high | Multi-file diagnosis, non-trivial review, performance analysis, or a clear task with several dependent steps |
| Deep | Sol | high | Ambiguous or complex implementation, unfamiliar architecture, cross-system changes, research, or work where judgment and polish matter |
| Deep+ | Sol | xhigh | A very difficult single-thread problem with subtle edge cases, failed prior attempts, or demanding verification |
| Audit | Sol | max | Audit or challenge a plan, architecture, migration, security strategy, incident response, or other high-stakes decision; identify hidden assumptions and failure modes |
| Parallel deep | Sol | ultra | Broad complex work that divides into meaningful independent workstreams and benefits enough from subagents to justify extra usage |
Current GPT-5.6 catalog behavior: Sol and Terra support low, medium, high, xhigh, max, and ultra; Luna supports low, medium, high, xhigh, and max. Always re-check the live catalog because this can change.
Classify before invoking:
max + read-only sandbox.ultra. Do not use Ultra merely because a task has several steps.Do not start cheap and rerun the same clearly difficult task through several models. Route correctly once. Escalate effort only after a result misses stated success criteria, except for Audit tasks, which start at max by policy.
Pin the selected model and effort on every new run:
codex exec -m <catalog-model> \
-c 'model_reasoning_effort="<supported-effort>"' \
-s <sandbox> \
"<outcome-focused prompt>"
For codex review, -m is not exposed. Set the model through config:
codex review \
-c 'model="<catalog-model>"' \
-c 'model_reasoning_effort="<supported-effort>"' \
--uncommitted "<review focus>"
For codex exec resume, override the model and effort again, especially when the original session may have used an older model:
codex exec resume --last \
-m <catalog-model> \
-c 'model_reasoning_effort="<supported-effort>"' \
"<follow-up>"
When the user says "codex prompt", treat it as codex exec, classify the prompt, and apply the same mandatory model/effort routing.
Replace these slugs with the equivalent newer-family catalog slugs when a version above 5.6 is available.
# Rapid, bounded operation
codex exec -m gpt-5.6-luna \
-c 'model_reasoning_effort="low"' \
-s read-only --ephemeral \
"Extract every TODO as file:line:text. Do not modify files."
# Balanced implementation
codex exec -m gpt-5.6-terra \
-c 'model_reasoning_effort="medium"' \
-s workspace-write \
"Implement the health endpoint and its unit tests. Run the focused test suite."
# Non-trivial code review
codex review \
-c 'model="gpt-5.6-terra"' \
-c 'model_reasoning_effort="high"' \
--uncommitted "Find correctness regressions, security risks, and missing tests."
# Plan audit: always Sol + max + read-only
codex exec -m gpt-5.6-sol \
-c 'model_reasoning_effort="max"' \
-s read-only --ephemeral \
"Audit docs/plan.md. Challenge assumptions, find failure modes and omitted dependencies, rank findings by severity, and propose concrete mitigations. Do not modify files."
Give Codex an outcome-focused prompt containing only what changes its work:
codex exec resume when prior context remains relevant; use --ephemeral for unrelated one-shot work.Choose access from user intent, independently of model route:
| Mode | Use |
|---|---|
read-only | Audits, reviews, explanations, diagnostics, research, and second opinions |
workspace-write | Requested implementation, fixes, refactors, and test changes inside the workspace |
danger-full-access | Only with explicit user approval and a trusted prompt/environment |
-a, --ask-for-approval is a top-level flag and must appear before exec or review. Values are untrusted, on-request, and never.
codex -a on-request exec -m gpt-5.6-terra \
-c 'model_reasoning_effort="medium"' \
-s workspace-write "Implement the requested change."
Use --dangerously-bypass-approvals-and-sandbox only in an externally sandboxed container or VM with explicit user approval. Never use it on a bare developer machine. --full-auto is deprecated; use --sandbox workspace-write.
codex exec[PROMPT] is the only prompt positional argument.codex exec ... - when the entire prompt comes from stdin.<stdin> block; do not also add the - positional.--search before exec: codex --search exec ....# Stdin only
git diff HEAD~1..HEAD | codex exec -m gpt-5.6-terra \
-c 'model_reasoning_effort="high"' -s read-only --ephemeral -
# Instructions plus piped context
git diff HEAD~1..HEAD | codex exec -m gpt-5.6-terra \
-c 'model_reasoning_effort="high"' -s read-only --ephemeral \
"Review the supplied diff for concurrency bugs."
codex review-c 'model="..."'; codex review does not expose -m.--uncommitted, --base <BRANCH>, or --commit <SHA>.--commit, pipe the commit diff to codex exec -s read-only instead.Run long Sol, Max, Ultra, and implementation calls with Claude Code's Bash run_in_background: true; read the result after the completion notification. A short Luna call may run in the foreground. Do not poll with sleep loops.
Use -o <file> when Claude must consume a clean final response and --json when progress events are useful.
Bash(command="codex exec -m gpt-5.6-sol -c 'model_reasoning_effort=\"max\"' -s read-only --ephemeral -o /tmp/codex.out 'Audit the plan...'",
run_in_background=true)
codex exec processes in parallel; Ultra's internal delegation remains one invocation.429, rate limit, or quota exceeded, stop and report it. Do not retry-loop or downgrade the model.model_not_found or unsupported effort, refresh codex debug models and select another eligible >=5.6 route. Never fall through to an older model.Direct CLI invocation is the canonical path when enforcing this skill's model floor. If the official OpenAI Codex Claude Code plugin is installed, use its delegation wrapper only when it accepts or verifiably preserves an explicit >=5.6 model and supported effort. Include the floor and selected route in the delegated instructions. Otherwise use direct codex exec; do not double-invoke.
| Command | Purpose |
|---|---|
codex --version | Confirm installation |
codex doctor | Diagnose install, auth, config, connectivity, and updates |
codex debug models | Refresh and inspect the live model catalog |
codex exec [PROMPT] | Run a non-interactive task |
codex exec resume [ID|--last] [PROMPT] | Continue a previous non-interactive session |
codex review {--uncommitted|--base BRANCH|--commit SHA} | Review repository changes |
codex apply <TASK_ID> | Apply a Codex-produced patch |
codex mcp {list,get,add,remove,login,logout} | Manage MCP servers |
codex update | Update Codex after informing the user |
codex login / codex logout | Manage authentication |
codex doctor and codex debug models.max + read-only.exec, review, and resumed run.