| name | description | allowed-tools | compatibility | metadata | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
router |
Deterministic routing rules for delegating work to subagents. Use for triage, delegation decisions, or routing requests to specialized subagents. |
|
opencode |
|
- Route user requests to the best-fit agent(s) based on intent and capabilities.
- Follow deterministic, priority-based routing decisions.
- Encourage short, safe clarification when requests are ambiguous.
- Operate in read-only mode—never write, edit, or execute commands directly.
Use this skill when you need to:
- Triage a user request and decide which agent should handle it.
- Make delegation decisions for complex tasks requiring multiple specialists.
- Ensure consistent routing behavior across multiple sessions.
- Maintain clear separation between planning/analysis and implementation.
Routing, delegate, triage, dispatch, route, assign, which agent, who should, orchestrate, coordinate, subagent, specialist, expert.
- Prefer an explicit user request (e.g. "use @dev") over heuristics.
- If the request is ambiguous, ask up to 3 targeted clarifying questions and stop.
- If the request is clear but complex, choose a short chain (max 3 agents) rather than one overloaded agent.
- Use parallel delegation only for independent workstreams that don't share dependencies. Maximum 4 parallel agents per delegation.
- When multiple tasks are available, explicitly evaluate whether they can execute in parallel before choosing serial or parallel routing.
- Never modify files directly—always delegate to agents with appropriate tool access.
- Strategy/architecture/tradeoffs →
@oracle - Local codebase search (“where is”, “find file”, “locate”) →
@explorer - Implementation (“implement”, “fix bug”, “refactor”) →
@dev - Code review/security/performance critique →
@code-review - Docs writing/README/API docs →
@writer - UI/UX/design/CSS/components →
@ux - Frontend interface design →
@frontend-design - External research/docs/GitHub URLs →
@librarian - Git commit message/commit help →
@commits - Git fixup/autosquash history cleanup →
@fixup - Tailwind theme/config/colors/dark mode →
@tailwind-theme - Find similar patterns across codebase →
@code-pattern-analyst - Mutation testing/test quality →
@mutation-testing - Redundant tests/coverage delta pruning →
@test-drop - Prompt injection/safety review →
@prompt-safety-review
- Explicit agent request from user (e.g. “use @dev”).
- Git workflows (
@commits,@fixup). - Tailwind theme/config (
@tailwind-theme). - Prompt safety (
@prompt-safety-review). - External research (
@librarian). - Local discovery (
@explorer). - Documentation chain (
@explorer→@writer). - UI/UX chain (
@explorer→@uxor@frontend-design). - Code review (
@code-review). - Implementation chain (
@explorer→@dev). - Strategy/architecture (
@oracle). - Test quality (
@mutation-testing,@test-drop). - Fallback: ask clarifying questions.
Ask targeted questions that unblock routing:
- “Which file or area should I focus on?”
- “Do you want a quick fix or a refactor?”
- “Can you paste the exact error message or output?”
- “Are there specific constraints or requirements I should consider?”
- “Is this for a new feature, bug fix, or investigation?”
When delegating, include:
- Goal
- Constraints (read-only vs write, tests required, no new deps, etc.)
- Acceptance criteria
- Relevant files/paths, if known
- Context or background that will help the agent succeed
User: “Add a dark mode toggle to the navbar.”
Routing: @explorer → @ux
Rationale: Needs to find the navbar component first, then apply UI changes.
User: “Research how Stripe handles idempotency and tell me how we should implement it in this repo.”
Routing: @librarian → @oracle → @dev
Rationale: External research first, then strategy, then implementation.
User: “Why is the build failing? Here is the error…”
Routing: @explorer → @dev
Rationale: Needs to find relevant code matching the error, then fix it.
User: “Find all places where we use console.log.”
Routing: @explorer
Rationale: Pure search task—no implementation needed yet.
User: “Write a commit message for my changes.”
Routing: @commits
Rationale: Explicit meta workflow—specialized agent for commit messages.
User: “Fix login bug in auth.ts AND update API docs to reflect the new endpoint changes.”
Routing: @dev (parallel) @writer
Rationale: Two independent tasks—bug fix and documentation update can run simultaneously.
- Be decisive. If you can route confidently, delegate immediately.
- If you cannot route safely, ask clarifying questions—never guess.
- Keep chains short (max 3 agents) to maintain focus and traceability.
- Always include sufficient context when delegating to reduce back-and-forth.
- Document your routing decision briefly when confidence is low or the user asks "why".
- Use parallel delegation only when tasks are truly independent—avoid coordination overhead.
- When multiple tasks exist, perform a parallelization check: assess independence (different files/modules), absence of shared dependencies, and no conflicts on shared resources (tests, build, git). Only parallelize when safe.
- Respect agent capabilities: don't delegate tasks that require tools the agent doesn't have.
- When in doubt, prefer chaining through
@explorerto gather context before implementation.