tzachbon / claude-model-router-hook
PublicClaude Code hooks that auto-switch model tier based on task complexity
This project adds automatic model selection to Claude Code by classifying prompts and switching between Haiku, Sonnet, or Opus models for optimal cost and performance.
How It Works
While using your AI coding assistant Claude Code, you find this handy tool that automatically picks the right AI 'brain' size for your questions to save money and get better results.
Run a simple download command or add it as a plugin, and it places the helper files in your personal folder.
Add a couple of lines telling Claude Code to use these helpers at the start of chats and before sending messages.
Restart Claude Code, and now every new chat gets smart rules for picking models, feeling seamless and ready.
As you ask for git fixes or big architecture plans, it checks the task and switches to the perfect AI model automatically – or suggests if needed, saving you time and cash.
Now your AI always uses the best fit: quick and cheap for simple jobs, powerful for tough ones, with logs to see it working wonderfully.
Star Growth
Repurpose is a Pro feature
Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.
Unlock RepurposeSimilar repos coming soon.