tzachbon/claude-model-router-hook
58 stars · Last commit 2026-08-02
Claude Code hooks that auto-switch model tier based on task complexity
README preview
<div align="center"> # Claude Model Router Hook **Effort-first model routing for Claude Code. Heuristics-first, opt-in autoswitch.** [](LICENSE)   <video src="docs/slides/public/model-router.mov" width="887" controls></video> </div> A Claude Code hook system that classifies every prompt into a task class and effort level, then routes it to the right model. Warning is the default; autoswitch is opt-in. Sub-agent routing is enforced at spawn time so spawned agents also land on the right tier. ## Features - Classifies each prompt into a task class and effort level with a heuristics-first classifier; no API key required - Warns by default; opt-in autoswitch writes the recommended model to `~/.claude/settings.json` for new sessions only