Claude Code hook
Model Matchmaker
Local hook that routes each prompt to a suitable model tier to save cost.
Install
git clone https://github.com/coyvalyss1/model-matchmaker.gitFrom the README
Model Matchmaker Stop paying Opus prices to rename files. Stop waiting 20 seconds for responses that should take 3. A local hook for Cursor and Claude Code that classifies every prompt before it's sent and recommends the right model. Saves money (cloud APIs), speeds up your workflow (everyone), reduces resource usage (local models). No proxy, no API calls, no dependencies. Three files, two minutes to set up. What It Does Before each prompt is sent, Model Matchmaker reads what you're asking and which model you're on, then makes a call: - Step-down: You're on Opus asking to git commit? Blocked. "Switch to Haiku, same result, 90% cheaper." - Step-up: You're on Sonnet asking about architecture tradeoffs? Blocked. "Switch to Opus, you need the horsepower." - Pass-through: You're on the right model? Prompt goes through instantly. Override anytime by prefixing your prompt with !. Auto-Switch (Optional) Enable automatic model switching (v2+): When Model Matchmaker blocks a prompt, it now automatically switches the model and submits your message via keyboard automation: 1. Opens the model dropdown (Cmd+/) 2. Types the model name to search 3. Presses Enter 3 times (select model, confirm, submit message) 4. Terminal window flashes briefly, then closes 5. Your message is sent with the correct model (~3-4 seconds total) Check status: Disable anytime with off. Uses macOS Accessibility permissions + Terminal.app proxy for safe, reliable switching. Mode Support: Auto-switch adapts to Cursor's different modes (Agent, Plan, Debug, Ask). In Plan mode, Haiku is unavailable, so Model Matchmaker automatically switches to Sonnet instead. To log your current mode: This ensures correct dropdown navigation for each mode. How It Works Three layers work together: 1.…
How hooks work
- Hooks are shell commands Claude Code runs at fixed points: before or after a tool call, when you submit a prompt, when Claude stops, on notifications and at session start.
- They are set in the hooks section of ~/.claude/settings.json (or .claude/settings.json for a project), or come bundled in a plugin.
- A hook can block a tool call, add context, or run a formatter or test. Read the scripts before you install them: they run on your machine with your permissions.
Details
- Repository
- coyvalyss1/model-matchmaker
- Type
- Hooks
- Language
- Shell
- License
- MIT
- Last updated
- 22 September 2026
FAQ
What is Model Matchmaker?
Local hook that routes each prompt to a suitable model tier to save cost. It is a hook for Claude Code, from coyvalyss1/model-matchmaker on GitHub.
How do I install Model Matchmaker?
Clone coyvalyss1/model-matchmaker from GitHub and follow the setup steps in its README.
Is Model Matchmaker popular?
coyvalyss1/model-matchmaker has 168 GitHub stars and 15 forks. It was last updated on 22 September 2026.
More hooks
Model Router Hook
107tzachbon/claude-model-router-hook
Hooks that switch Claude's model tier automatically according to task complexity.
agentlint
215mauhpr/agentlint
Local guardrail hooks that check proposed file edits and shell commands and block risky patterns.
Claude Code Spinner
320i1kazantsev/claude-code-spinner
Замена фраз спиннера клод-кода для уважаемых вайбкодеров.
Claude Code Boost
165yifanzz/claude-code-boost
Claude Code Boost - Hook utilities for Claude Code with intelligent auto-approval
Nimrod
258mixelpixx/Nimrod
Web research for Claude over MCP: quality-scored Google search, clean extraction, deep research. Hosted connector for claude.ai/Desktop/Code + Nimrod Desktop toolkit (skills, agent, hooks).
Claude Hooks SDK
68beyondcode/claude-hooks-sdk
PHP library for building Claude Code hooks with a fluent API.
Browse the most popular Claude Code mods, all hooks, or the skills and MCP server directories.