Defined in hooks/hooks.json
{
"PreToolUse": [
{
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/validate-format.sh",
"timeout": 3000,
"description": "Checks if file is already formatted to avoid unnecessary changes",
"continueOnError": true
}
],
"enabled": false,
"matcher": "Edit",
"priority": 50,
"description": "Optional: Validate file format before editing (disabled by default)"
}
],
"PostToolUse": [
{
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/scripts/format.sh",
"timeout": 5000,
"description": "Runs Prettier formatter on supported file types (JS, TS, JSON, CSS, MD)",
"environment": {
"NODE_ENV": "production",
"PRETTIER_CONFIG": "${CLAUDE_PLUGIN_ROOT}/config/.prettierrc"
},
"continueOnError": true
}
],
"enabled": true,
"matcher": "Write|Edit",
"priority": 100,
"description": "Auto-format code files after Write or Edit operations"
}
]
}{
"riskFlags": {
"touchesBash": false,
"matchAllTools": false,
"touchesFileWrites": true
},
"typeStats": {
"command": 2
},
"eventStats": {
"PreToolUse": 1,
"PostToolUse": 1
},
"originCounts": {
"absolutePaths": 0,
"pluginScripts": 2,
"projectScripts": 0
},
"timeoutStats": {
"commandsWithoutTimeout": 0
}
}