Defined in hooks/hooks.json
{
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "echo 'Response completed' >> ~/.claude/activity.log"
}
],
"matcher": "*"
}
],
"PreToolUse": [
{
"hooks": [
{
"type": "command",
"command": "echo 'About to edit: $TOOL_INPUT_FILE_PATH'"
}
],
"matcher": "Edit"
}
],
"SessionEnd": [
{
"hooks": [
{
"type": "command",
"command": "echo 'Session ended at $(date)' >> ~/.claude/sessions.log"
}
],
"matcher": "*"
}
],
"PostToolUse": [
{
"hooks": [
{
"type": "command",
"command": "echo 'File edited: $TOOL_RESULT_FILE_PATH'"
}
],
"matcher": "Edit"
},
{
"hooks": [
{
"type": "command",
"command": "prettier --write \"$TOOL_RESULT_FILE_PATH\" || true"
}
],
"matcher": "Write"
}
],
"Notification": [
{
"hooks": [
{
"type": "command",
"command": "osascript -e 'display notification \"Claude Code needs attention\" with title \"Claude Code\"'"
}
],
"matcher": "*"
}
],
"SessionStart": [
{
"hooks": [
{
"type": "command",
"command": "echo 'Session started at $(date)' >> ~/.claude/sessions.log"
}
],
"matcher": "*"
}
],
"UserPromptSubmit": [
{
"hooks": [
{
"type": "command",
"command": "echo 'User submitted prompt at $(date)' >> ~/.claude/prompt_log.txt"
}
],
"matcher": "*"
}
]
}{
"riskFlags": {
"touchesBash": false,
"matchAllTools": false,
"touchesFileWrites": true
},
"typeStats": {
"command": 8
},
"eventStats": {
"Stop": 1,
"PreToolUse": 1,
"SessionEnd": 1,
"PostToolUse": 2,
"Notification": 1,
"SessionStart": 1,
"UserPromptSubmit": 1
},
"originCounts": {
"absolutePaths": 0,
"pluginScripts": 0,
"projectScripts": 0
},
"timeoutStats": {
"commandsWithoutTimeout": 8
}
}