A first attempt of gathering awesome Claude Code hooks in one place, so we can all benefit. Please feel free to open an issue or a PR and add your own gusto.
Sound notification hooks for Claude Code that play audio alerts when Claude needs attention or completes tasks. Works on macOS, Windows, and Linux without external dependencies.
🎵 macOS Enhancement: Now uses built-in system sounds on macOS - no sound files needed!
Vision: This repository aims to become the central hub for awesome Claude Code hooks, featuring a curated collection of community-contributed hooks
and eventually a hook manager to easily discover, install, and manage hooks across projects.
.claude directory to your projecton-agent-need-attention.wavon-agent-complete.wavTo use these hooks in all your Claude Code projects:
# Install globally
./install-global.sh
# To uninstall
./uninstall-global.sh
The global installer will:
~/.claude/hooks/~/.claude/ (Windows/Linux only)~/.claude/settings.json with hook configurations (preserves existing permissions)~/.claude/logs/The hooks use native system commands for audio playback:
afplay with built-in system sounds
/System/Library/Sounds/Funk.aiff/System/Library/Sounds/Glass.aiffMedia.SoundPlayer (built-in) with custom WAV filesaplay, paplay, or play (usually pre-installed) with custom WAV filesHooks are written in TypeScript and executed directly using npx tsx - no build step required!
The .claude/settings.json configures three hooks:
Note: The installer only updates the
hooksconfiguration and preserves any existingpermissionsyou may have configured.
{
"hooks": {
"PreToolUse": [],
"PostToolUse": [],
"Notification": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "npx tsx .claude/hooks/notification.ts --notify"
}
]
}
],
"Stop": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "npx tsx .claude/hooks/stop.ts --chat"
}
]
}
],
"SubagentStop": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "npx tsx .claude/hooks/subagent_stop.ts"
}
]
}
]
}
}
--notify: Play sound for notification events--chat: Process and log chat transcriptsLogs are stored in the logs/ directory (or ~/.claude/logs/ for global installation):
notifications.json - All notification eventsstop.json - All stop eventssubagent_stop.json - All subagent stop eventschat.json - Chat transcripts (when using --chat flag)Test hooks locally:
# Test notification hook
npx tsx .claude/hooks/notification.ts --notify
# Test with sample input
echo '{"type":"Notification","data":{}}' | npx tsx .claude/hooks/notification.ts --notify
npx) - Required for running TypeScript hooks - must be available in your $PATHtsx - Installed automatically via npxon-agent-need-attention.wav and on-agent-complete.wavAll dependencies are already covered by the core requirements above - no additional dependencies needed for global installation.
macOS (using Homebrew):
brew install node
Ubuntu/Debian:
sudo apt-get update
sudo apt-get install nodejs npm
Windows (using Chocolatey):
choco install nodejs
Manual installation:
Make sure to have Claude installed globally.
Most Linux distributions include at least one of these audio players:
aplay (ALSA)paplay (PulseAudio)play (SoX)If none are available, install one:
# Debian/Ubuntu
sudo apt-get install alsa-utils # for aplay
# or
sudo apt-get install pulseaudio-utils # for paplay
# or
sudo apt-get install sox # for play
Uses built-in PowerShell, no additional software needed.
Uses built-in afplay with system sounds, no additional software or sound files needed.
Available system sounds in /System/Library/Sounds/:
Currently configured:
Funk.aiff (distinctive alert sound)Glass.aiff (pleasant completion chime)~/.claude/settings.jsonThis project was inspired by claude-code-hooks-mastery by @disler,
which provided excellent examples and patterns for Claude Code hooks implementation.
Sound effects are provided by Mixkit
under their free license:
on-agent-need-attention.wav - Notification sound for attention eventson-agent-complete.wav - Completion sound for task finished events