{ "hooks": { "PostToolUse": [ { "matcher": "Edit|Write", "hooks": [ { "type": "command", "command": "f=$(jq -r '.tool_input.file_path // empty'); case \"$f\" in *.py) python3 -m py_compile \"$f\" || exit 2;; esac" } ] } ], "Stop": [ { "hooks": [ { "type": "command", "command": "cd \"$CLAUDE_PROJECT_DIR\" && python3 -m py_compile adif_auth.py adif_client.py query_api.py 1>&2 || exit 2" } ] } ] } }