Defined in hooks/hooks.json
{
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "node ${CLAUDE_PLUGIN_ROOT}/scripts/finalize-session.js",
"timeout": 5000,
"description": "Writes accumulated complexity issues to log file in session format",
"continueOnError": true
}
],
"enabled": true,
"priority": 80,
"description": "Finalize complexity session and write to log"
}
],
"PostToolUse": [
{
"hooks": [
{
"type": "command",
"command": "node ${CLAUDE_PLUGIN_ROOT}/scripts/check-complexity.js",
"timeout": 10000,
"description": "Analyzes cyclomatic complexity, function length, file length, and nesting depth",
"suppressOutput": true,
"continueOnError": true
}
],
"enabled": true,
"matcher": "Write|Edit",
"priority": 100,
"description": "Check code complexity after Write or Edit operations"
}
],
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "node ${CLAUDE_PLUGIN_ROOT}/scripts/init-config.js",
"timeout": 5000,
"description": "Creates default configuration file if it doesn't exist",
"suppressOutput": true,
"continueOnError": true
}
],
"enabled": true,
"priority": 100,
"description": "Initialize plugin configuration at session start"
}
]
}{
"riskFlags": {
"touchesBash": false,
"matchAllTools": false,
"touchesFileWrites": true
},
"typeStats": {
"command": 3
},
"eventStats": {
"Stop": 1,
"PostToolUse": 1,
"SessionStart": 1
},
"originCounts": {
"absolutePaths": 0,
"pluginScripts": 3,
"projectScripts": 0
},
"timeoutStats": {
"commandsWithoutTimeout": 0
}
}