Automate workflows with shell commands — run guaranteed at specific lifecycle points when Claude edits files, finishes tasks, or needs input.
Desktop notification when Claude needs input — never miss a prompt. Add to ~/.claude/settings.json:
→ Open /hooks to see registered events. Ask Claude something, switch tabs — notification fires.
Claude sends JSON via stdin. Your script replies via exit code + stdout/stderr:
The matcher field scopes which hooks run — keep it as narrow as possible.