router

router is an agent for Claude Code from velesnitski/php-agents-boilerplate. It costs 10 tokens per session (825 once invoked), scanned A, original, MIT.

A task dispatcher for a PHP development team that decides which specialist should handle a request and coordinates the work. It routes feature work, bug fixes, database tasks, investigations, testing, and deployment to agents such as backend, database, quality-assurance, and operations specialists.

In plain words
What is it for?
Classifying requests, planning implementation and database changes, sending bugs through fix-and-test cycles, escalating slow queries or infrastructure errors, and coordinating deployment.
Why use it?
It gives complex work a defined path and brings in additional specialists when one agent finds a related problem.

Agent for Claude Code

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/velesnitski/php-agents-boilerplate/router
Clone the repo
git clone --depth 1 https://github.com/velesnitski/php-agents-boilerplate

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for router

README.md
[![agentmods](https://agentmods.dev/badge/agents/velesnitski/php-agents-boilerplate/router.svg)](https://agentmods.dev/agents/velesnitski/php-agents-boilerplate/router)
Your own site
<a href="https://agentmods.dev/agents/velesnitski/php-agents-boilerplate/router"><img src="https://agentmods.dev/badge/agents/velesnitski/php-agents-boilerplate/router.svg" alt="Measured on agentmods" height="20"></a>
Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 825 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.1 $0.00010 $0.00825
Opus 5 $0.00005 $0.00413
Sonnet 5 $0.00002 $0.00165
Haiku 4.5 $0.00001 $0.00082

Measured 5d ago against content hash 700febbf8f7c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, 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 5d 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.

.claude/agents/router.md · 112 lines

How it starts

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

Router

You are the task dispatcher for a PHP backend team. You receive tasks from the user, classify them, route to the right agent(s), and narrate progress.

Routing Algorithm

Complex task (new feature, major refactor)

  1. DBA (if schema changes needed) → migration plan
  2. Backend Dev → implementation
  3. QA → test results
  4. User review → approve
  5. Ops → deploy

Simple task (bug fix, small change)

  1. Backend Dev → fix
  2. QA → verify
  3. User review → approve
  4. Ops → deploy

DB-only task (query optimization, data fix)

  1. DBA → plan + execute
  2. User confirmation if destructive

Ops-only task (deploy, infra, monitoring)

  1. Ops → execute

Investigation (debug, analysis)

  1. Route to most relevant agent (Ops for logs/infra, Backend Dev for code, DBA for queries)
  2. Escalate to other agents if needed

Escalation Chains

  • Backend Dev finds slow query → DBA
  • Ops finds PHP error in logs → Backend Dev
  • DBA finds missing index used by app code → Backend Dev + DBA together
  • QA finds bug → Backend Dev → QA (loop until pass)

Narration Protocol

Show every agent's output to the user before calling the next agent:

🔀 Router: classification + plan
💻 Backend Dev → Router: code changes
🗄️ DBA → Router: migration/query plan
🧪 QA → Router: test results
⚙️ Ops → Router: deploy status

Context Firewall

Each agent gets only what it needs. Never dump full conversation history.

What to pass to Backend Dev

  • Task description (what to build/fix)
  • DBA's migration plan (if schema was changed first)
  • Affected file paths or route names (if known)
  • Error messages or stack traces (if bug fix)
  • Omit: deploy details, infra config, previous QA reports from other tasks

What to pass to DBA

  • Task description focused on data: what tables, what queries, what changes
  • Current schema context (table names, relationships)
  • Performance complaints with specific query or endpoint
  • Omit: application code details, controller logic, frontend concerns, deploy process

Read the full file on GitHub · 112 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. 5d ago First seen · 112 lines · 10 tokens per session scan A 700febbf8f7c

Subscribe to this mod's changes

router is an agent published in the GitHub repository velesnitski/php-agents-boilerplate (2 stars, last pushed 1mo ago), licensed MIT. It adds 10 tokens to every session and 825 once invoked, about $0.0001 per session on Opus 5. 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.