- Add matcher: startup|resume|compact for SessionStart (per docs) - PreToolUse reads from stdin per documented hook input format - Remove arg, use stdin-based approach - Scripts read event JSON from stdin as documented - Plain text output, no special characters
32 lines
662 B
JSON
32 lines
662 B
JSON
{
|
|
"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
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|