| name | skill-router |
| description | Use when organizing a large local skill library into category router skills, refreshing a compact skill inventory, or deciding which leaf skill bodies need to be read before agent classification. |
Skill Router
Use this skill to organize many local skills without loading every leaf skill
body into the model context. The script builds a compact inventory, marks
ambiguous or duplicate-description skills for body review, and lets the agent
author the final routing plan.
Check First
- Confirm the workspace has
skill-router.config.json, or set
SKILL_ROUTER_LEAF_ROOTS, SKILL_ROUTER_EXPOSED_ROOT, and
SKILL_ROUTER_ROUTING_ROOT.
- Keep hidden leaf skills separate from exposed category router skills.
- Treat BM25 and token-overlap similarity as read-priority hints only.
- Read leaf
SKILL.md bodies only when routing-review.md marks them under
Needs Body Review, the compact metadata is ambiguous, or a category boundary
would change.
Workflow
- Run
node scripts/skill-router.mjs scan.
- Read
routing-review.md, skill-inventory.json, and the current
routing-index.json from the configured routing root.
- Reuse existing categories when their
use_when and avoid_when boundaries
stay clear.
- Create a new category only when existing categories would need mismatched
special cases or vague avoidance rules.
- Write
routing-plan.json with all categories and routes.
- Run
node scripts/skill-router.mjs apply, then scan, then validate.
Stop When
- The same directory is both the hidden leaf root and exposed category root.
- A catch-all category such as misc, general, or other would be required.
- Classification would be based on keywords instead of workflow force and agent
behavior.
Report
Theory(category boundary -> leaf routing) / Changed / Verified / Risk