Menu

Post image 1
Post image 2
1 / 2
0

Stop telling Claude not to read your secrets. Block it instead.

DEV Community·Ironex·20 days ago
#yMflTiuV
#ai#claude#webdev#software#hook#hooks
Reading 0:00
15s threshold

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.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More