T

Task Completion Sound Hook

Plays a completion chime when Claude finishes a task, with optional transcript logging. Distinct from notification sounds -- this one signals 'done' so you know the task is complete without checking.

HookCommunityautomationv1.0.0MIT
0 views0 copies

Hook Type

PostToolUse -- Runs after Claude completes tool usage (configured to trigger on stop/completion events).

Description

Plays a distinct completion sound when Claude finishes a task, differentiating it from the notification sound that plays when input is needed. Optionally logs a timestamped transcript of the conversation for audit purposes.

Patterns/Rules

  • Plays a different sound than the notification hook so you can distinguish "done" from "needs input"
  • Optional transcript logging captures the full interaction for review
  • Sound plays asynchronously to avoid blocking
  • Log files are timestamped and stored in a configurable directory

Configuration

Add to .claude/settings.json:

Basic (Sound Only)

{ "hooks": { "Stop": [ { "matcher": "", "hooks": [ { "type": "command", "command": "afplay /System/Library/Sounds/Purr.aiff &" } ] } ] } }

Advanced (Sound + Transcript Logging)

{ "hooks": { "Stop": [ { "matcher": "", "hooks": [ { "type": "command", "command": ".claude/hooks/completion.sh" } ] } ] } }

Action

Completion script (.claude/hooks/completion.sh):

#!/bin/bash # Play completion sound and optionally log transcript LOG_DIR="$HOME/.claude/logs" mkdir -p "$LOG_DIR" # Play a distinctive completion sound (different from notification) if [[ "$OSTYPE" == "darwin"* ]]; then afplay /System/Library/Sounds/Purr.aiff & elif command -v paplay &>/dev/null; then paplay /usr/share/sounds/freedesktop/stereo/complete.oga & fi # Log completion timestamp TIMESTAMP=$(date '+%Y-%m-%d %H:%M:%S') PROJECT=$(basename "$PWD") echo "[$TIMESTAMP] Task completed in $PROJECT" >> "$LOG_DIR/completions.log"
EventmacOS SoundPurpose
Needs inputGlass.aiff"Hey, look at me"
Task donePurr.aiff"All finished"
ErrorSosumi.aiff"Something went wrong"
Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates