Installs a model-routing section in CLAUDE.md that teaches Claude Code which model to use for which work, including delegating to GPT models via Codex CLI. Routes subagent and workflow tasks by cost, intelligence, and taste.
Ships in model-routing. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Claude Code orchestrates subagents and workflows, and each spawned agent can run on a different model. Left unguided, everything runs on the session's default model — usually the most expensive one. This skill installs a model-routing section into a project's CLAUDE.md: a rankings table (cost / intelligence / taste per model) plus application rules and mechanics, so the orchestrating Claude routes each piece of work to the cheapest model that clears the quality bar — including non-Claude models reached through the Codex CLI.
The pattern (popularized by Theo's multi-model workflow:
x.com/theo/status/2072481845363822914,
x.com/theo/status/2072482460122964067):
score each available
model on three axes, state routing rules as defaults-not-limits with standing
permission to escalate, and document the exact mechanics (codex exec,
Agent/Workflow model parameter) so routing actually happens instead of
staying aspirational.
model parameter.codex --version), authenticated
(codex login or OPENAI_API_KEY). Check ~/.codex/config.toml for the
default model and model_reasoning_effort.codex --version # Codex CLI installed?
grep -E '^(model|model_reasoning_effort)' ~/.codex/config.toml
Also note which Claude models the harness exposes for the Agent/Workflow
model parameter (check the Agent tool's model enum in the current session —
e.g. sonnet, opus, haiku, fable).
The rankings are personal — cost especially, since it reflects subscription headroom and rate limits rather than list price. Ask (briefly, with sensible defaults offered):
Copy the section from references/claude-md-template.md and customize the table rows, scores, rules, and mechanics per the interview and discovery. Only reference models and commands that actually exist in the user's setup.
CLAUDE.md at the repo root by default;
use ~/.claude/CLAUDE.md only if the user wants it globally.## Picking the right models (or equivalent) section already exists,
replace it in place — don't append a duplicate.If GPT routing is enabled, smoke-test the delegation path end-to-end:
timeout 120 codex exec -s read-only "Reply with exactly: OK"
(Add --skip-git-repo-check if the target directory isn't a git repository —
codex refuses to run outside one by default.)
If this prompts for auth or fails, fix that now — a routing section that references a broken command silently degrades to "use the default model for everything".
For the exact flags (sandbox modes, output capture, model override, session resume) see references/codex-cli.md. The short version:
| Task shape | Command |
|---|---|
| Investigation / analysis | timeout 300 codex exec -s read-only "<self-contained prompt>" |
| Implementation | timeout 900 codex exec -s workspace-write "<spec>" |
| Code review | timeout 900 codex review --base <branch> (or --uncommitted) |
| Capture final answer only | timeout 300 codex exec -o /tmp/out.md "<prompt>" |
| Different model per-call | timeout 300 codex exec -m <model> "<prompt>" |
The timeout wrapper is mandatory, not decoration: codex exec can hang
indefinitely at zero CPU on a dead network wait, and a hung exec is
indistinguishable from a quietly-working one. On expiry, retry once or do the
chunk without codex.
Codex prompts must be self-contained: codex shares none of Claude's conversation context, so include absolute paths, the full task spec, and acceptance criteria.
/context or by asking Claude what routing rules it sees.codex exec never prompts for
approval — commands either run inside the sandbox or fail. If it can't
write files, the sandbox was read-only (the default); rerun with
-s workspace-write.ps aux | grep "codex exec") — near-zero CPU on an hours-old process is a
hung network wait, not slow work. Kill the whole process chain and re-run
under timeout; see
references/codex-cli.md.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
model-routing, multi-model, codex-cli, claude-md, cost-optimization
/model-routing:model-routingfrom model-routing
npx claudepluginhub dashed/claude-marketplace --plugin model-routingOther plugins' skills for the same job