Send Discord notifications when Claude Code finishes working
*Add to your .claude/settings.json:
{
"hooks": {
"Stop": [
{
"hooks": [
{
"type": "command",
"command": ".claude/hooks/discord-notifications.sh"
}
]
}
]
}
}This hook includes a script file. Download the ZIP bundle for complete installation with script and instructions.
Send Discord notifications when Claude Code finishes working
#!/bin/bash
if [[ -z "$DISCORD_WEBHOOK_URL" ]]; then
exit 0
fi
message="Claude Code has finished working on your request."
payload=$(jq -n --arg msg "$message" '{"content": $msg}')
curl -s -X POST "$DISCORD_WEBHOOK_URL" \
-H "Content-Type: application/json" \
-d "$payload" >/dev/null 2>&1
Stop hooks run when Claude Code finishes its response. They can perform cleanup or final actions.