From superpower-router
Use when creating implementation plans and executing tasks with proactive dual-model Codex routing (gpt-5.3-codex for code, gpt-5.4 for analysis) and fail-closed behavior before Claude/Sonnet fallback
How this skill is triggered — by the user, by Claude, or both
Slash command
/superpower-router:plan-and-executeThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Create bite-sized implementation plans and proactively dispatch execution to the cheapest capable backend.
Create bite-sized implementation plans and proactively dispatch execution to the cheapest capable backend.
Before execution, check availability:
command -v codex >/dev/null && echo "codex:ok" || echo "codex:missing"
If Codex is missing for code tasks, stop and ask the user whether to proceed on Claude/Sonnet fallback.
docs/plans/YYYY-MM-DD-feature.md.2-5 min each.| Work Type | Backend | Model | Invocation |
|---|---|---|---|
| Repository exploration / static codebase analysis | Codex CLI | gpt-5.3-codex | CODEX_MODEL=gpt-5.3-codex ${CLAUDE_PLUGIN_ROOT}/skills/plan-and-execute/codex-runner.sh "[prompt]" read-only /path/to/project |
| Implementation/refactor/tests | Codex CLI | gpt-5.3-codex | CODEX_MODEL=gpt-5.3-codex ${CLAUDE_PLUGIN_ROOT}/skills/plan-and-execute/codex-runner.sh "[prompt]" workspace-write /path/to/project |
| Code review/spec review | Codex CLI | gpt-5.3-codex | CODEX_MODEL=gpt-5.3-codex ${CLAUDE_PLUGIN_ROOT}/skills/plan-and-execute/codex-runner.sh "[prompt]" read-only /path/to/project |
| Logic review / analysis / non-code reasoning | Codex CLI | gpt-5.4 | ${CLAUDE_PLUGIN_ROOT}/skills/plan-and-execute/codex-runner.sh "[prompt]" read-only /path/to/project |
| Live web / docs / external research | Claude native | — | Use WebSearch / WebFetch tools; stay on Claude |
| Independent option gathering (compare model outputs) | Codex × 2 in parallel | both | Run two codex-runner.sh invocations concurrently — one with CODEX_MODEL=gpt-5.3-codex, one with default gpt-5.4 |
| Orchestration/synthesis | Claude | — | Stay on Claude |
| Fallback | Sonnet 4.6 | — | Task(prompt, model:sonnet) only after explicit user confirmation when Codex fails |
For every routed task prompt, include:
CODEX_MODEL first.| Item | Value |
|---|---|
| Model (code tasks) | gpt-5.3-codex — set via CODEX_MODEL=gpt-5.3-codex |
| Model (logic/analysis/research tasks) | gpt-5.4 (default) |
| Sandbox modes | workspace-write, read-only |
| Flags | --full-auto --skip-git-repo-check |
Accepted invocation formats:
codex-runner.sh "<prompt>" [sandbox-mode] [working-dir]codex-runner.sh "<prompt>" <working-dir> [sandbox-mode]<working-dir> is provided, sandbox defaults to workspace-write"${CLAUDE_PLUGIN_ROOT}/skills/plan-and-execute/codex-runner.sh" \
"$PROMPT" \
workspace-write \
/path/to/project
"${CLAUDE_PLUGIN_ROOT}/skills/plan-and-execute/codex-runner.sh" \
"$PROMPT" \
read-only \
/path/to/project
"${CLAUDE_PLUGIN_ROOT}/skills/plan-and-execute/codex-runner.sh" \
"$PROMPT" \
/path/to/project
"${CLAUDE_PLUGIN_ROOT}/skills/plan-and-execute/codex-runner.sh" \
"$PROMPT" \
/path/to/project \
read-only
Use this when you want diverse analysis from both Codex models for the same objective. Run two codex-runner.sh invocations concurrently in the background.
# Run gpt-5.3-codex (code perspective) in background
CODEX_MODEL=gpt-5.3-codex /bin/bash "${CLAUDE_PLUGIN_ROOT}/skills/plan-and-execute/codex-runner.sh" \
"$PROMPT" read-only /path/to/project &
CODEX_PID_1=$!
# Run gpt-5.4 (logic/analysis perspective) in background
/bin/bash "${CLAUDE_PLUGIN_ROOT}/skills/plan-and-execute/codex-runner.sh" \
"$PROMPT" read-only /path/to/project &
CODEX_PID_2=$!
wait $CODEX_PID_1; wait $CODEX_PID_2
| Exit Code | Action |
|---|---|
0 | Success |
20 | Fail-closed signal. Ask user for explicit approval before Claude/Sonnet fallback. |
10, 11, 12, 13, 1 | Only if CODEX_FAIL_CLOSED=0: allow fallback/report per policy. |
| Variable | Default | Purpose |
|---|---|---|
CODEX_MODEL | gpt-5.4 | Override per-invocation; use gpt-5.3-codex for code tasks |
CODEX_MODEL_CODE | gpt-5.3-codex | Reference value for code construction/review tasks |
CODEX_MODEL_LOGIC | gpt-5.4 | Reference value for logic review/analysis/research tasks |
CODEX_EFFORT | xhigh | Reasoning effort |
CODEX_TIMEOUT | 600 | Timeout in seconds |
CODEX_FAIL_CLOSED | 1 | Stop and ask user before Claude fallback on failure |
Telemetry note:
Offload C:<tokens> Σ:<tokens> | S/F C:<s>/<f> | RL C:<remaining>%@<reset-time>.Explore/Task subagents for Codex-eligible work before attempting routed runnersnpx claudepluginhub charliechan53/superpower-router --plugin superpower-routerDelegates coding tasks (debug, implement, refactor) to OpenAI Codex CLI via codex exec, skipping the Node companion runtime for faster execution. Codex writes code; Claude verifies.
Delegates complex code generation, refactoring, architectural analysis, and review tasks to OpenAI's Codex CLI (GPT-5.3-codex models) via safe workflows with sandboxing and approvals. Activates on explicit triggers like 'use codex' or 'codex exec'.
Invokes Codex CLI to execute code tasks. Acts as single entrypoint for Gran Maestro request workflow with trace mode support. Useful for dispatching implementation/analysis tasks.