Claude Code /hooks で実行終了時に音を鳴らす

環境

  • macOS
  • Claude Code 1.0.40

参照リンク

手順

$ claude
> /hooks
> Stop - Right before Claude concludes its response
...
> + Add new hook…
...
> /usr/bin/afplay --volume 0.3 /System/Library/Sounds/Glass.aiff
...
> User settings Saved in at ~/.claude/settings.json
ESC
ESC
> quit
$ cat ~/.claude/settings.json | jq .
{
  "hooks": {
    "Stop": [
      {
        "matcher": "",
        "hooks": [
          {
            "type": "command",
            "command": "/usr/bin/afplay --volume 0.3 /System/Library/Sounds/Glass.aiff"
          }
        ]
      }
    ]
  }
}

(2025年7月2日)