# Claude Router

> Claude Code plugin that sorts each prompt into simple, medium or complex, then picks the Claude model, thinking effort and validator for it, so your subscription goes further.

Claude Router is a free AI agent skill on Agensi by Rohit Gampa, in LLM Ops. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [Rohit Gampa](https://www.agensi.io/creators/gamparohit)
- Category: [LLM Ops](https://www.agensi.io/skills/llm-ops)
- Version: 1.0
- Last updated: 2026-11-22
- Security: scan passed (2026-11-22); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/claude-router
- Tags: llm-ops, ai-agents, claude-code, typescript, cost-optimization, llm-routing, claude-code-plugin

## About this skill

Most prompts don't need your biggest model. Claude Router is a Claude Code plugin (installed as `router`) that reads each prompt before it runs, sorts it into **simple**, **medium** or **complex**, and picks which Claude model does the work, how hard it thinks, and whether a validator checks the result.

### What it does
- **Haiku classifier:** before each prompt, Claude Haiku answers three questions: how much effort the request needs, whether it is only a question, and whether it includes an error or steps to reproduce. Fixed cut-offs turn the answers into a tier. Cost: up to about $0.001 of your own usage per prompt.
- **Keyword fallback:** if the Haiku call fails, a simple keyword check decides.
- **Tiers:** simple runs on a small model alone; medium has Haiku orchestrate Haiku subagents, with Opus taking over after a caught failure; complex has Opus orchestrate Sonnet executors with a validator.
- **Sticky tiers:** switching models mid-conversation throws away the prompt cache, so the tier only moves down while a conversation is short. Follow-ups of six words or fewer keep the current tier.
- **Status line:** shows tier, models and effort after every prompt.
- **Manual override tags:** `#simple` `#medium` `#complex` force a tier; `#validate` / `#novalidate` / `#autovalidate` control the validator. Tags are stripped before the model sees the prompt.
- **Private, counts-only log** at `~/.claude-router/log.jsonl` (no prompt text). Set `ROUTER_LOG=0` to turn it off.

### What it saves
On 500 SWE-bench issues (Claude 4.5 models, API prices), routing cost 16–32% less than always using Opus while solving 1.1–5.6 points fewer; against always-Sonnet the saving was 3–22%. Orchestration overhead isn't in that data, so expect real savings to be lower.

### Install
```
/plugin install router --marketplace gamparohit/claude-router
```
Answer `y` to add the marketplace, pick user scope, start a new session. Nothing else to install.

### Status
Early release. The hooks are tested against Claude Code's plugin test kit with stubbed model calls, but haven't yet been verified in a live session. Reports from real use, including "it worked", are very welcome on GitHub. MIT licensed.

## Requires

- Claude Code
- Claude subscription or Anthropic API access
- Optional: Node.js (only for the eval/ scripts)

## Known limitations

Adds approximately $0.001 cost and short latency per prompt. Haiku evaluator has not been verified in a live session.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Claude Router skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does the Claude Router help me save money on development costs?

This skill automates the selection of the most cost-effective Claude model for every prompt, preventing you from wasting budget on expensive reasoning for simple tasks like basic syntax checks or file lookups.

### Which AI agents or environments are compatible with this skill?

The skill is purpose-built for Claude Code; once installed via the /plugin command, it operates natively within your terminal environment to route prompts dynamically.

### What is included? It is free and MIT licensed.

The full plugin source: the TypeScript routing logic and Claude Code hooks, an HTML explainer with diagrams, and the Node.js/Python evaluation scripts used for the SWE-bench savings estimate. The SWE-bench data itself is not included.

### Will using a router significantly slow down my Claude Code response times?

It adds one small Claude Haiku call before each prompt. Measured through the claude CLI that took about 5 s, of which the model call was about 0.75 s; the plugin calls Haiku directly at low effort, which should be faster but has not yet been timed in a live session. Short follow-ups of six words or fewer skip the call entirely.

### Can I manually choose a model tier if I don't want to use the automatic routing?

Yes, you can manually override the automatic classification by using tags like #complex for high-stakes tasks or #simple for quick queries to force a specific model tier.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
