Claude Code has a hook system most people never touch. Here are two hooks I use daily - one for secrets, one for notifications.
Secret Guard 🛡️
A Claude Code hook that programmatically stops Claude from accessing your local secrets. Much more reliable than just telling Claude not to touch them.
Use it by copying the secret-guard hook from .claude/hooks/ and the matching PreToolUse entry from .claude/settings.json in the repo into your project, then chmod +x .claude/hooks/secret-guard. Claude picks it up on next start.
What's guarded by default: mainstream SQL databases, JavaScript and PHP framework env files, AWS credentials, Ansible Vault, and any env var that looks like a token, password, key, secret, or JWT.
Fully configurable - see the README for details.
Stop Notification 🔔
A Claude Code hook that fires a desktop notification every time Claude finishes a turn. Handy when you let it run a long task in the background and want to know the moment it's done instead of polling the terminal.
Use it by copying the stop-notification hook from .claude/hooks/ and the matching Stop entry from .claude/settings.json in the repo into your project, then chmod +x .claude/hooks/stop-notification. Claude picks it up on next start.
Supported: macOS, WSL, native Linux.
See the README for per-OS install steps.
Top comments (0)