Event Hooks
Community

notification

3 events · 3 hooks

Install
1
Install the plugin
$
npx claudepluginhub udecode/dotai --plugin notification

Want just this hook?

Then install: npx claudepluginhub u/[userId]/[slug]

Source

Defined in hooks/hooks.json

Configuration
{
  "Stop": [
    {
      "hooks": [
        {
          "type": "command",
          "command": "DATA=$(cat); TRANSCRIPT=$(echo \"$DATA\" | jq -r '.transcript_path'); TITLE=$(grep -m1 '\"type\":\"summary\"' \"$TRANSCRIPT\" 2>/dev/null | jq -r '.summary' 2>/dev/null || echo \"Claude Code\"); terminal-notifier -message \"Claude finished responding\" -title \"$TITLE\" -sound Ping"
        }
      ],
      "matcher": ""
    }
  ],
  "PreCompact": [
    {
      "hooks": [
        {
          "type": "command",
          "command": "DATA=$(cat); TRANSCRIPT=$(echo \"$DATA\" | jq -r '.transcript_path'); TITLE=$(grep -m1 '\"type\":\"summary\"' \"$TRANSCRIPT\" 2>/dev/null | jq -r '.summary' 2>/dev/null || echo \"Claude Code\"); terminal-notifier -message \"Compacting conversation...\" -title \"$TITLE\" -sound Bottle"
        }
      ],
      "matcher": ""
    }
  ],
  "Notification": [
    {
      "hooks": [
        {
          "type": "command",
          "command": "DATA=$(cat); TRANSCRIPT=$(echo \"$DATA\" | jq -r '.transcript_path'); TITLE=$(grep -m1 '\"type\":\"summary\"' \"$TRANSCRIPT\" 2>/dev/null | jq -r '.summary' 2>/dev/null || echo \"Claude Code\"); MSG=$(echo \"$DATA\" | jq -r '.message'); terminal-notifier -message \"$MSG\" -title \"$TITLE\" -sound Ping"
        }
      ],
      "matcher": ""
    }
  ]
}
Summary
{
  "riskFlags": {
    "touchesBash": false,
    "matchAllTools": false,
    "touchesFileWrites": false
  },
  "typeStats": {
    "command": 3
  },
  "eventStats": {
    "Stop": 1,
    "PreCompact": 1,
    "Notification": 1
  },
  "originCounts": {
    "absolutePaths": 0,
    "pluginScripts": 0,
    "projectScripts": 0
  },
  "timeoutStats": {
    "commandsWithoutTimeout": 3
  }
}
Stats
Stars1138
Forks83
Last CommitOct 11, 2025

Similar Hooks