一键导入
model-selection
Per-agent model selection with 4-layer hierarchy and fallback chains
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Per-agent model selection with 4-layer hierarchy and fallback chains
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
{what this skill teaches agents}
{what this skill teaches agents}
{what this skill teaches agents}
{what this skill teaches agents}
Determines which LLM model to use for each agent spawn
{what this skill teaches agents}
基于 SOC 职业分类
| name | model-selection |
| description | Per-agent model selection with 4-layer hierarchy and fallback chains |
| domain | orchestration |
| confidence | high |
| source | extracted |
Before spawning an agent, the coordinator determines which model to use. This skill codifies the 4-layer hierarchy, role-to-model mappings, task complexity adjustments, and fallback chains. Applies to all agent spawns in Team Mode.
Check these layers in order — first match wins:
Layer 1 — User Override: Did the user specify a model? ("use opus", "save costs", "use gpt-5.3-codex for this"). If yes, use that model. Session-wide directives ("always use haiku") persist until contradicted.
Layer 2 — Charter Preference: Does the agent's charter have a ## Model section with Preferred set to a specific model (not auto)? If yes, use that model.
Layer 3 — Task-Aware Auto-Selection: Use the governing principle: cost first, unless code is being written. Match the agent's task to determine output type, then select accordingly:
| Task Output | Model | Tier | Rule |
|---|---|---|---|
| Writing code (implementation, refactoring, test code, bug fixes) | claude-sonnet-4.6 | Standard | Quality and accuracy matter for code. Use standard tier. |
| Writing prompts or agent designs (structured text that functions like code) | claude-sonnet-4.6 | Standard | Prompts are executable — treat like code. |
| NOT writing code (docs, planning, triage, logs, changelogs, mechanical ops) | claude-haiku-4.5 | Fast | Cost first. Haiku handles non-code tasks. |
| Visual/design work requiring image analysis | claude-opus-4.8 | Premium | Vision capability required. Overrides cost rule. |
Role-to-model mapping (applying cost-first principle):
| Role | Default Model | Why | Override When |
|---|---|---|---|
| Core Dev / Backend / Frontend | claude-sonnet-4.6 | Writes code — quality first | Heavy code gen → gpt-5.3-codex |
| Tester / QA | claude-sonnet-4.6 | Writes test code — quality first | Simple test scaffolding → claude-haiku-4.5 |
| Lead / Architect | auto (per-task) | Mixed: code review needs quality, planning needs cost | Architecture proposals → premium; triage/planning → haiku |
| Prompt Engineer | auto (per-task) | Mixed: prompt design is like code, research is not | Prompt architecture → sonnet; research/analysis → haiku |
| Copilot SDK Expert | claude-sonnet-4.6 | Technical analysis that often touches code | Pure research → claude-haiku-4.5 |
| Designer / Visual | claude-opus-4.8 | Vision-capable model required | — (never downgrade — vision is non-negotiable) |
| DevRel / Writer | claude-haiku-4.5 | Docs and writing — not code | — |
| Scribe / Logger | claude-haiku-4.5 | Mechanical file ops — cheapest possible | — (never bump Scribe) |
| Git / Release | claude-haiku-4.5 | Mechanical ops — changelogs, tags, version bumps | — (never bump mechanical ops) |
Task complexity adjustments (apply at most ONE — no cascading):
gpt-5.3-codex): large multi-file refactors, complex implementation from spec, heavy code generation (500+ lines)gemini-2.5-pro): code reviews where a second perspective helps, security reviews, architecture reviews after a rejectionLayer 4 — Default: If nothing else matched, use claude-haiku-4.5. Cost wins when in doubt, unless code is being produced.
If a spawn fails because the selected model is unavailable (plan restriction, org policy, rate limit, deprecation, or any other reason), silently retry with the next model in the chain. Do NOT tell the user about fallback attempts. Maximum 3 retries before jumping to the nuclear fallback.
Premium: claude-opus-4.8 → claude-opus-4.7 → claude-opus-4.6 → claude-sonnet-4.6 → (omit model param)
Standard: claude-sonnet-5 → claude-sonnet-4.6 → gpt-5.6-sol → gpt-5.6-terra → gpt-5.6-luna → gpt-5.4 → gpt-5.3-codex → claude-sonnet-4.5 → gemini-2.5-pro → (omit model param)
Fast: claude-haiku-4.5 → gpt-5.4-mini → gpt-5-mini → (omit model param)
(omit model param) = call the task tool WITHOUT the model parameter. The platform uses its built-in default. This is the nuclear fallback — it always works.
Fallback rules:
Pass the resolved model as the model parameter on every task tool call:
agent_type: "general-purpose"
model: "{resolved_model}"
mode: "background"
description: "{emoji} {Name}: {brief task summary}"
prompt: |
...
Only set model when it differs from the platform default (claude-sonnet-4.6). If the resolved model IS claude-sonnet-4.6, you MAY omit the model parameter — the platform uses it as default.
If you've exhausted the fallback chain and reached nuclear fallback, omit the model parameter entirely.
When spawning, include the model in your acknowledgment:
🔧 Fenster (claude-sonnet-5) — refactoring auth module
🎨 Redfoot (claude-opus-4.8 · vision) — designing color system
📋 Scribe (claude-haiku-4.5 · fast) — logging session
⚡ Keaton (claude-opus-4.8 · bumped for architecture) — reviewing proposal
📝 McManus (claude-haiku-4.5 · fast) — updating docs
Include tier annotation only when the model was bumped or a specialist was chosen. Default-tier spawns just show the model name.
Premium: claude-opus-4.8, claude-opus-4.7, claude-opus-4.6
Standard: claude-sonnet-5, claude-sonnet-4.6, claude-sonnet-4.5, gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna, gpt-5.5, gpt-5.4, gpt-5.3-codex, gemini-2.5-pro
Fast/Cheap: claude-haiku-4.5, gpt-5.4-mini, gpt-5-mini
Example 1: Backend dev writing API endpoints
claude-sonnet-4.6 (standard tier)🔧 Fenster (claude-sonnet-4.6) — implementing user API endpointsExample 2: User override
claude-haiku-4.5 regardless of role or taskExample 3: Complex refactor
claude-sonnet-4.5gpt-5.3-codex🔧 Fenster (gpt-5.3-codex · code specialist) — refactoring auth to new token systemExample 4: Scribe logging
claude-haiku-4.5📋 Scribe (claude-haiku-4.5 · fast) — logging session