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 setSKILL_ROUTER_LEAF_ROOTS,SKILL_ROUTER_EXPOSED_ROOT, andSKILL_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.mdbodies only whenrouting-review.mdmarks them underNeeds 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 currentrouting-index.jsonfrom the configured routing root. - Reuse existing categories when their
use_whenandavoid_whenboundaries stay clear. - Create a new category only when existing categories would need mismatched special cases or vague avoidance rules.
- Write
routing-plan.jsonwith all categories and routes. - Run
node scripts/skill-router.mjs apply, thenscan, thenvalidate.
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