task-routing
Task Routing maps complex task patterns to specialized agents for optimal delegation via the Task tool. Consult this routing table before delegating work involving research, code implementation, codebase investigation, debugging, architecture design, or agent quality review to ensure the request reaches the appropriate agent rather than being handled inline.
git clone --depth 1 https://github.com/MadAppGang/claude-code /tmp/task-routing && cp -r /tmp/task-routing/plugins/dev/skills/task-routing ~/.claude/skills/task-routingSKILL.md
# Task Routing - Agent Delegation IMPORTANT: For complex tasks, prefer delegating to specialized agents via the Task tool rather than handling inline. Delegated agents run in dedicated context windows with sustained focus, producing higher quality results. ## Routing Table | Task Pattern | Delegate To | Trigger | |---|---|---| | Research: web search, tech comparison, multi-source reports | `dev:researcher` | 3+ sources or comparison needed | | Implementation: creating code, new modules, features, building with tests | `dev:developer` | Writing new code, adding features, creating modules - even if they relate to existing codebase | | Investigation: READ-ONLY codebase analysis, tracing, understanding | `code-analysis:detective` | Only when task is to UNDERSTAND code, not to WRITE new code | | Debugging: error analysis, root cause investigation | `dev:debugger` | Non-obvious bugs or multi-file root cause | | Architecture: system design, trade-off analysis | `dev:architect` | New systems or major refactors | | Agent/plugin quality review | `agentdev:reviewer` | Agent description or plugin assessment | ## Key Distinction If the task asks to IMPLEMENT/CREATE/BUILD → `dev:developer`. If the task asks to UNDERSTAND/ANALYZE/TRACE → `code-analysis:detective`. ## When to Use This Skill Consult this routing table BEFORE making any delegation decision. If the user's task matches any row in the table above, delegate to the specified agent rather than handling the task inline.
Architecture Decision Records (ADR) documentation practice. Use when documenting architectural decisions, recording technical trade-offs, creating decision logs, or establishing architectural patterns. Trigger keywords - "ADR", "architecture decision", "decision record", "trade-offs", "architectural decision", "decision log".
Use when deciding whether to launch an agent, selecting which agent to use, or coordinating multiple agents. Covers delegation criteria, external-model patterns, task isolation, and agent selection strategies.
Use when designing REST or GraphQL APIs, defining endpoints, implementing pagination/filtering, handling API versioning, or establishing API documentation with OpenAPI/Swagger.
Use when integrating Apidog + OpenAPI specifications with your React app. Covers MCP server setup, type generation, and query layer integration. Use when setting up API clients, generating types from OpenAPI, or integrating with Apidog MCP.
Analyzes API documentation from OpenAPI specs to provide TypeScript interfaces, request/response formats, and implementation guidance. Use when implementing API integrations, debugging API errors (400, 401, 404), replacing mock APIs, verifying data types, or when user mentions endpoints, API calls, or backend integration.
Use when analyzing architecture and system design. Find design patterns, map layers, identify core abstractions via PageRank. Uses claudemem AST structural analysis for efficient architecture investigation.
On-demand security and code quality audit. Use when checking for vulnerabilities, security issues, code smells, or compliance problems. Trigger keywords - "audit", "security check", "vulnerability scan", "code quality", "compliance", "security audit".
Use when implementing authentication (JWT, sessions, OAuth), authorization (RBAC, ABAC), password hashing, MFA, or security best practices for backend services.