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…
Per-agent model selection with 4-layer hierarchy and fallback chains
The automated check flagged lines worth reading first. See the safety section below.
$ npx skills add bradygaster/squad --skill model-selection -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install bradygaster/squad model-selection --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ 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-srcUse ~/.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/
Install the "model-selection" agent skill from https://github.com/bradygaster/squad/tree/dev/.copilot/skills/model-selection into .claude/skills/model-selection/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "model-selection", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/bradygaster/squad/tree/dev/.copilot/skills/model-selectionType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add bradygaster/squad --skill model-selection -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install bradygaster/squad model-selection --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/bradygaster/squad.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.copilot/skills/model-selection .agents/skills/model-selection && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "model-selection" agent skill from https://github.com/bradygaster/squad/tree/dev/.copilot/skills/model-selection into .agents/skills/model-selection/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "model-selection", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add bradygaster/squad --skill model-selection -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install bradygaster/squad model-selection --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/bradygaster/squad.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.copilot/skills/model-selection .cursor/skills/model-selection && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "model-selection" agent skill from https://github.com/bradygaster/squad/tree/dev/.copilot/skills/model-selection into .cursor/skills/model-selection/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "model-selection", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/bradygaster/squad.git --path .copilot/skills/model-selection--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add bradygaster/squad --skill model-selection -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install bradygaster/squad model-selection --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/bradygaster/squad.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.copilot/skills/model-selection .gemini/skills/model-selection && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "model-selection" agent skill from https://github.com/bradygaster/squad/tree/dev/.copilot/skills/model-selection into .gemini/skills/model-selection/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "model-selection", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install bradygaster/squad model-selectionInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add bradygaster/squad --skill model-selection -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/bradygaster/squad.git skills-src && mkdir -p .github/skills && cp -r skills-src/.copilot/skills/model-selection .github/skills/model-selection && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "model-selection" agent skill from https://github.com/bradygaster/squad/tree/dev/.copilot/skills/model-selection into .github/skills/model-selection/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "model-selection", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add bradygaster/squad --skill model-selection -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install bradygaster/squad model-selection --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/bradygaster/squad.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.copilot/skills/model-selection .opencode/skills/model-selection && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "model-selection" agent skill from https://github.com/bradygaster/squad/tree/dev/.copilot/skills/model-selection into .opencode/skills/model-selection/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "model-selection", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
model-selectionPer-agent model selection with 4-layer hierarchy and fallback chains
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.
Read from SKILL.md and the folder at commit d2364df. It shows what the files ask for, not the result of running them.
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.
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.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
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.
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.
The automated check found patterns that need a careful read before installing.
retry with the next model in the chain. Do NOT tell the user about fallback attempts. Maximum 3 retries before using theAutomated 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.
The full file from bradygaster/squad at commit d2364df, republished under its MIT licence (© bradygaster). 866 words, ~1,975 tokens.
.claude/skills/model-selection/SKILL.md (or your agent's skills folder).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) | 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) |
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-3.1-pro): code reviews where a second perspective helps, security reviews, architecture reviews after a rejectionLayer 4 — Default: If nothing else matched, use gpt-5.6-luna. 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 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:
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.
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 docsInclude tier annotation only when the model was bumped or a specialist was chosen. Default-tier spawns just show the model name.
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
Example 1: Backend dev writing API endpoints
gpt-5.6-terra (standard tier)🔧 Agent Alpha (gpt-5.6-terra) — implementing user API endpointsExample 2: User override
claude-haiku-4.5 regardless of role or taskExample 3: Complex refactor
gpt-5.6-terragpt-5.3-codex🔧 Agent Alpha (gpt-5.3-codex · code specialist) — refactoring auth to new token systemExample 4: Scribe logging
gpt-5.6-luna📋 Scribe (gpt-5.6-luna · fast) — logging session© bradygaster, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .copilot/skills/model-selection of bradygaster/squad.
Open the folder on GitHubat commit d2364df
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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Model Selection this skillbradygaster/squad | 3.3k | — | ~2k | Automated safety check: Warn | MIT | |
| PR Design DocOpenHands/OpenHands | 90k | — | ~2.4k | Automated safety check: Pass | MIT | |
| Get API Docs with chubandrewyng/context-hub | 14k | 2 repos | ~775 | Automated safety check: Pass | MIT | |
| Open Code Review CLIalibaba/open-code-review | 44k | — | ~3.1k | Automated safety check: Pass | Apache-2.0 | |
| Codexskills-directory/skill-codex | 1.5k | 3 repos | ~1.8k | Automated safety check: Pass | MIT | |
| Implementation Final Reviewopenai/openai-agents-python | 30k | — | ~2k | Automated safety check: Pass | MIT |
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…
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.
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.
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
openai/openai-agents-python
Review completed implementation changes before final verification.
openai/openai-agents-python
Audit or fix sensitive-data exposure in Python SDK diagnostics, exceptions, logging, and telemetry.
bradygaster/squad
Review and validate claims using counter-hypothesis testing.
bradygaster/squad
How to review PRs for architectural quality — module boundaries, dependency direction, export surface, pattern consistency
bradygaster/squad
Preserve content when moving entries between tracked Squad state files
bradygaster/squad
Defensive CI/CD patterns: semver validation, token checks, retry logic, and draft detection
bradygaster/squad
Checklist and patterns for wiring new CLI commands into cli-entry.ts
bradygaster/squad
Enables squad agents on different machines to share work via git-based task queuing
Works with
Categories
Per-agent model selection with 4-layer hierarchy and fallback chains. Model Selection is an agent skill from bradygaster/squad.
Model Selection fits situations like: development work in your project.
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.
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.
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.
SKILL.md names no scripts, command-line tools or credentials: Model Selection is instructions for the agent only.
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.
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.
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.
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.
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.
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.