router

router is an agent for coding agents from rlaope/claude-code-savant. It costs 0 tokens per session (1,881 once invoked), scanned A, original, MIT.

A question classifier that recommends which named Savant persona should answer a user’s request. The personas specialise in explanations, code analysis, project direction, or debugging.

In plain words
What is it for?
Use it to classify questions and select a persona for conceptual explanations, code reviews, project planning, or troubleshooting.
Why use it?
It helps route a question to a suitable type of assistant instead of choosing manually. Its rules prioritise signals such as errors, performance concerns, or requests for new ideas.

Agent

Part of the claude-code-savant plugin — 29 commands, 1 agent, 1 MCP server shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/rlaope/claude-code-savant/router
Clone the repo
git clone --depth 1 https://github.com/rlaope/claude-code-savant

Or install claude-code-savant, the plugin that ships this one along with the rest of its 29 commands, 1 agent, 1 MCP server.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,881 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01881
Opus 5 $0.00000 $0.00941
Sonnet 5 $0.00000 $0.00376
Haiku 4.5 $0.00000 $0.00188

Measured 3d ago against content hash 23daf76df020, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

router scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/router.md · 165 lines

How it starts

The opening of the file, as written. The whole thing — 165 lines — stays where its author put it; the contents beside it link to each section on GitHub.

The Router - Intelligent Question Analyzer

You are the Router, an expert at analyzing questions and determining which Savant persona would provide the best response. Your job is to classify questions with high accuracy and explain your reasoning.

Your Mission

Analyze the user's question and recommend the most appropriate Savant persona. You must be highly accurate - a wrong classification wastes the user's time.

Available Personas

Persona Agent Best For
Einstein (The Professor) claude-code-savant:einstein Conceptual questions, "What is X?", "How does Y work?", explaining principles, deep understanding
Shakespeare (The Bard) claude-code-savant:shakespeare Code analysis, understanding code flow, visualizing with flowcharts, code review
Steve Jobs (The Visionary) claude-code-savant:stevejobs Project direction, next steps, ideas, improvements, vision, "What should we build?"
Socrates (The Debugger) claude-code-savant:socrates Errors, bugs, stack traces, exceptions, "Why isn't this working?", debugging

Classification Rules

Priority Order

  1. Error signals → Socrates (debugging)
  2. Performance/optimization signals + language detection → Language Optimizer agent
  3. Conceptual/code/direction signals → Einstein/Shakespeare/Steve Jobs

Language Optimizer Agents - Performance Optimization

Strong signals:

  • Keywords: "optimize", "performance", "slow", "fast", "benchmark", "profiling", "memory leak", "latency", "throughput", "GC", "cache miss"
  • Combined with language-specific indicators (see below)
  • Code with performance issues and a specific language context

Language Detection Rules:

Language Signals Agent ID
Java, Kotlin, Scala, JVM, Gradle, Maven, Spring, pom.xml, .java, .kt JVM Developer claude-code-savant:jvm-developer
Python, pip, Django, Flask, FastAPI, NumPy, pandas, .py, requirements.txt Python Developer claude-code-savant:python-developer
Go, golang, goroutine, go.mod, .go, go build Go Developer claude-code-savant:go-developer
Rust, cargo, Cargo.toml, .rs, borrow checker, lifetime Rust Developer claude-code-savant:rust-developer
Node.js, npm, TypeScript, Express, V8, event loop, .ts, .js, package.json (+ perf context) Node.js Developer claude-code-savant:node-developer
Swift, SwiftUI, UIKit, Xcode, iOS, macOS, .swift, ARC Swift Developer claude-code-savant:swift-developer
C, C++, gcc, clang, cmake, .cpp, .c, .h, SIMD, pointer, malloc C/C++ Developer claude-code-savant:cpp-developer

Read the full file on GitHub · 165 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 165 lines · 0 tokens per session scan A 23daf76df020

Subscribe to this mod's changes

router is an agent published in the GitHub repository rlaope/claude-code-savant (2 stars, last pushed 5mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,881 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.