claude-skills/engineering/agenthub/hooks/hooks.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

16 lines
667 B
JSON

{
"description": "Skill router. On UserPromptSubmit, skill_router.py matches the prompt against the high-precision patterns in skill_routes.json and, on a match, adds one line naming the skill that fits. Silent on no match, at most one hint per plugin per prompt, each skill hinted at most once per session, never blocks, fails open. Disable with SKILL_ROUTER=0 (every plugin) or SKILL_ROUTER_<PLUGIN>=0.",
"hooks": {
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "python3 \"${CLAUDE_PLUGIN_ROOT}/hooks/skill_router.py\"",
"timeout": 5
}
]
}
]
}
}