skills/task-router/SKILL.md
Decision matrix for choosing optimal approach to any task. Helps Claude decide when to delegate to sub-agents vs. working directly. Use when starting a new task or unsure of best approach.
npx skillsauth add arpitnath/claude-capsule-kit task-routerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill provides clear decision rules for choosing the optimal approach to any task.
Problem: Claude has many tools (sub-agents, direct work, parallel calls) but no clear guidance on when to use each. Solution: Decision matrix with clear rules and examples.
Activate this skill when:
agent-developer Sub-AgentTrigger Conditions:
Examples:
Why Delegate:
How to Invoke:
Task tool with:
- subagent_type: "agent-developer"
- prompt: "Create [specific agent/handler] with [requirements]"
Explore Sub-AgentTrigger Conditions:
Examples:
Why Delegate:
How to Invoke:
Task tool with:
- subagent_type: "Explore"
- prompt: "Find [what you're looking for]"
- Specify thoroughness: "quick", "medium", "very thorough"
labs-specialist Sub-AgentTrigger Conditions:
Examples:
Why Delegate:
How to Invoke:
Task tool with:
- subagent_type: "labs-specialist"
- prompt: "Explain/fix/implement [Labs-specific task]"
database-navigator Sub-AgentTrigger Conditions:
Examples:
Why Delegate:
How to Invoke:
Task tool with:
- subagent_type: "database-navigator"
- prompt: "Analyze [database/schema/migration topic]"
architecture-explorer Sub-AgentTrigger Conditions:
Examples:
Why Delegate:
How to Invoke:
Task tool with:
- subagent_type: "architecture-explorer"
- prompt: "Explain [system/integration/flow]"
When to Work Directly:
Examples:
Why Direct:
How to Execute:
Use When:
Example:
Single message with:
- Read tool (file1.ts)
- Read tool (file2.ts)
- Read tool (file3.ts)
All in one response block
Why: 3x faster than sequential reads
Use When:
Example: "Plan the implementation of playbook management APIs"
Always Check When:
Location: docs/exploration/CURRENT_SESSION.md
Why: Avoid repeating work, maintain continuity
START: New Task Received
↓
Is it continuation work?
YES → Read exploration journal first
NO → Continue
↓
Is it simple (<30 min, <5 files, known location)?
YES → Work directly
NO → Continue
↓
Is it development (agent/handler/skill)?
YES → Use agent-developer
NO → Continue
↓
Is it exploration (find/understand/locate)?
YES → Use Explore sub-agent
NO → Continue
↓
Is it Labs-specific?
YES → Use labs-specialist
NO → Continue
↓
Is it database/schema?
YES → Use database-navigator
NO → Continue
↓
Is it architecture/integration?
YES → Use architecture-explorer
NO → Continue
↓
DEFAULT → Work directly with TodoWrite tracking
After choosing approach, verify:
Task: "Create experiment tracking job handler"
❌ Bad: Work directly
✅ Good: Use agent-developer sub-agent
Task: "Where is SSE streaming implemented?"
❌ Bad: Manual Grep + Read chain
✅ Good: Use Explore sub-agent
Task: "Update port in .env.example"
❌ Bad: Use agent-developer sub-agent
✅ Good: Work directly
Task: "Check these 5 files for X pattern"
❌ Bad: Sequential reads (5 separate messages)
✅ Good: Parallel tool calls (single message, 5 Read tools)
This skill complements the hooks system:
User can invoke this skill manually: "What's the best way to [task]?"
✅ Correct sub-agent chosen for specialized tasks ✅ Direct work used for simple operations ✅ Parallel calls used for independent operations ✅ Exploration journal checked on continuation ✅ No obvious inefficiencies in approach
Remember: The goal is OPTIMAL approach, not just ANY approach. Use sub-agents when they provide value, work directly when they don't!
testing
Systematic task orchestration for complex multi-step tasks. Triggers automatically when detecting: complex task, multi-step work, coordinate, orchestrate, break down. Guides through Understand → Strategy → Plan → Execute → Verify phases for comprehensive systematic approach.
development
Build deep codebase understanding using Capsule context, progressive-reader, and specialist agents instead of overwhelming main context. Triggers on: don't have context, understand codebase, learn about, need background. Implements progressive context building.
development
Systematic debugging using error-detective and debugger agents instead of manual investigation. Triggers automatically on: error, bug, broken, failing, exception, stack trace, test failure. Orchestrates RCA-first approach with parallel agent investigation.
data-ai
Orchestrate multi-agent teams for parallel multi-branch work. Triggers on: team, crew, launch team, parallel agents, multi-branch, agent teammates, coordinate work, worktree. Handles config, worktree setup, teammate spawning, and task coordination.