Large refactoring: "Refactor entire...", "Redesign..."
Examples
User: "What files contain FATMAX logic?"
→ Auto-triggers Haiku
User: "Implement new API endpoint /api/vo2max/export"
→ Auto-triggers Sonnet
User: "Design the entire data pipeline from collection to visualization"
→ Auto-triggers Opus
Integration
Works seamlessly with:
CLAUDE.md Model Selection Guide (lines 100-137)
Explicit override: [Opus] your task forces specific model
Auto routing when no model specified
1---2name: model-router3description: Model Router Skill4---5# Model Router Skill67## Metadata89```yaml10name: model-router11version: 1.0.012description: Intelligently route tasks to appropriate Claude model based on complexity13author: CPET Team14triggers:15 - patterns:16 - "(?:implement|build|create|develop|add|write|refactor|redesign|optimize|architect).*\\b(?:API|endpoint|feature|component|function|system|pipeline|framework|architecture)\\b"17 - "(?:plan|design|architect).*(?:full-stack|entire|comprehensive|system-wide|large-scale)"18 - "(?:refactor|rewrite|redesign)\\b.{0,50}\\b(?:all|entire|whole|complete|major)"19 - "(?:what|which|list|find|show|explain|describe)\\b.*\\b(?:files|functions|modules|components|how|logic)\\b"20 - "(?:analyze|investigate|debug|profile|check).*\\b(?:performance|efficiency|bottleneck|issue|problem)\\b"21 model_hints:22 - pattern: "(?:implement|build|develop)\\b.{0,100}\\b(?:API|endpoint|feature|component)\\b(?!.*refactor)(?!.*optimize)"23 model: sonnet24 reason: "Medium-scale feature implementation"25 - pattern: "(?:what|which|list|find|explain)\\b"26 model: haiku27 reason: "Simple query or search"28 - pattern: "(?:plan|design|architect|refactor|redesign|rewrite).*\\b(?:entire|all|whole|comprehensive|full-stack|system-wide)"29 model: opus30 reason: "Large-scale architecture or design"31 - pattern: "(?:analyze|profile|debug|optimize).*\\b(?:performance|efficiency|bottleneck)"32 model: sonnet33 reason: "Detailed analysis task"3435proactive: true36auto_trigger: true37```3839## How It Works4041Automatically detects task complexity from user input and routes to the appropriate model:4243### Detection Rules44451. **Haiku (Fast)** - Triggered by:46 - Questions: "What files...", "Which modules...", "Explain...", "List..."47 - Simple searches or lookups48 - Code reading/understanding49502. **Sonnet (Balanced)** - Triggered by:51 - Feature implementation: "Implement new API endpoint..."52 - Detailed analysis: "Analyze performance..."53 - Medium-scale changes (3-5 files)54553. **Opus (Deep)** - Triggered by:56 - Architecture terms: "design", "architect", "plan"57 - Scale keywords: "entire", "all", "full-stack", "comprehensive"58 - Large refactoring: "Refactor entire...", "Redesign..."5960## Examples6162```63User: "What files contain FATMAX logic?"64→ Auto-triggers Haiku6566User: "Implement new API endpoint /api/vo2max/export"67→ Auto-triggers Sonnet6869User: "Design the entire data pipeline from collection to visualization"70→ Auto-triggers Opus71```7273## Integration7475Works seamlessly with:76- CLAUDE.md Model Selection Guide (lines 100-137)77- Explicit override: `[Opus] your task` forces specific model78- Auto routing when no model specified
Run npx skillmds@latest add cyanluna-git/model-router in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
Model Router Skill It is listed under AI & ML on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
cyanluna-git (@cyanluna-git) published this skill. Their other Agent Skills are listed on their SkillMD profile.