fix(hooks): configure via settings.local.json not plugin hooks.json
Skills-dir plugins (~/.claude/skills/) may not execute hooks from hooks/hooks.json. Per documentation, hooks need to be in settings files. - install.sh: add hook registration in ~/.claude/settings.local.json - Hooks use absolute paths to hub-guide scripts - SessionStart matcher: startup|resume|compact - PreToolUse matcher: Write|Edit - Remove hooks/hooks.json from plugin (redundant for skills-dir)
This commit is contained in:
@@ -1,31 +0,0 @@
|
||||
{
|
||||
"hooks": {
|
||||
"SessionStart": [
|
||||
{
|
||||
"matcher": "startup|resume|compact",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "\"${CLAUDE_PLUGIN_ROOT}/hooks/scripts/detect-project.sh\"",
|
||||
"shell": "bash",
|
||||
"timeout": 10,
|
||||
"async": false
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"PreToolUse": [
|
||||
{
|
||||
"matcher": "Write|Edit",
|
||||
"hooks": [
|
||||
{
|
||||
"type": "command",
|
||||
"command": "\"${CLAUDE_PLUGIN_ROOT}/hooks/scripts/detect-file-type.sh\"",
|
||||
"shell": "bash",
|
||||
"timeout": 10
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user