{ "hooks": { "PostToolUse": [ { "matcher": "Write|Edit", "hooks": [ { "type": "command", "command": "f=$(command -v jq >/dev/null 2>&1 && jq -r '.tool_input.file_path // empty' || echo \"\"); case \"$f\" in *.py) python3 -m py_compile \"$f\" ;; */ba_dailies.sh|ba_dailies.sh) bash -n \"$f\" ;; *) : ;; esac", "statusMessage": "Syntax-checking edited file..." } ] } ], "PreToolUse": [ { "matcher": "Write|Edit", "hooks": [ { "type": "command", "command": "f=$(command -v jq >/dev/null 2>&1 && jq -r '.tool_input.file_path // empty' || echo \"\"); case \"$f\" in /tmp/*|/private/tmp/*) echo \"Blocked: use this repo's scratchpad/ directory instead of /tmp or /private/tmp (see CLAUDE.md's scratchpad policy).\" >&2; exit 2 ;; esac" } ] } ] } }