lucassantana-dev/forgekit/adt-smart-model-route

Claude Code and agent skill by lucassantana-dev/forgekit

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Auto-classify prompt complexity via Haiku (with heuristic fallback) and inject model routing hints for Agent tool calls. Wired as a UserPromptSubmit hook — fires on every prompt, routes low tasks to Haiku, standard to Sonnet, complex to Sonnet with thorough reasoning, and critical (security/arch/migrations) to Opus. Handles model selection, for example choose model by task complexity.

Install

npx vskill@latest install lucassantana-dev/forgekit/adt-smart-model-route

SKILL.md

The same SKILL.md was published earlier as lucassantana-dev/forgekit/adt-smart-model-route.

Smart Model Route

Classifies each incoming prompt and injects a systemMessage telling the AI which model to pass to Agent tool calls and what reasoning depth to use. Uses Haiku for classification when ANTHROPIC_API_KEY is available; otherwise falls back to keyword heuristics.

How It Works

  1. UserPromptSubmit hook fires on every prompt
  2. Sends prompt to claude-haiku-4-5 with a classification system prompt
  3. Returns low | medium | high | critical
  4. Injects a [AUTO:haiku] or [AUTO:heuristic] system message for non-medium tasks
  5. Claude uses this to calibrate reasoning depth and model: parameter on Agent calls

Classification Rules

LevelSignalsAgent model
lowSearch, grep, read, git status, quick questions, <20 wordsclaude-haiku-4-5
mediumStandard coding, bug fixes, typical tasks (default)claude-haiku-4-5 (env)
highImplement, refactor, debug, optimize, PR review, >15 wordsclaude-sonnet-4-6
criticalSecurity, OAuth, CVE, arch decisions, prod deploys, migrationsclaude-opus-4-7

Installation

  1. Copy complexity-classifier.sh to ~/.claude/hooks/
  2. Make it executable: chmod +x ~/.claude/hooks/complexity-classifier.sh
  3. Add to settings.json:
json
"UserPromptSubmit": [{
"matcher": "*",
"hooks": [{
"type": "command",
"command": "/path/to/hooks/complexity-classifier.sh",
"timeout": 5
}]
}]
  1. To enable Haiku-based classification (vs heuristic fallback):
json
"env": {
"ANTHROPIC_API_KEY": "your-key"
}

Or to route through a local LiteLLM / Ollama proxy (set these to your own host + key):

json
"env": {
"ANTHROPIC_API_KEY": "${LITELLM_MASTER_KEY}",
"ANTHROPIC_BASE_URL": "http://<your-litellm-host>:4000"
}

Using in Agent Calls

Once the hook is active, Claude reads the injected hint and applies it:

python
# For clearly simple tasks (override default)
Agent(model="haiku", prompt="search for all TODO comments")
# For complex tasks (override default)
Agent(model="opus", prompt="design the auth architecture for multi-tenant SaaS")

Session Model Override

For architecture or security sessions, switch the main model:

/model claude-opus-4-7

Switch back when done:

/model claude-sonnet-4-6

Dependencies

  • anthropic Python SDK (for Haiku classification): pip install anthropic
  • Heuristic fallback requires no dependencies

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
1
Repository forks
1
7-day trend score
8

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/lucassantana-dev/forgekit/adt-smart-model-route/badge)](https://verified-skill.com/skills/lucassantana-dev/forgekit/adt-smart-model-route)

Something wrong with this skill or its page? Tell us.