agent-routing

agent-routing is a skill for Claude Code, Codex from shawnla90/recursive-drift. It costs 37 tokens per session (1,685 once invoked), scanned A, original, MIT.

A routing guide for deciding how many coding agents should handle a task. It considers the number of files, the kinds of work involved and whether project decisions have already been recorded.

In plain words
What is it for?
Use it to choose between one focused session, subagents or agent teams, and to check whether a complex task needs a CONTEXT.md or /discuss first.
Why use it?
It helps avoid using too many agents for a small task or splitting complex work without first settling the design.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

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 skills/shawnla90/recursive-drift/agent-routing
Any agent
npx skills add shawnla90/recursive-drift --skill agent-routing
Clone the repo
git clone --depth 1 https://github.com/shawnla90/recursive-drift

Made for: Claude Code, Codex.

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 agent-routing

README.md
[![agentmods](https://agentmods.dev/badge/skills/shawnla90/recursive-drift/agent-routing.svg)](https://agentmods.dev/skills/shawnla90/recursive-drift/agent-routing)
Your own site
<a href="https://agentmods.dev/skills/shawnla90/recursive-drift/agent-routing"><img src="https://agentmods.dev/badge/skills/shawnla90/recursive-drift/agent-routing.svg" alt="Measured on agentmods" height="20"></a>
Per session 37 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,685 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.00037 $0.01685
Opus 5 $0.00018 $0.00843
Sonnet 5 $0.00007 $0.00337
Haiku 4.5 $0.00004 $0.00169

Measured 6d ago against content hash ddb4d995ea70, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

agent-routing 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 6d 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.

skills/agent-routing/SKILL.md · 159 lines

How it starts

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

Agent Routing -- Choose the Right Execution Pattern

Before spinning up agents or teams, run this decision framework. The goal is to match the execution pattern to the task, not default to the most complex option.


Step 0: Decision-Lock Check

Before analyzing execution pattern, check for an existing CONTEXT.md:

  1. CONTEXT.md exists in the feature working directory -- Read the ## Decisions section. Use locked decisions to inform the 5-dimension analysis below. Do not re-ask anything already decided.

  2. No CONTEXT.md AND task is complex (3+ files across 2+ concerns) -- Recommend /discuss first:

    This task touches [N] files across [concerns]. Recommend running /discuss to lock decisions before routing.

    If the user says "skip" or "just go", proceed to Step 1 without a CONTEXT.md.

  3. Task is small (1-2 files, single concern) -- Skip directly to Step 1. No discussion needed.


Step 1: Task Analysis

Evaluate the task against these 5 dimensions. Be honest -- do not inflate complexity to justify a team.

1. File Count

How many files will be WRITTEN or EDITED (not read)?

  • 1-2 files: Single session territory
  • 3-4 files: Subagent territory
  • 5+ files across different concerns: Team territory

2. Concern Separation

Are the outputs independent or do they need coordination?

  • All outputs go in the same file or closely related files: Single session
  • Outputs are in different files but follow the same pattern: Subagents (each mirrors a known pattern independently)
  • Outputs are in different files AND require different expertise (content vs code vs config vs deploy): Team

3. Handoff Requirement

Does any task need the OUTPUT of another task before it can start?

  • No handoffs -- all tasks can run with existing context: Subagents
  • Linear handoff -- A feeds B feeds C: Single session (sequential in one context is faster than agent-to-agent messaging)
  • Fan-out handoff -- A feeds B, C, D simultaneously: Team (A completes, then B/C/D run in parallel)

Read the full file on GitHub · 159 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. 6d ago First seen · 159 lines · 37 tokens per session scan A ddb4d995ea70

Subscribe to this mod's changes

agent-routing is a skill published in the GitHub repository shawnla90/recursive-drift (18 stars, last pushed 5mo ago), licensed MIT. It adds 37 tokens to every session and 1,685 once invoked, about $0.0002 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-30.

Related

Other skills, from other repositories

vc-autopilot

Emit and validate the provisional goal block for Autopilot Mode. Owns the 9-field format and resume detection from a pasted goal block.

withkynam/vibecode-pro-max-kit · 34 tokens

vc-security

STRIDE + OWASP-based security audit with optional auto-fix. Scans code for vulnerabilities, categorizes by severity, and can iteratively fix findings using vc-autoresearch pattern.

withkynam/vibecode-pro-max-kit · 41 tokens

vc-audit-plans

Audit active project plan files for staleness, completion, and routing truth. Use when cleaning up plans, reconciling active work, or archiving completed artifacts.

withkynam/vibecode-pro-max-kit · 40 tokens

vc-audit-vc

Audit agent harness health: Claude/Codex agent parity, skill registry consistency, README.md sync, and protocol file wiring. Use when agents, skills, README.md, or development-protocol files move, split, or drift.

withkynam/vibecode-pro-max-kit · 52 tokens

vc-problem-solving

Apply systematic problem-solving techniques when stuck. Use for complexity spirals, innovation blocks, recurring patterns, assumption constraints, simplification cascades, scale uncertainty.

withkynam/vibecode-pro-max-kit · 36 tokens

doncheli-prd

Generate professional Product Requirement Documents (PRD) from multiple sources — Figma designs, briefs, user research, existing code. Includes risk analysis, RICE prioritization, Gherkin stories and launch plan. Activate when user mentions "PRD", "product requirements", "requirement document", "product spec", "figma…

doncheli/don-cheli-sdd · 81 tokens