Stuntdouble
Hollywood doesn't make the star do the stunts. Doubles shoot the action scenes;
the star shows up for the close-up. Same movie, fraction of the cost — and the
audience can't tell. Stuntdouble does this with AI models: cheap capable models
do the heavy lifting, the strongest model only enters at the end to verify.
Mode selection (check ARGUMENTS first)
on → activate Orchestrator Mode (see below). Stays active for the rest
of the session until the user turns it off.
off → deactivate Orchestrator Mode. Confirm in one line and stop applying
the pipeline.
- anything else (a task description, or empty) → Advisor Mode: one-shot
recommendation for that task.
Host detection (do this FIRST, in both modes)
Identify which agent you are running inside, and use ONLY that host's models
and dispatch method. Never mention or dispatch models the host doesn't
offer — recommending haiku inside Codex (or gpt-5.5 inside Claude Code)
is a failure.
| Host |
Your models (low / mid / high) |
Worker dispatch |
Star (verifier) |
| Claude Code |
haiku / sonnet / opus |
Native subagents: Agent/Task tool with the model parameter, subagent_type: general-purpose |
fable, else opus |
| Codex (OpenAI) |
gpt-5.6-luna / gpt-5.6-terra / gpt-5.6-sol high reasoning |
Child runs via shell: codex exec -m <model> "<subtask prompt>" — run codex exec --help once first to confirm flags and sandbox options |
gpt-5.6-sol with high reasoning effort |
| Gemini CLI |
gemini-flash / gemini-pro / gemini-ultra |
Child runs via shell: gemini -m <model> -p "<subtask prompt>" (confirm flags with --help first) |
gemini-ultra |
| Other / unknown |
infer the host's tiers from its docs or models.md |
Phase Mode (see below) |
strongest available |
Phase Mode (fallback) — when the host has no subagent tool and no CLI you
can shell out to: plan the parts, label each with its recommended tier, execute
the phases yourself in order, and before each phase tell the user the ideal
model to switch to (e.g. /model <name>). Cheap phases first so expensive
context is only loaded once.
Scoring (used by both modes)
Score each dimension 0–1, then combine:
| Dimension |
Weight |
Low (0) |
High (1) |
| Cognitive complexity |
40% |
formatting, renaming, boilerplate, simple Q&A |
architecture, race conditions, novel algorithms, multi-constraint design |
| Context size |
20% |
one file, short snippet |
whole repo, long history, many files |
| Quality required |
25% |
draft, prototype, throwaway |
production, security-sensitive, public API |
| Speed/cost pressure |
15% |
"take your time" |
"quick", "cheap", "just testing" (inverts: pushes score DOWN) |
Final score = 0.40·complexity + 0.20·context + 0.25·quality − 0.15·speed_pressure (clamp 0–1).
Tier map: ≤ 0.33 → low · 0.34–0.66 → mid · ≥ 0.67 → high — then
take the model from your host's row above. Full catalog: models.md.
Advisor Mode (one-shot)
- Detect the host/provider (table above); ambiguous → ask one short question.
- Score the task. If no task was given, infer from recent conversation or ask
"What task do you want to optimize for?"
- Output, short:
Recommended: <model from YOUR host's row>
Why: <one line — dominant dimension(s)>
Switch: /model <name> (or where to change it on this platform)
Saves: <only if downgrading — e.g. "Haiku is ~15x cheaper than Opus">
Rules: never execute /model yourself (user-level command). If the current
model is already right, say so. Mixed-phase tasks → one model per phase.
Mention an alternative only when the score is within 0.05 of a boundary.
Orchestrator Mode (persistent, like a session toggle)
On activation, detect the host, then reply with this status block (fill in the
host line from the table) and nothing else:
🎬 stuntdouble ON — the star only shoots the close-ups
Host: <host> · Doubles: <low>, <mid> · Star: <verifier>
Every task: scored → routed to the cheapest capable model → verified by the star.
Tip: run your session on a mid-tier model — the director's chair doesn't need a frontier model.
Turn off: /stuntdouble off
From now on, apply this pipeline to EVERY user message until turned off:
Pipeline
Classify the message. Questions, conversation, opinions, trivial
one-liners → answer directly, no orchestration, no commentary about the mode.
Score the task (scoring table above).
Choose strategy:
- Direct — task is small, atomic, or not decomposable (one function, one
edit, one explanation): do it yourself in the session. Don't spawn workers
— overhead would eat the savings.
- Orchestrate — task splits into ≥2 independent parts with different
complexity levels (e.g. a landing page, a feature with backend + UI +
tests, a multi-file refactor):
a. Decompose into subtasks; score each one; map to your host's low/mid/high models.
b. Show the user a one-line plan per subtask (
part → model) before
dispatching.
c. Dispatch workers using YOUR host's dispatch method (table above). Run
independent subtasks in parallel when the host allows it. Workers start
cold: include full context in each prompt — file paths, conventions,
what the other workers are building, exact deliverables.
d. If dispatch fails or is unavailable → fall back to Phase Mode for this
task and say so in one line.
Verify — the star's close-up (orchestrated tasks only): after all
workers finish, run ONE verification pass on your host's star model to
review the integrated result against the user's request, fix small issues
directly (inconsistencies, broken references, style mismatches), and report
what it changed. Skip verification only for throwaway/draft work.
Report, compact (model names from YOUR host):
🎬 That's a wrap — orchestrated across N models
static content → <low model> (double)
core feature → <mid model> (double)
final close-up → <star> (star — fixed: 2 issues)
Est. savings vs. shooting everything with the star: ~XX%
Rules
- The mode survives the whole session. Re-apply it on every message — do not
let it fade. Only
/stuntdouble off (or the user clearly asking to stop)
deactivates it.
- Hard rule: only ever name models from the host's own row. No Claude model
names inside Codex/Gemini; no OpenAI/Gemini names inside Claude Code.
- Never orchestrate the conversation itself — only concrete work tasks.
- When in doubt between Direct and Orchestrate, prefer Direct: a wrong
decomposition costs more than a slightly expensive model.
- Tasks that need the orchestrator's own senses — viewing images, judging
visual output, iterating on renders — lean Direct even at mid scores: each
adjustment round-trip with a cold worker costs more than the work itself.
- Savings estimate: rough input-price ratio (low ≈ 1/3 of mid, mid ≈ 1/5 of
high tier). Label it as an estimate.
1---2name: stuntdouble3description: Your frontier model is the star — stop making it do the stunts. Two modes. ADVISOR: analyzes a task and recommends the best AI model (Anthropic/OpenAI/Google) with the exact switch command. ORCHESTRATOR: stays ON for the whole session (like a mode toggle) — every task gets scored, decomposed, and dispatched to "stunt double" workers running the cheapest capable model OF THE HOST'S OWN PROVIDER (Claude models in Claude Code, OpenAI models in Codex, Gemini models in Gemini CLI), with the star (strongest model) doing only the final close-up: verification. TRIGGER on /stuntdouble, "stuntdouble on/off", "which model should I use", "select the best model", "optimize model usage", "is this task worth Opus". DO NOT TRIGGER when the user asks about model pricing/APIs in their own application code.4---56# Stuntdouble78Hollywood doesn't make the star do the stunts. Doubles shoot the action scenes;9the star shows up for the close-up. Same movie, fraction of the cost — and the10audience can't tell. Stuntdouble does this with AI models: cheap capable models11do the heavy lifting, the strongest model only enters at the end to verify.1213## Mode selection (check ARGUMENTS first)1415- `on` → activate **Orchestrator Mode** (see below). Stays active for the rest16 of the session until the user turns it off.17- `off` → deactivate Orchestrator Mode. Confirm in one line and stop applying18 the pipeline.19- anything else (a task description, or empty) → **Advisor Mode**: one-shot20 recommendation for that task.2122---2324## Host detection (do this FIRST, in both modes)2526Identify which agent you are running inside, and use ONLY that host's models27and dispatch method. **Never mention or dispatch models the host doesn't28offer** — recommending `haiku` inside Codex (or `gpt-5.5` inside Claude Code)29is a failure.3031| Host | Your models (low / mid / high) | Worker dispatch | Star (verifier) |32|---|---|---|---|33| **Claude Code** | `haiku` / `sonnet` / `opus` | Native subagents: Agent/Task tool with the `model` parameter, `subagent_type: general-purpose` | `fable`, else `opus` |34| **Codex (OpenAI)** | `gpt-5.6-luna` / `gpt-5.6-terra` / `gpt-5.6-sol` high reasoning | Child runs via shell: `codex exec -m <model> "<subtask prompt>"` — run `codex exec --help` once first to confirm flags and sandbox options | `gpt-5.6-sol` with high reasoning effort |35| **Gemini CLI** | `gemini-flash` / `gemini-pro` / `gemini-ultra` | Child runs via shell: `gemini -m <model> -p "<subtask prompt>"` (confirm flags with `--help` first) | `gemini-ultra` |36| **Other / unknown** | infer the host's tiers from its docs or `models.md` | **Phase Mode** (see below) | strongest available |3738**Phase Mode (fallback)** — when the host has no subagent tool and no CLI you39can shell out to: plan the parts, label each with its recommended tier, execute40the phases yourself in order, and before each phase tell the user the ideal41model to switch to (e.g. `/model <name>`). Cheap phases first so expensive42context is only loaded once.4344---4546## Scoring (used by both modes)4748Score each dimension 0–1, then combine:4950| Dimension | Weight | Low (0) | High (1) |51|---|---|---|---|52| Cognitive complexity | 40% | formatting, renaming, boilerplate, simple Q&A | architecture, race conditions, novel algorithms, multi-constraint design |53| Context size | 20% | one file, short snippet | whole repo, long history, many files |54| Quality required | 25% | draft, prototype, throwaway | production, security-sensitive, public API |55| Speed/cost pressure | 15% | "take your time" | "quick", "cheap", "just testing" (inverts: pushes score DOWN) |5657Final score = `0.40·complexity + 0.20·context + 0.25·quality − 0.15·speed_pressure` (clamp 0–1).5859Tier map: **≤ 0.33 → low** · **0.34–0.66 → mid** · **≥ 0.67 → high** — then60take the model from your host's row above. Full catalog: `models.md`.6162---6364## Advisor Mode (one-shot)65661. Detect the host/provider (table above); ambiguous → ask one short question.672. Score the task. If no task was given, infer from recent conversation or ask68 "What task do you want to optimize for?"693. Output, short:7071```72Recommended: <model from YOUR host's row>73Why: <one line — dominant dimension(s)>74Switch: /model <name> (or where to change it on this platform)75Saves: <only if downgrading — e.g. "Haiku is ~15x cheaper than Opus">76```7778Rules: never execute `/model` yourself (user-level command). If the current79model is already right, say so. Mixed-phase tasks → one model per phase.80Mention an alternative only when the score is within 0.05 of a boundary.8182---8384## Orchestrator Mode (persistent, like a session toggle)8586On activation, detect the host, then reply with this status block (fill in the87host line from the table) and nothing else:8889```90🎬 stuntdouble ON — the star only shoots the close-ups91Host: <host> · Doubles: <low>, <mid> · Star: <verifier>92Every task: scored → routed to the cheapest capable model → verified by the star.93Tip: run your session on a mid-tier model — the director's chair doesn't need a frontier model.94Turn off: /stuntdouble off95```9697From now on, apply this pipeline to EVERY user message until turned off:9899### Pipeline1001011. **Classify the message.** Questions, conversation, opinions, trivial102 one-liners → answer directly, no orchestration, no commentary about the mode.1031042. **Score the task** (scoring table above).1051063. **Choose strategy:**107 - **Direct** — task is small, atomic, or not decomposable (one function, one108 edit, one explanation): do it yourself in the session. Don't spawn workers109 — overhead would eat the savings.110 - **Orchestrate** — task splits into ≥2 independent parts with different111 complexity levels (e.g. a landing page, a feature with backend + UI +112 tests, a multi-file refactor):113 a. Decompose into subtasks; score each one; map to your host's low/mid/high models.114 b. Show the user a one-line plan per subtask (`part → model`) before115 dispatching.116 c. Dispatch workers using YOUR host's dispatch method (table above). Run117 independent subtasks in parallel when the host allows it. Workers start118 cold: include full context in each prompt — file paths, conventions,119 what the other workers are building, exact deliverables.120 d. If dispatch fails or is unavailable → fall back to Phase Mode for this121 task and say so in one line.1221234. **Verify — the star's close-up** (orchestrated tasks only): after all124 workers finish, run ONE verification pass on your host's star model to125 review the integrated result against the user's request, fix small issues126 directly (inconsistencies, broken references, style mismatches), and report127 what it changed. Skip verification only for throwaway/draft work.1281295. **Report**, compact (model names from YOUR host):130131```132🎬 That's a wrap — orchestrated across N models133static content → <low model> (double)134core feature → <mid model> (double)135final close-up → <star> (star — fixed: 2 issues)136Est. savings vs. shooting everything with the star: ~XX%137```138139### Rules140141- The mode survives the whole session. Re-apply it on every message — do not142 let it fade. Only `/stuntdouble off` (or the user clearly asking to stop)143 deactivates it.144- Hard rule: only ever name models from the host's own row. No Claude model145 names inside Codex/Gemini; no OpenAI/Gemini names inside Claude Code.146- Never orchestrate the conversation itself — only concrete work tasks.147- When in doubt between Direct and Orchestrate, prefer Direct: a wrong148 decomposition costs more than a slightly expensive model.149- Tasks that need the orchestrator's own senses — viewing images, judging150 visual output, iterating on renders — lean Direct even at mid scores: each151 adjustment round-trip with a cold worker costs more than the work itself.152- Savings estimate: rough input-price ratio (low ≈ 1/3 of mid, mid ≈ 1/5 of153 high tier). Label it as an estimate.