claude-model-router-hook
HookClaude Code hook that automatically switches the active model tier based on detected task complexity.
git clone https://github.com/tzachbon/claude-model-router-hookAutomatic 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`
- Source
- community
- Known advisories
- 0
- Maintenance
- active
- License
- none
- Age
- 0 months