Claude Clue #16: Stop Staring and Let Claude Ding You

Small automations that fire at specific points in Claude's lifecycle. A simple example: playing a sound!

Claude Clue #16 - Tips for working with AI
Christopher's Claude Clues #16

Claude Code has a feature called hooks—small automations that fire at specific points in Claude's lifecycle. A simple example: playing a sound to let me know Claude is done with a task and ready for me again. Like most people, I'm not staring at Claude Code while it works. There are always other windows open, and tasks can take several minutes. I needed something to pull my attention back when it was ready.

Here's what this looks like in practice: you add a small JSON config that plays a system sound whenever Claude stops. On macOS it's just afplay pointing at a built-in sound file; on Windows, a quick PowerShell one-liner does the same. Now I can send Claude off and actually context-switch to something else, trusting I'll hear that little ding when it's time to come back.

🔔
Of course, you could get more creative with the sounds!

Notification sounds are just the start. The same mechanism can auto-format your code after every edit, block Claude from touching files it shouldn't (kind of, it isn't perfect at this), or log every action for an audit trail. Hooks run outside the model's control, so they can't be reasoned away or bypassed.

The same mechanism can enforce guardrails, log activity, or trigger external workflows. What makes hooks especially useful is that they run outside the model's control, so they can't be reasoned away or bypassed. Remember when we talked about guardrails? Find the full details in the Claude Code docs, or you know... ask Claude Code what hooks it has!

Another thing I made with Claude's help.

HT: Roscoe Rawson

Subscribe to Almost Entirely Human

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe