task-router

A task-routing system for CodeCrew, a setup where several AI agents share software-development work. It classifies a request, chooses agents and model levels, and decides whether work should happen together or in sequence.

In plain words
What is it for?
Breaking down and routing team tasks, while checking the project's configuration and code index first.
Why use it?
It organizes complex requests so the appropriate agents handle the appropriate parts.

Skill for Claude CodeCodex

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/d3x293/code-crew/task-router
Any agent
npx skills add d3x293/code-crew --skill task-router
Clone the repo
git clone --depth 1 https://github.com/d3x293/code-crew

Made for: Claude Code, Codex.

Per session 40 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,694 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.00040 $0.01694
Opus 5 $0.00020 $0.00847
Sonnet 5 $0.00008 $0.00339
Haiku 4.5 $0.00004 $0.00169

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

Security

Grade A, and why

task-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 2d 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/task-router/SKILL.md · 182 lines

How it starts

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

Task Router - CEO's Decision Engine

The brain of CodeCrew. When a task comes in, this skill classifies it, picks the right agents, decides the execution strategy, and kicks off the work.

When to Activate

  • User runs /crew task "description"
  • CEO agent needs to route a subtask

Prerequisites

These files MUST exist (run /crew init first):

  • .claude/crew-profile.md — project context
  • .claude/crew-team.json — agent configuration
  • .claude/crew-skills.json — skill catalog
  • .claude/crew-index.json — codebase index (Layer 1)
  • .claude/crew-symbols.json — symbol map (Layer 2)

If any are missing, tell the user to run /crew init first.

Routing Algorithm

Step 1: Read Context

1. Check if .claude/.index-stale exists
   - If yes: read the file paths listed, invoke index-updater for those files, then delete .claude/.index-stale
   - This handles files edited outside of /crew task (e.g., manual edits, other tools)
2. Read .claude/crew-profile.md for project context
3. Read .claude/crew-team.json for available agents
4. Read .claude/crew-config.json (if exists) for user overrides (default mode, budgets, etc.)
5. Read .claude/crew-index.json for codebase awareness

Step 2: Classify Task

Task Type (pick one):

Type Signals
bug-fix "fix", "bug", "broken", "error", "crash", "not working", "issue"
feature "add", "implement", "create", "build", "new", "feature"
refactor "refactor", "clean up", "reorganize", "restructure", "improve"
docs "document", "readme", "comment", "explain", "docs"
test "test", "coverage", "spec", "TDD", "unit test", "e2e"
security "security", "vulnerability", "auth", "permission", "XSS", "injection"
devops "deploy", "docker", "CI/CD", "pipeline", "kubernetes", "build"
review "review", "check", "audit", "quality"
performance "slow", "optimize", "performance", "speed", "memory", "cache"

Complexity (assess based on scope):

Level Signals
trivial Single word change, typo, formatting, one-line fix
simple Single file, clear fix, under 20 lines changed
moderate 2-4 files, some design decisions, 20-100 lines
complex 5+ files, architecture decisions, new patterns, 100+ lines
architectural System-wide changes, new subsystems, major refactors

Read the full file on GitHub · 182 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. 2d ago First seen · 182 lines · 40 tokens per session scan A 8888beedd1f9

Subscribe to this mod's changes

task-router is a skill published in the GitHub repository d3x293/code-crew (13 stars, last pushed 4mo ago), licensed MIT. It adds 40 tokens to every session and 1,694 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.