{ "hooks": { "PostToolUse": [ { "matcher": "Edit|Write", "hooks": [ { "type": "command", "command": "file=$(jq -r '.tool_input.file_path // empty'); if [ -n \"$file\" ] && [ \"${file##*.}\" = \"ts\" ]; then cd \"$CLAUDE_PROJECT_DIR\" && npx tsc --noEmit -p tsconfig.json; fi" } ] } ], "Stop": [ { "hooks": [ { "type": "command", "command": "cd \"$CLAUDE_PROJECT_DIR\" && npm run build && PUBLIC_MEDIA_SIGNING_SECRET=12345678901234567890123456789012 npm test" } ] } ] } }