claude-skills/product-team/hooks/skill_routes.json
Claude 22e2116fe8
feat(hooks): skill hints for the 21 skills that never auto-load
Two description rewrites left 21 skills that the model never loads on its
own. Every one is already a slash command (/<plugin>:<skill>), so new
commands would only duplicate them; what was missing is automatic
invocation, which only a hook provides.

Eight plugins now ship a UserPromptSubmit hook, hooks/skill_router.py,
that matches the prompt against hand-written patterns in
hooks/skill_routes.json and adds one line naming the skill on a match.
Silent otherwise, one hint per plugin per prompt, once per session,
skips /commands, no model or network calls, fails open, ~30 ms.
SKILL_ROUTER=0 turns it off.

Measured live on held-out prompts (Claude Code 2.1.322, Sonnet): the
skills loaded in 24/84 runs with the hook vs 2/84 without, 0/21 near-miss
loads either way. Per-skill decisions in audit/silent-skill-triggers-2026-11/.

scripts/check_skill_router.py (new CI step) keeps the copies identical,
the plugin names right and the routes pointing at shipped skills; it caught
the si namespace on the first run. derive_counters counts the shared
router once. Plugin versions bumped (engineering-advanced-skills 2.14.18,
the other seven 2.14.11).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L8KYFL29bT12FJxEPDSBxi
2026-11-11 02:15:40 +00:00

50 lines
2.3 KiB
JSON

{
"plugin": "product-skills",
"note": "Patterns for hooks/skill_router.py. High precision first: a missed prompt costs nothing, a wrong hint costs attention.",
"routes": [
{
"skill": "experiment-designer",
"why": "A/B test planning, sample size and reading results",
"any": [
"\\ba/?b[- ]test\\w*\\b|\\bsplit[- ]test\\w*\\b",
"\\bsample size\\b",
"\\b(statistically significant|statistical significance|minimum detectable effect)\\b",
"\\bhow long (should|to|do) (we |i )?(run|keep) (the |this |our |my )?(test|experiment)\\b",
"\\b(did|has) (the|our|my) (test|experiment|variant) win\\b",
"\\b(detect|measure)\\b.{0,30}\\b(lift|uplift)\\b.{0,40}\\b(power|confidence|significan\\w*)\\b",
"\\b(users|visitors) per variant\\b",
"\\bwant to test (a|the|our) new\\b.{0,40}\\b(flow|page|feature|design|pricing|checkout|onboarding)\\b",
"\\b(result|lift|conversion)\\b.{0,40}\\b(actually |statistically )?significant\\b"
],
"not": [
"\\b(trial|clinical|drug|patients?|survey|tam|sam|som)\\b"
]
},
{
"skill": "product-manager-toolkit",
"why": "RICE prioritization, PRDs, interview synthesis",
"any": [
"\\brice\\b.{0,20}\\b(score\\w*|prioriti\\w*|framework)\\b",
"\\bprioriti[sz]\\w*\\b.{0,30}\\b(features?|backlog|feature requests?)\\b",
"\\bwhat (should|to) (we |i )?build next\\b",
"\\b(write|draft|create)\\b.{0,15}\\b(a |the )?prd\\b|\\bproduct requirements? doc\\w*\\b",
"\\b(synthesi[sz]e|sum(marize)? up|analy[sz]e)\\b.{0,30}\\b(customer |user )?interview (notes|transcripts?)\\b"
]
},
{
"skill": "roadmap-communicator",
"why": "roadmap narratives, release notes, stakeholder updates",
"any": [
"\\brelease notes?\\b",
"\\broadmap\\b.{0,40}\\b(update|narrative|presentation|deck|for (the )?(execs?|board|leadership|stakeholders|customers|engineers|sales))\\b",
"\\bstakeholder update\\b",
"\\b(explain|present|communicate)\\b.{0,30}\\broadmap\\b",
"\\bwhat we shipped\\b.{0,40}\\b(customers|users|stakeholders|team)\\b",
"\\broadmap\\b.{0,80}\\b(exec\\w*|all-hands|leadership|board)\\b"
],
"not": [
"\\b(git log|commits?|conventional commits?)\\b"
]
}
]
}