Skip to content

Instantly share code, notes, and snippets.

@zbeyens
Created July 17, 2025 18:39
Show Gist options
  • Save zbeyens/9e1f41288c8670663b27019863a19334 to your computer and use it in GitHub Desktop.
Save zbeyens/9e1f41288c8670663b27019863a19334 to your computer and use it in GitHub Desktop.
Claude Code Notifications
{
"permissions": {
"allow": ["Bash", "Edit", "mcp__task_master_ai__*"]
},
"enableAllProjectMcpServers": true,
"hooks": {
"Notification": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "DATA=$(cat); TRANSCRIPT=$(echo \"$DATA\" | jq -r '.transcript_path'); TITLE=$(grep -m1 '\"type\":\"summary\"' \"$TRANSCRIPT\" 2>/dev/null | jq -r '.summary' 2>/dev/null || echo \"Claude Code\"); MSG=$(echo \"$DATA\" | jq -r '.message'); terminal-notifier -message \"$MSG\" -title \"$TITLE\" -sound Ping"
}
]
}
],
"Stop": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "DATA=$(cat); TRANSCRIPT=$(echo \"$DATA\" | jq -r '.transcript_path'); TITLE=$(grep -m1 '\"type\":\"summary\"' \"$TRANSCRIPT\" 2>/dev/null | jq -r '.summary' 2>/dev/null || echo \"Claude Code\"); terminal-notifier -message \"Claude finished responding\" -title \"$TITLE\" -sound Ping"
}
]
}
],
"PreCompact": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "DATA=$(cat); TRANSCRIPT=$(echo \"$DATA\" | jq -r '.transcript_path'); TITLE=$(grep -m1 '\"type\":\"summary\"' \"$TRANSCRIPT\" 2>/dev/null | jq -r '.summary' 2>/dev/null || echo \"Claude Code\"); terminal-notifier -message \"Compacting conversation...\" -title \"$TITLE\" -sound Bottle"
}
]
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment