Claudius
Status

claude-model-router-hook

Hook

Claude Code hook that automatically switches the active model tier based on detected task complexity.

50· C
Install
git clone https://github.com/tzachbon/claude-model-router-hook
Stars
45
7d change
Downloads / week
Last active
today
About

Automatic model switching for Claude Code. No API calls, no config.

A Claude Code hook system that classifies every prompt by task complexity and switches your active model automatically. Sub-agent model rules are injected into every session so spawned agents also use the right tier.

Classifies prompts by complexity using keyword and pattern matching (zero API calls) Warns on tier mismatch by default; optionally auto-switches `settings.json` (`action: "autoswitch"`) Injects sub-agent model-selection rules into every session via `SessionStart` Prefix any prompt with `~` to bypass classification and keep the current model Logs every classification and switch to `~/.claude/hooks/model-router-hook.log`

Read more on GitHub →
30-day stars
collecting…
Trust factors
Source
community
Known advisories
0
Maintenance
active
License
none
Age
0 months
developer-toolstoken-efficiency#model-routing#hooks#haiku#sonnet#opus#auto-switch#ai-tools#anthropic#automation#bash#claude-code-plugin#claude-hooks#claudecode-hooks#llm#llm-router#model-router#oss#prompt-classification#shell