Skill router: which of 147 Claude Code skills fits the prompt
1. What Jev decides
Which skill the coding agent should load for a user prompt, or none. One choice question. Every folder under ~/.claude/skills with a description: line in its front matter is an option; the description, cut to 400 characters, is the rubric. Built as a UserPromptSubmit hook that prints "Use skill X" when the top probability is at least 0.5. The hook is not installed by this repo.
2. The questions
The settings, from the top of skill-router.mjs. This is the block a reviewer must read; the rest of the file is plumbing.
// ---- Review these. Everything else is plumbing. ----
const SKILLS_DIR = join(homedir(), ".claude", "skills");
const THRESHOLD = 0.5; // below this the hook prints nothing
const MAX_DESC = 400; // characters of each description sent as the rubric; keeps 147 skills near 12k tokens
const INSTRUCTIONS = "Which skill should the coding agent load to handle this user prompt? Pick none if no skill clearly applies.";
3. Run it
node --env-file=.env hooks/skill-router.mjs "wrap up my day"
echo '{"prompt":"wrap up my day"}' | node --env-file=.env hooks/skill-router.mjs --hook
node --env-file=.env hooks/skill-router.mjs --check
4. The check, verbatim
ok "wrap up my day" → end-of-day-wrapup (p 1, conf 1, 554 ms, 9920 tokens)
ok "what is eating my disk space?" → disk-hog-hunter (p 0.98, conf 0.98, 421 ms, 9923 tokens)
ok "morning brief" → morning-brief (p 1, conf 1, 408 ms, 9919 tokens)
ok "summarize this youtube video https://www.you" → yt-transcript-summary (p 0.62, conf 0.6, 2615 ms, 9935 tokens)
ok "write every reply in simplified technical en" → asd-ste100 (p 1, conf 1, 495 ms, 9923 tokens)
ok "blindspot pass on Kubernetes networking" → blind-spot-pass (p 1, conf 1, 6926 ms, 9923 tokens)
6/6 matched, 147 skills as options, $0.0025
The first run of the same check offered only 100 skills, at 7,287 tokens and 314 to 488 ms per prompt, and also matched 6/6.
5. Findings
- Six of six test prompts matched, at p 0.98 to 1 for five of them. The YouTube prompt matched at p 0.62 because two skills claim it:
yt-transcript-summaryanddaily-source-intake. That is a real ambiguity in the skill descriptions, not in Jev. - The first run saw 100 skills, not 147. Forty-eight of the skill folders are links, and
readdirwithwithFileTypesreports a link as not a directory. Astatper entry fixed it. One folder,synced, has no SKILL.md. - 147 options with 400-character rubrics is 9,920 input tokens and $0.0004 per prompt. Two hundred prompts a day would be $0.08.
- Latency per prompt ran 408 to 6,926 ms in the final check; the 6.9 s call fell in the gateway's slow half hour. Installed as a hook, this time is added to every prompt. That is the reason the hook is not installed: it is Simon's call.
- Not done: the assessment's proof check of 30 past prompts from real transcripts with the skill actually used. Six hand-written prompts stand in.
6. Cost and latency
$0.0004 per prompt with all 147 skills. The README shows the one settings.json line that would install it.
Every number above was measured from one machine on 2026-09-19 through the Vercel AI Gateway. The source videos show demos from machines close to the model; this page shows what the same idea costs from here.