Back to list
RustyLindquist

task-router

by RustyLindquist

An AI-Enhanced Online Academy for HR

0🍴 0📅 Jan 25, 2026

SKILL.md


name: task-router description: Automatically analyze tasks and route to optimal agent(s). Use when receiving complex requests to determine which agents to spawn.

Task Router

Intelligent routing skill that analyzes user requests and determines optimal agent dispatch.

Purpose

Reduce orchestrator cognitive load by automatically:

  1. Inferring user intent (via /infer-intent)
  2. Classifying task type and complexity
  3. Identifying required agent(s)
  4. Detecting parallelization opportunities
  5. Recommending model tier per agent

Integrated Workflow

User Request
     │
     ▼
┌─────────────────┐
│  /infer-intent  │ ← Step 0: Understand what user wants
└────────┬────────┘
         │ Intent Summary (YAML)
         ▼
┌─────────────────┐
│  /task-router   │ ← This skill: Route to agents
└────────┬────────┘
         │ Dispatch Plan
         ▼
    Execute Plan

When to Use

  • At the start of any non-trivial task
  • When uncertain which agent(s) to spawn
  • Before spawning multiple agents (to optimize parallelization)
  • Automatically invoked by /infer-intent for complex tasks

Routing Process

Step 1: Task Classification

Classify the request into categories:

CategorySignalsPrimary Agent
UI/Frontendcomponent, styling, page, view, layout, responsiveFrontend Agent
Backend/APIserver action, API, database, RLS, migrationBackend Agent
Explorationwhere, how, find, trace, understandResearch Agent
Documentationinvariants, constraints, features, couplingDoc Agent
Testingtest, verify, validate, check, QATest Agent
Architecturedesign, refactor, structure, patternArchitect Agent
Securityauth, permissions, RLS, vulnerabilitySecurity Agent
Systemoptimize, improve, process, agentOps Agent

Step 2: Complexity Assessment

Score task complexity (1-10):

FactorPoints
Touches 1 feature+1
Touches 2-3 features+3
Touches 4+ features+5
Database/schema changes+2
Auth/RLS involved+2
AI/context involved+2
Billing involved+3
New feature (not bugfix)+1
User workflow change+2

Complexity Levels:

  • 1-3: Simple (may not need agent)
  • 4-6: Moderate (single agent)
  • 7-9: Complex (multiple agents, sequential)
  • 10+: Critical (multiple agents, Doc Agent required)

Step 3: Parallelization Detection

Tasks can run in parallel when:

  • No data dependencies between tasks
  • Different domains (frontend vs backend)
  • Independent bug fixes
  • Research across different features

Tasks must be sequential when:

  • API contract needed before frontend
  • Schema needed before server actions
  • Tests depend on implementation
  • Security review before deployment

Step 4: Model Recommendation

ComplexityAgent TypeRecommended Model
SimpleResearchhaiku
SimpleAny othersonnet
ModerateImplementationsonnet
ModerateReview/Auditopus
ComplexAnyopus
CriticalAnyopus

Output Format

## Task Routing Analysis

### Classification
- **Primary Type**: [category]
- **Secondary Types**: [if multi-domain]
- **Complexity Score**: [N]/10 ([level])

### Agent Dispatch Plan

| Order | Agent | Model | Task |
|-------|-------|-------|------|
| 1 | [agent] | [model] | [specific task] |
| 2 | [agent] | [model] | [specific task] |

### Parallelization
- **Can Parallelize**: [Yes/No]
- **Parallel Groups**: [if yes, which agents can run together]
- **Dependencies**: [what must complete before what]

### Recommendation
[1-2 sentence summary of recommended approach]

Quick Routing Table

Request PatternRoute To
"Add/create component..."Frontend Agent
"Fix the button/card/modal..."Frontend Agent
"Create server action..."Backend Agent
"Add RLS policy..."Backend Agent
"Where is X implemented?"Research Agent
"How does Y work?"Research Agent
"What are the invariants for..."Doc Agent
"Test the..."Test Agent
"Refactor/redesign..."Architect Agent
"Review security of..."Security Agent
"Optimize the system..."Ops Agent

Integration

After routing, spawn agents using:

  • /spawn-frontend-agent
  • /spawn-backend-agent
  • /spawn-research-agent
  • /spawn-doc-agent
  • /spawn-test-agent
  • /spawn-architect-agent
  • /spawn-security-agent
  • /spawn-ops-agent

For parallel dispatch, use /parallel-agents with the routing analysis.

Intent-Aware Routing

When /infer-intent provides an intent summary, use it to enhance routing:

Using Intent Summary

If intent summary is available:

# From /infer-intent
intent:
  primary: create
  secondary: [modify]
scope:
  level: cross-cutting
  domains: [frontend, backend]
complexity:
  score: 7
agents:
  primary: architect-agent
  supporting: [backend-agent, frontend-agent]
  parallel_possible: false
routing:
  recommended_flow: 2-gate

Map directly to dispatch plan:

### Agent Dispatch Plan

| Order | Agent | Model | Task |
|-------|-------|-------|------|
| 1 | architect-agent | opus | Design system architecture |
| 2 | backend-agent | opus | Implement server-side |
| 2 | frontend-agent | sonnet | Implement UI (parallel with backend if disjoint) |
| 3 | test-agent | sonnet | Verify complete flow |

Without Intent Summary

If no intent summary provided, run the full routing process (Steps 1-4 above).

Quick Reference

See .claude/agents/AGENT_INVENTORY.md for:

  • Complete agent profiles and capabilities
  • Model selection guide
  • Parallel agent patterns
  • Decision tree for agent selection
  • Cost optimization strategies
SkillPurposeWhen to Chain
/infer-intentUnderstand user requestBefore routing
/parallel-dispatchExecute parallel agentsAfter routing identifies parallelization
/doc-discoveryLoad feature contextFor complexity >= 7
/plan-lintValidate planBefore implementation

Score

Total Score

50/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon