Agent skill

Model Selection

by bradygaster in bradygaster/squad

Per-agent model selection with 4-layer hierarchy and fallback chains

MITAuto-check: warningsDevelopment

Install Model Selection

The automated check flagged lines worth reading first. See the safety section below.

skills CLI
$ npx skills add bradygaster/squad --skill model-selection -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install bradygaster/squad model-selection --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/bradygaster/squad.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.copilot/skills/model-selection .claude/skills/model-selection && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
model-selection
GitHub stars
3.3k
Token cost
~2k tokens
SKILL.md length
866 words
Files
1
Skills in repo
31
Repo updated
First seen
Licence
MIT

At a glance

Per-agent model selection with 4-layer hierarchy and fallback chains

  • Development work in your project
  • SKILL.md covers Context, Patterns, Examples and Anti-Patterns
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Model Selection is an agent skill from bradygaster/squad. Per-agent model selection with 4-layer hierarchy and fallback chains

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Development. It works with OpenAI. The repository describes itself as: Squad: AI agent teams for any project. The licence is MIT.

When your agent uses it

  • Development work in your project

Example prompts

  • “/model-selection”

What it can do on your machine

Read from SKILL.md and the folder at commit d2364df. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Model Selection loads about 2k tokens when it runs. Until then it costs about 21 tokens; SKILL.md has 866 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~21
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: warnings

The automated check found patterns that need a careful read before installing.

  • WarningContains instruction-override wording (e.g. “without asking the user”)SKILL.md:56
    retry with the next model in the chain. Do NOT tell the user about fallback attempts. Maximum 3 retries before using the

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from bradygaster/squad at commit d2364df, republished under its MIT licence (© bradygaster). 866 words, ~1,975 tokens.

Download SKILL.mdSave it as .claude/skills/model-selection/SKILL.md (or your agent's skills folder).
name
model-selection
description
Per-agent model selection with 4-layer hierarchy and fallback chains
domain
orchestration
confidence
high
source
extracted

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 OutputModelTierRule
Writing code (implementation, refactoring, test code, bug fixes)gpt-5.6-terraStandardQuality and accuracy matter for code. Use standard tier.
Writing prompts or agent designs (structured text that functions like code)gpt-5.6-terraStandardPrompts are executable — treat like code.
NOT writing code (docs, planning, triage, logs, changelogs, mechanical ops)gpt-5.6-lunaFastCost first. Luna handles non-code tasks by default.
Visual/design work requiring image analysisgpt-5.6-solPremiumVision capability required. Overrides cost rule.

Role-to-model mapping (applying cost-first principle):

RoleDefault ModelWhyOverride When
Core Dev / Backend / Frontendgpt-5.6-terraWrites code — quality firstHeavy code gen → gpt-5.3-codex
Tester / QAgpt-5.6-terraWrites test code — quality firstSimple test scaffolding → claude-haiku-4.5
Lead / Architectauto (per-task)Mixed: code review needs quality, planning needs costArchitecture proposals → premium; triage/planning → luna
Prompt Engineerauto (per-task)Mixed: prompt design is like code, research is notPrompt architecture → gpt-5.6-terra; research/analysis → haiku
Copilot SDK Expertgpt-5.6-terraTechnical analysis that often touches codePure research → claude-haiku-4.5
Designer / Visualgpt-5.6-solVision-capable model required— (never downgrade — vision is non-negotiable)
DevRel / Writergpt-5.6-lunaDocs and writing — not code—
Scribe / Loggergpt-5.6-lunaMechanical file ops — cheapest possible— (never bump Scribe)
Git / Releasegpt-5.6-lunaMechanical ops — changelogs, tags, version bumps— (never bump mechanical ops)

Task complexity adjustments (apply at most ONE — no cascading):

  • Bump UP to premium: architecture proposals, reviewer gates, security audits, multi-agent coordination (output feeds 3+ agents)
  • Bump DOWN to fast/cheap: typo fixes, renames, boilerplate, scaffolding, changelogs, version bumps
  • Switch to code specialist (gpt-5.3-codex): large multi-file refactors, complex implementation from spec, heavy code generation (500+ lines)
  • Switch to analytical diversity (gemini-3.1-pro): code reviews where a second perspective helps, security reviews, architecture reviews after a rejection

Layer 4 — Default: If nothing else matched, use gpt-5.6-luna. Cost wins when in doubt, unless code is being produced.

Fallback Chains

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 using the platform default fallback.

Premium:  gpt-5.6-sol → claude-opus-5 → claude-opus-4.8 → claude-opus-4.7 → claude-opus-4.6 → claude-sonnet-4.6 → (omit model param)
Standard: gpt-5.6-terra → claude-sonnet-5 → claude-sonnet-4.6 → gpt-5.5 → gpt-5.4 → gpt-5.3-codex → claude-sonnet-4.5 → gemini-3.1-pro → (omit model param)
Fast:     gpt-5.6-luna → 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 platform default fallback — it lets the platform choose the model.

Fallback rules:

  • If the user specified a provider ("use Claude"), fall back within that provider only before using the platform default fallback
  • Never fall back UP in tier — a fast/cheap task should not land on a premium model
  • Log fallbacks to the orchestration log for debugging, but never surface to the user unless asked
Show full SKILL.md (310 more words)Show less
Passing the Model to Spawns

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 the platform default fallback, omit the model parameter entirely.

Spawn Output Format

When spawning, include the model in your acknowledgment:

🔧 Agent Alpha (claude-sonnet-5) — refactoring auth module
🎨 Agent Beta (gpt-5.6-sol · vision) — designing color system
📋 Scribe (gpt-5.6-luna · fast) — logging session
⚡ Agent Gamma (gpt-5.6-sol · bumped for architecture) — reviewing proposal
📝 Agent Delta (gpt-5.6-luna · 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.

Valid Models

Premium: gpt-5.6-sol, claude-opus-5, claude-opus-4.8, claude-opus-4.7, claude-opus-4.6 Standard: gpt-5.6-terra, claude-sonnet-5, claude-sonnet-4.6, claude-sonnet-4.5, gpt-5.5, gpt-5.4, gpt-5.3-codex, gemini-3.1-pro Fast/Cheap: gpt-5.6-luna, claude-haiku-4.5, gpt-5.4-mini, gpt-5-mini

Examples

Example 1: Backend dev writing API endpoints

  • Role: Backend Dev
  • Task: "implement REST endpoints for user management"
  • Layer 3 decision: writing code → gpt-5.6-terra (standard tier)
  • Spawn: 🔧 Agent Alpha (gpt-5.6-terra) — implementing user API endpoints

Example 2: User override

  • User says: "use haiku for everything this session"
  • Layer 1 overrides all other layers
  • All spawns use claude-haiku-4.5 regardless of role or task

Example 3: Complex refactor

  • Role: Backend Dev
  • Task: "refactor 15 auth-related files to use new token system"
  • Layer 3 base: gpt-5.6-terra
  • Task complexity: heavy multi-file refactor → switch to gpt-5.3-codex
  • Spawn: 🔧 Agent Alpha (gpt-5.3-codex · code specialist) — refactoring auth to new token system

Example 4: Scribe logging

  • Role: Scribe
  • Task: "log session to decisions.md"
  • Layer 3: NOT writing code → gpt-5.6-luna
  • Role mapping: Scribe always luna, never bump
  • Spawn: 📋 Scribe (gpt-5.6-luna · fast) — logging session

Anti-Patterns

  • ❌ Falling back UP in tier (fast task landing on premium model)
  • ❌ Telling the user about fallback attempts ("Opus failed, trying Sonnet")
  • ❌ Bumping Scribe or mechanical ops agents to higher tiers
  • ❌ Using premium models for documentation or planning tasks
  • ❌ Applying multiple complexity adjustments (cascading bumps)
  • ❌ Forgetting to include model in spawn acknowledgment
  • ❌ Downgrading vision-required tasks from the premium visual model

© bradygaster, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .copilot/skills/model-selection of bradygaster/squad.

Open the folder on GitHubat commit d2364df

Compare with similar skills

Model Selection next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Model Selection compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Model Selection this skillbradygaster/squad3.3k—~2kAutomated safety check: WarnMIT
PR Design DocOpenHands/OpenHands90k—~2.4kAutomated safety check: PassMIT
Get API Docs with chubandrewyng/context-hub14k2 repos~775Automated safety check: PassMIT
Open Code Review CLIalibaba/open-code-review44k—~3.1kAutomated safety check: PassApache-2.0
Codexskills-directory/skill-codex1.5k3 repos~1.8kAutomated safety check: PassMIT
Implementation Final Reviewopenai/openai-agents-python30k—~2kAutomated safety check: PassMIT

Similar skills

  • PR Design Doc

    OpenHands/OpenHands

    For a non-trivial pull request, write a self-contained HTML design doc under the temporary .pr/ directory and link a visibility-appropriate preview in the PR description, so maintainers grasp the…

    90k GitHub stars~2.4k tokensUpdated today
    DevelopmentAuto-check passed
  • Get API Docs with chub

    andrewyng/context-hub

    Fetches current documentation for third-party APIs and SDKs with the chub CLI before the agent writes code against them, instead of relying on remembered API shapes.

    14k GitHub starsUsed in 2 repos~775 tokens
    DevelopmentAuto-check passed
  • Open Code Review CLI

    alibaba/open-code-review

    Runs the ocr command-line tool to review Git changes, a commit or a branch comparison with an AI model, returning line-level comments and optionally applying fixes.

    44k GitHub stars~3.1k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Codex

    skills-directory/skill-codex

    A skill your agent uses when the user asks to run Codex CLI (codex exec, codex resume) or references OpenAI Codex for code analysis, refactoring, or automated editing

    1.5k GitHub starsUsed in 3 repos~1.8k tokens
    DevelopmentAuto-check passed
  • Implementation Final Review

    openai/openai-agents-python

    Official

    Review completed implementation changes before final verification.

    30k GitHub stars~2k tokensUpdated today
    DevelopmentAuto-check passed
  • Sensitive Logging Audit

    openai/openai-agents-python

    Official

    Audit or fix sensitive-data exposure in Python SDK diagnostics, exceptions, logging, and telemetry.

    30k GitHub stars~1k tokensUpdated today
    DevelopmentAuto-check passed

More from bradygaster/squad

All 31 skills in this repo
  • Fact Checking

    bradygaster/squad

    Review and validate claims using counter-hypothesis testing.

    3.3k GitHub stars~503 tokensUpdated yesterday
    Auto-check passed
  • Architectural Review

    bradygaster/squad

    How to review PRs for architectural quality — module boundaries, dependency direction, export surface, pattern consistency

    3.3k GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed
  • Archival Integrity

    bradygaster/squad

    Preserve content when moving entries between tracked Squad state files

    3.3k GitHub stars~735 tokensUpdated yesterday
    Auto-check passed
  • CI Validation Gates

    bradygaster/squad

    Defensive CI/CD patterns: semver validation, token checks, retry logic, and draft detection

    3.3k GitHub stars~1.1k tokensUpdated yesterday
    Auto-check passed
  • CLI Wiring

    bradygaster/squad

    Checklist and patterns for wiring new CLI commands into cli-entry.ts

    3.3k GitHub stars~501 tokensUpdated yesterday
    Auto-check passed
  • Enables squad agents on different machines to share work via git-based task queuing

    3.3k GitHub stars~2.7k tokensUpdated yesterday
    Auto-check passed

Works with

Categories

Questions about Model Selection

What does Model Selection do?

Per-agent model selection with 4-layer hierarchy and fallback chains. Model Selection is an agent skill from bradygaster/squad.

When should I use Model Selection?

Model Selection fits situations like: development work in your project.

How do I install Model Selection in Claude Code?

Run `npx skills add bradygaster/squad --skill model-selection -a claude-code`. Or copy the skill folder (.copilot/skills/model-selection in bradygaster/squad) into .claude/skills/model-selection in your project. Claude Code loads it when a task matches its description.

How do I install Model Selection in Codex?

Run `npx skills add bradygaster/squad --skill model-selection -a codex`. Or copy the skill folder (.copilot/skills/model-selection in bradygaster/squad) into .agents/skills/model-selection in your project. Codex loads it when a task matches its description.

Can I use Model Selection in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add bradygaster/squad --skill model-selection -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/model-selection, .gemini/skills/model-selection, .github/skills/model-selection and .opencode/skills/model-selection in your project.

What does Model Selection need to run?

SKILL.md names no scripts, command-line tools or credentials: Model Selection is instructions for the agent only.

Does Model Selection access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Model Selection safe to install?

Our automated static check of SKILL.md flagged 1 warning(s): contains instruction-override wording (e.g. “without asking the user”). Read the flagged lines before installing; the check is not a guarantee either way.

What licence does Model Selection use?

Model Selection is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Model Selection use?

About 2k tokens (SKILL.md is roughly 7.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Model Selection?

Skills that share tags, products or a category with Model Selection: PR Design Doc (OpenHands/OpenHands, 90k stars), Get API Docs with chub (andrewyng/context-hub, 14k stars), Open Code Review CLI (alibaba/open-code-review, 44k stars) and Codex (skills-directory/skill-codex, 1.5k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Model Selection?

bradygaster (a GitHub user) maintains it in bradygaster/squad, which has 3,256 GitHub stars. The repository holds 31 skills in this directory. The repository was last updated on October 6, 2026.

Source: bradygaster/squad on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.