Route
Route a task to the most fitting skill or agent. Meta-router above dispatch. Parses the user intent, checks the installed-skill inventory, and picks the best match (single skill or chain). If fuzzy, runs recall first.
Purpose
Eliminate ambiguity when a task could fit multiple skills or agents. Route makes the decision, either immediately (high confidence) or after a quick context-pack query (low confidence).
When to use
- "I need to refactor the auth module but I'm not sure what approach"
- "Is this a testing problem or a design problem?"
- "Which skill handles this better: security-audit or code-review?"
Decision Protocol
- Parse intent — Extract primary verb (implement, fix, refactor, test, deploy, document, review) and object (code, config, feature, test, docs, infra).
- Check skill inventory — Query
~/.claude/skills/ dirs + /kit/core/skills/ for matching trigger keywords.
- Score matches — Confidence based on trigger word overlap + description relevance.
- High confidence (≥0.85) — Fire the skill immediately, no additional input.
- Medium confidence (0.65–0.84) — Run
recall to pull context, then decide.
- Low confidence (<0.65) — Ask user for clarification or suggest top 3 candidates.
Output
- Single skill → "Routing to
/security-audit. Running now." + auto-invoke
- Chain → "This needs 2 steps: 1)
code-review, then 2) simplify" + invoke in order, await completion
- Ambiguous → "Could be
test-driven-development or architecture-patterns. Which fits?"
Example Invocations
User: "Route: I'm rewriting a REST API to GraphQL"
Route: Queries skill inventory, finds `api-design-principles`, scores 0.89
Output: "Routing to `api-design-principles`. Invoking now."
User: "Route: Weird test timeout, maybe a race condition or a real bug?"
Route: Scores `systematic-debugging` 0.78, `test-driven-development` 0.72
Output: Runs recall("test timeout race condition"), gets pattern context
Output: "Likely a race in beforeEach/afterEach. Routing to `systematic-debugging`."
User: "Route: Need to set up GitHub Actions for monorepo CI"
Route: Finds `ci-watch` (0.82), `turborepo` (0.75), `deploment-automation` (0.71)
Output: "Multiple fits. Suggest: 1) `turborepo` (monorepo structure), 2) `ci-watch` (CI flow), or a chain. Which?"
References
- Skill inventory:
~/.claude/skills/ (local) + kit/core/skills/ (toolkit)
- Auto-invoke rules:
~/.claude/standards/skill-auto-invoke.md
- Dispatch skill:
dispatch (lower-level routing)
- Context retrieval:
recall (pulls RAG index)
1---2name: route-23description: Route a task to the most fitting skill or agent. Parses user intent, checks installed-skill inventory, and picks the best match (single skill or chain).4---56# Route78Route a task to the most fitting skill or agent. Meta-router above `dispatch`. Parses the user intent, checks the installed-skill inventory, and picks the best match (single skill or chain). If fuzzy, runs `recall` first.910## Purpose1112Eliminate ambiguity when a task could fit multiple skills or agents. Route makes the decision, either immediately (high confidence) or after a quick context-pack query (low confidence).1314## When to use1516- "I need to refactor the auth module but I'm not sure what approach"17- "Is this a testing problem or a design problem?"18- "Which skill handles this better: security-audit or code-review?"1920## Decision Protocol21221. **Parse intent** — Extract primary verb (implement, fix, refactor, test, deploy, document, review) and object (code, config, feature, test, docs, infra).232. **Check skill inventory** — Query `~/.claude/skills/` dirs + `/kit/core/skills/` for matching trigger keywords.243. **Score matches** — Confidence based on trigger word overlap + description relevance.254. **High confidence (≥0.85)** — Fire the skill immediately, no additional input.265. **Medium confidence (0.65–0.84)** — Run `recall` to pull context, then decide.276. **Low confidence (<0.65)** — Ask user for clarification or suggest top 3 candidates.2829## Output3031- **Single skill** → "Routing to `/security-audit`. Running now." + auto-invoke32- **Chain** → "This needs 2 steps: 1) `code-review`, then 2) `simplify`" + invoke in order, await completion33- **Ambiguous** → "Could be `test-driven-development` or `architecture-patterns`. Which fits?"3435## Example Invocations3637```38User: "Route: I'm rewriting a REST API to GraphQL"39Route: Queries skill inventory, finds `api-design-principles`, scores 0.8940Output: "Routing to `api-design-principles`. Invoking now."4142User: "Route: Weird test timeout, maybe a race condition or a real bug?"43Route: Scores `systematic-debugging` 0.78, `test-driven-development` 0.7244Output: Runs recall("test timeout race condition"), gets pattern context45Output: "Likely a race in beforeEach/afterEach. Routing to `systematic-debugging`."4647User: "Route: Need to set up GitHub Actions for monorepo CI"48Route: Finds `ci-watch` (0.82), `turborepo` (0.75), `deploment-automation` (0.71)49Output: "Multiple fits. Suggest: 1) `turborepo` (monorepo structure), 2) `ci-watch` (CI flow), or a chain. Which?"50```5152## References5354- Skill inventory: `~/.claude/skills/` (local) + `kit/core/skills/` (toolkit)55- Auto-invoke rules: `~/.claude/standards/skill-auto-invoke.md`56- Dispatch skill: `dispatch` (lower-level routing)57- Context retrieval: `recall` (pulls RAG index)