Defined in hooks/hooks.json
{
"PreToolUse": [
{
"hooks": [
{
"type": "command",
"command": "bash -c 'PLUGIN_PATH=\"${CLAUDE_PLUGIN_ROOT//\\\\//}\"; if [[ -n \"${PLUGIN_PATH}\" ]]; then bash \"${PLUGIN_PATH}/hooks/scripts/analyze-before-write.sh\"; else echo \"{\\\"decision\\\": \\\"approve\\\"}\"; fi'"
}
],
"matcher": "Write|Edit"
}
],
"SessionEnd": [
{
"hooks": [
{
"type": "command",
"command": "bash -c 'PLUGIN_PATH=\"${CLAUDE_PLUGIN_ROOT//\\\\//}\"; if [[ -n \"${PLUGIN_PATH}\" ]]; then bash \"${PLUGIN_PATH}/hooks/scripts/analyze-conversation.sh\"; else echo \"{\\\"decision\\\": \\\"approve\\\", \\\"suppressOutput\\\": true}\"; fi'"
}
]
}
],
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "bash -c 'PLUGIN_PATH=\"${CLAUDE_PLUGIN_ROOT//\\\\//}\"; if [[ -n \"${PLUGIN_PATH}\" ]]; then bash \"${PLUGIN_PATH}/hooks/scripts/load-learnings.sh\"; else echo \"{\\\"decision\\\": \\\"approve\\\", \\\"suppressOutput\\\": true}\"; fi'"
}
]
}
]
}{
"riskFlags": {
"touchesBash": false,
"matchAllTools": false,
"touchesFileWrites": true
},
"typeStats": {
"command": 3
},
"eventStats": {
"PreToolUse": 1,
"SessionEnd": 1,
"SessionStart": 1
},
"originCounts": {
"absolutePaths": 0,
"pluginScripts": 0,
"projectScripts": 0
},
"timeoutStats": {
"commandsWithoutTimeout": 3
}
}