Defined in hooks/hooks.json
{
"PreCompact": [
{
"hooks": [
{
"type": "prompt",
"prompt": "Before compacting, preserve key shell plugin context: current script path being refactored and any pending style fixes. Include these in the compaction summary.",
"timeout": 10
}
],
"matcher": "*"
}
],
"PreToolUse": [
{
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/shell-validate.sh",
"timeout": 10
}
],
"matcher": "Write|Edit"
}
]
}{
"riskFlags": {
"touchesBash": false,
"matchAllTools": false,
"touchesFileWrites": true
},
"typeStats": {
"prompt": 1,
"command": 1
},
"eventStats": {
"PreCompact": 1,
"PreToolUse": 1
},
"originCounts": {
"absolutePaths": 0,
"pluginScripts": 1,
"projectScripts": 0
},
"timeoutStats": {
"commandsWithoutTimeout": 0
}
}