Bonus 01 of 07
What hooks are and how to add one safely
Goal: Hooks are real Claude Code features, but they live in settings and need to be configured carefully. Today you learn the correct mental model, inspect what is already configured, and add one safe hook without guessing.
What to do
Understand what a hook is - and what it is not
A hook is an automatic rule that Claude Code runs at a specific event, such as after an edit or when it needs your attention. A Skill is different: you invoke a Skill when you want it. A CLAUDE.md rule is also different: it is guidance Claude reads as part of the session. Hooks are automation. Skills are reusable instructions. CLAUDE.md is persistent guidance.
Open the hooks browser and inspect what is already configured
In Claude Code, type `/hooks`. This opens the hooks browser. It is read-only. The point of this step is not to edit anything yet. You are checking whether you already have hooks configured and what events they belong to.
Ask Claude to add one safe Notification hook
Do not start with a complex file-protection hook. Start with one safe hook that only notifies you when Claude needs attention. Paste this exactly:
Add one safe Notification hook to my Claude Code settings. It should alert me when Claude needs my attention. Use a command that fits my operating system. Do not overwrite any existing hooks. Show me the settings change before you save it.Verify the hook appears in /hooks
After Claude saves the settings change, type `/hooks` again. You should now see the Notification event with your new hook listed under it.
Test the hook with a real attention moment
Trigger a situation where Claude needs your attention. A simple way is to ask Claude to do something that requires your approval, then switch away briefly and confirm the notification appears. If it does not, come back and inspect the hook instead of guessing.
Expected result
You understand where hooks really live, you inspected your current configuration in /hooks, and you added and tested one safe Notification hook without inventing unsupported files or formats.
Key takeaway
- Hooks are real, but they are settings-based automation and should be introduced slowly. Start with one safe hook, inspect it in /hooks, and test it before you trust it.