Skill router: which of 147 Claude Code skills fits the prompt

Date: 2026-09-19  ·  Code: hooks/skill-router.mjs  ·  Model: typesafe-ai/jev through the Vercel AI Gateway

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

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.