Notification Hooks in Claude Code

Hooks run configured commands at defined events. Notifications can make a long authorized task easier to follow without constantly watching its terminal.
#Community template example
bashnpx claude-code-templates@latest --hook automation/simple-notifications
The source describes a community notification template using PostToolUse and desktop utilities. Review the template and the current hook schema; do not assume a template filename is automatically a recognized settings location.
#Event scope matters
A notification after a file operation means that event completed. It does not establish that the entire task or its tests succeeded. Match only the tools/events that need notifications rather than producing noise for every action.
#System utilities
The source uses macOS osascript and Linux notify-send. For a suitable Debian/Ubuntu desktop, the utility package is illustrated as:
bashsudo apt-get install libnotify-bin
Review system/package changes before installation.
#Test the desktop notification separately
bashwhich notify-send notify-send "Test" "This is a test notification"
If it fails, check the utility, desktop session and notification permissions. Then configure the verified command in the supported Claude Code hook settings. Treat text received from tools as data when constructing shell commands; do not interpolate untrusted output directly.