# shanraisshan/claude-code-hooks: an audio layer for all 30 Claude Code hook events

> This repository wires every Claude Code hook event to a sound, so tool calls click, keyboard events type and other lifecycle moments speak. It is a reference implementation for hook wiring, not a hook framework, and the last push was on 2026-06-04.

**shanraisshan/claude-code-hooks** — claude code hooks - adding voice on each hook

- Repository: https://github.com/shanraisshan/claude-code-hooks
- Website: https://www.linkedin.com/in/shanraisshan/
- Stars: 551 · Forks: 59
- Language: HTML
- License: MIT
- Published: 2026-09-10 · Updated: 2026-09-10 · Language: en
- Canonical page: https://hysenlabs.com/projects/shanraisshan-claude-code-hooks

## The problem: Claude Code hooks are silent by default

Claude Code exposes hook events that fire around tool use, sessions, prompts, permissions, compaction and subagents. Hooks are useful for logging, gating and observability, but the default experience gives you nothing to hear. When a long agent run is working in the background, you have to watch the terminal to know whether a tool call is still in flight or the session has stalled.

This repository answers that with sound. Its README describes the mapping directly: a mouse click on PreToolUse, a keyboard sound on PostToolUse, and a human voice on the other hooks. The audience is people running Claude Code interactively who want ambient feedback without reading the transcript, and developers who want a complete worked example of wiring every hook event before writing their own. It is a demo and reference, not a daemon you install once and forget.

## How the hooks are wired: events, sounds and the demo server

The repository is organised around a .claude/ directory, which is where Claude Code reads project-level configuration, and a demo/ directory containing a hooks-lifecycle.html page, a server.py and a start-demo.sh script. The README changelog tracks the hook count event by event, from the initial four (PreToolUse, PostToolUse, Stop, SessionEnd) up to 30 with the addition of MessageDisplay. Each entry names the Claude Code version that introduced the event, which makes the changelog a usable compatibility table rather than a list of dates.

The audio layer itself is documented as a mapping rather than a library: each hook event is bound to a sound, and the repository ships the assets and the configuration that bind them. The repository also carries a .codex/ directory alongside .claude/, which suggests the author keeps sibling configurations for other agent CLIs in the same working tree. The README links to separate repositories for Codex CLI and Gemini CLI hooks, so the pattern is portable even though the event names differ. One page in the repo, .claude/hooks/HOOKS-README.md, is flagged as containing material not in the official docs, which is the part worth reading if you want the event list rather than the sounds.

## Installing claude-code-hooks and hearing the first prompt

The README does not inline a single install command. It links three platform guides: install/README-mac.md, install/README-linux.md and install/README-windows.md. Read the one that matches your machine before doing anything else, because the README states plainly that skipping the prerequisites produces a SessionStart:startup hook error when Claude Code starts.

Once the platform guide is followed, the documented usage is two steps. Start Claude Code:

```bash
claude
```

Then send a prompt, for example Hi. The README says you will hear a sound on session start, on tool use, on agent response and on other hook moments. If you hear nothing, the first thing to check is whether the hook error appeared at startup, since a failed SessionStart hook means the rest of the wiring never loaded.

For the visual side, the repository ships a demo. The demo directory contains start-demo.sh and server.py, with hooks-lifecycle.html as the page they serve. Running the shell script is the intended entry point according to the repository layout, and the page is what the demo video walks through. Treat the demo as the place to verify your sound mapping before you edit anything in .claude/.

## Where it breaks: version drift and a six-month-old push

The changelog is the clearest warning sign. Hook events in Claude Code are added over time, and this repository tracks them one by one, with the newest entries dated Jun 04, 2026 and pinned to Claude Code v2.1.152. The last push to the repository was on 2026-06-04. That is more than six months before today, so this is not an actively maintained project in the sense of recent commits, and there are no releases to pin against. If Claude Code has added hook events since v2.1.162, the badge version, they will not appear here.

There is a second, quieter failure mode. Sound-per-event is a blunt instrument. A busy agent run can fire PostToolUse many times per minute, and the README does not describe any rate limiting, coalescing or mute control. Anyone who has run an agent that edits twenty files in a row can predict how that sounds. The repository also does not document rollback or an uninstall path, so removing the wiring means editing the .claude/ configuration yourself. Finally, the primary language is HTML: the interesting artefacts are pages and assets, not a packaged runtime, so there is no importable module to call from your own script.

## Alternatives: hand-rolled hooks versus a hook collection

The obvious alternative is writing the hooks yourself against the official Claude Code hook documentation. That gives you exactly the events you care about, your own logging format and no third-party configuration in .claude/. The cost is that you have to discover the event list first, which is precisely what this repository has already done across 30 events and roughly a year of changelog entries. If your goal is to know what events exist and which Claude Code version introduced them, reading .claude/hooks/HOOKS-README.md is faster than reconstructing the list from release notes.

The second alternative is a general notification hook rather than an audio one: bind a single hook to a desktop notification and ignore the rest. That is calmer and easier to maintain, but it collapses the distinction the README is built around, where different events produce different feedback so you can tell a tool call from an agent response without looking. The trade-off is real: fewer hooks means less to keep in sync with Claude Code releases, and this repository's value drops the moment its event list falls behind.

## Licence, upgrade cost and what maintenance actually means here

The repository is MIT licensed, which permits commercial use, modification and redistribution provided the copyright notice and permission notice are retained. That is a permissive licence, and it is the reason the code is reusable as a starting point rather than something you merely read. Nothing in the README suggests the assets carry separate terms, but the LICENSE file is the authoritative text and worth reading before you ship the sounds inside a product.

The upgrade cost is the part to weigh. Because the project tracks Claude Code versions in its changelog, every Claude Code release that adds a hook event is a potential gap. With no releases and a last push of 2026-06-04, you should assume you will be the one diffing the changelog against the current Claude Code hook list. Budget for that, and keep your own copy of the .claude/ configuration so an upstream change does not silently rewrite your wiring.

## Conclusion

Adopt this if you want a working, MIT-licensed map of every Claude Code hook event and you are willing to check the install guide for your platform before starting Claude Code. Skip it if you need a maintained runtime library, a programmatic API or support guarantees, because the last push was on 2026-06-04 and there are no releases. Before wiring it into a daily workflow, open .claude/hooks/HOOKS-README.md, confirm which hook events your Claude Code version emits, and read install/README-mac.md, install/README-linux.md or install/README-windows.md for the prerequisites that prevent the SessionStart:startup hook error.

## FAQ

### Does Claude Code have hooks?

Yes. This repository's changelog tracks 30 hook events, starting from PreToolUse, PostToolUse, Stop and SessionEnd, and it pins each addition to the Claude Code version that introduced it.

### How do I install claude-code-hooks?

The README links platform-specific guides at install/README-mac.md, install/README-linux.md and install/README-windows.md rather than giving one command. It warns that skipping the prerequisites produces a SessionStart:startup hook error when Claude Code starts.

### How do I use claude-code-hooks after installing it?

Start Claude Code with the claude command and send a prompt such as Hi. According to the README you should hear a sound on session start, tool use, agent response and other hook moments.

### Where are claude-code-hooks stored in a project?

The repository keeps its hook configuration under .claude/, with the event reference in .claude/hooks/HOOKS-README.md. A demo directory holds the hooks-lifecycle.html page, server.py and start-demo.sh.

### What are the best hooks in Claude Code?

The repository does not rank hook events by usefulness. The README only describes its own mapping, where PreToolUse plays a mouse click, PostToolUse plays a keyboard sound and the other hooks use a human voice.

## Sources

- [Issues](https://github.com/shanraisshan/claude-code-hooks/issues)
- [License: MIT](https://github.com/shanraisshan/claude-code-hooks/blob/main/LICENSE)
- [Project website](https://www.linkedin.com/in/shanraisshan/)
- [README](https://github.com/shanraisshan/claude-code-hooks/blob/main/README.md)
- [shanraisshan/claude-code-hooks on GitHub](https://github.com/shanraisshan/claude-code-hooks)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/shanraisshan-claude-code-hooks
