Files
davila7__claude-code-templates/cli-tool/components/hooks/automation/simple-notifications.json
Kilian Canizares Mata 7d83fa8647 fix(hooks): narrow simple-notifications to Stop and Notification events
The PostToolUse hook with a wildcard matcher fires on every single tool
call, flooding the user with dozens of notifications per turn. Replace
with Stop (fires once when Claude finishes) and Notification (fires
when Claude needs user input), matching the pattern already used by
discord-notifications and slack-notifications hooks.
2026-04-13 10:59:52 +02:00

25 lines
987 B
JSON

{
"description": "Send desktop notifications when Claude Code finishes working or needs user input. Works on macOS and Linux systems.",
"hooks": {
"Stop": [
{
"hooks": [
{
"type": "command",
"command": "if command -v osascript >/dev/null 2>&1; then osascript -e 'display notification \"Claude has finished working\" with title \"Claude Code\"'; elif command -v notify-send >/dev/null 2>&1; then notify-send 'Claude Code' \"Claude has finished working\"; fi"
}
]
}
],
"Notification": [
{
"hooks": [
{
"type": "command",
"command": "if command -v osascript >/dev/null 2>&1; then osascript -e 'display notification \"Claude needs your input\" with title \"Claude Code\" sound name \"Ping\"'; elif command -v notify-send >/dev/null 2>&1; then notify-send -u critical 'Claude Code' \"Claude needs your input\"; fi"
}
]
}
]
}
}