model-selection

A set of rules for choosing a language model for each agent task, using user preferences, agent settings, task complexity, and fallback options.

In plain words
What is it for?
Selecting models before spawning agents and applying preferred-model overrides, automatic task-based choices, and fallback chains.
Why use it?
It prevents every task from using the same model when cost, quality, or reliability calls for a different choice.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/bradygaster/squad/model-selection
Any agent
npx skills add bradygaster/squad --skill model-selection
Clone the repo
git clone --depth 1 https://github.com/bradygaster/squad

Made for: Claude Code, Codex.

Per session 15 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,186 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00015 $0.02186
Opus 5 $0.00008 $0.01093
Sonnet 5 $0.00003 $0.00437
Haiku 4.5 $0.00002 $0.00219

Measured 2d ago against content hash a52cc96f0553, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

model-selection scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.copilot/skills/model-selection/SKILL.md · 144 lines

How it starts

The opening of the file, as written. The whole thing — 144 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Context

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.

Patterns

4-Layer Hierarchy

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) gpt-5.6-terra Standard Quality and accuracy matter for code. Use standard tier.
Writing prompts or agent designs (structured text that functions like code) gpt-5.6-terra Standard Prompts are executable — treat like code.
NOT writing code (docs, planning, triage, logs, changelogs, mechanical ops) gpt-5.6-luna Fast Cost first. Luna handles non-code tasks by default.
Visual/design work requiring image analysis gpt-5.6-sol 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 gpt-5.6-terra Writes code — quality first Heavy code gen → gpt-5.3-codex
Tester / QA gpt-5.6-terra 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 → luna
Prompt Engineer auto (per-task) Mixed: prompt design is like code, research is not Prompt architecture → gpt-5.6-terra; research/analysis → haiku
Copilot SDK Expert gpt-5.6-terra Technical analysis that often touches code Pure research → claude-haiku-4.5
Designer / Visual gpt-5.6-sol Vision-capable model required — (never downgrade — vision is non-negotiable)
DevRel / Writer gpt-5.6-luna Docs and writing — not code
Scribe / Logger gpt-5.6-luna Mechanical file ops — cheapest possible — (never bump Scribe)
Git / Release gpt-5.6-luna Mechanical ops — changelogs, tags, version bumps — (never bump mechanical ops)

Read the full file on GitHub · 144 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 144 lines · 15 tokens per session scan A a52cc96f0553

Subscribe to this mod's changes

model-selection is a skill published in the GitHub repository bradygaster/squad (3,150 stars, last pushed today), licensed MIT. It adds 15 tokens to every session and 2,186 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.