Skill Router
Route a request to a skill using explainable keyword scores, path rules, permission gates, and dependency ordering.
A routing debugger showing why the wrong skill activated and how to fix a rule.
- A routing debugger showing why the wrong skill activated and how to fix a rule.
- SKILL.md provides standard name and description; routing.json is this project's documented local extension.
Skill Router in 4 stages
Route a request to a skill using explainable keyword scores, path rules, permission gates, and dependency ordering.
Parse a typed skill catalog
A skill manifest declares an id, description, keywords, path patterns, priority, dependencies and permissions. Validate arrays and numbers at runtime rather than trusting a JSON cast. Tokenization normalizes punctuation and case and removes repeated words, so repeating a prompt cannot inflate its score.
starter · ~2 hours · TypeScript
parseSkilltokensScore words and repository paths
Award two points for each matched keyword and three for each matched file path. Return score reasons alongside the score. Support star within one path segment and double-star across segments, escape regular expression punctuation, and reject absolute or parent-traversing file paths. Resolve tied scores by priority and then id so ranking is reproducible.
core · ~2 hours · TypeScript
matchPathrankResolve dependencies before execution
Use depth-first traversal with separate active and visited sets. Active membership catches a cycle; visited membership avoids duplicate execution through a diamond. Validate permission requirements on dependencies as well as the selected skill. Emit dependencies before their consumers and reject unknown dependency ids instead of silently skipping work.
core · ~2 hours · TypeScript
planAbstain on ambiguous or blocked requests
Join ranking and dependency planning while preserving four distinct outcomes: ready, no-match, ambiguous and blocked. A score gap below the margin is ambiguous even if the tie-breaker produces a first result. A ranked winner can still be blocked by permissions. Return the ranked explanations in every outcome so a caller can display the decision.
core · ~2 hours · TypeScript
route