Claude Code Hooks is a collection of eight Node.js scripts that provide guardrails for Anthropic's Claude during code generation sessions. It supplies production-grade hooks along with reference documentation covering hook events, stdin JSON structure, exit codes, and blocking patterns.
The package includes specific hooks such as secret-shield, which blocks commands and file writes containing API keys, tokens, private keys, or credentialed URLs on the PreToolUse event. Danger-blocker prevents destructive actions including rm -rf /, force-push to main, DROP DATABASE, disk-level writes, and fork bombs. Pnpm-guard reads the lockfile and rejects use of the wrong package manager. Dev-server-guard stops the agent from launching npm run dev in its own shell. Coauthor-scrubber rejects commits that carry the Co-Authored-By trailer so Claude retries cleanly. Typecheck-gate runs tsc --noEmit at turn end and returns errors to Claude for correction. Format-on-write applies Prettier to each touched file in repositories that use it, operating on the PostToolUse event. A final hook named turn-tim is listed but not fully detailed.
The scripts are plain Node with zero dependencies. They are delivered as a free downloadable package under the MIT license. The accompanying documentation serves as the reference material that addresses repeated searches for hook event details and related structures.
It is intended for developers who integrate Claude into coding workflows and require controls to maintain safety and consistency.
In the Developer Tools space, Claude Code Hooks takes a focused approach. It focuses on preventing unsafe, incorrect, or unintended code changes when using Claude for software development. Claude Code Hooks is a consumer product aimed at developers. Claude Code Hooks is free to use. It runs on the web and the command line.
Behind Claude Code Hooks is techpotions, and the product first shipped in 2026. Among its 5 catalogued features are Secret Shield, Danger Blocker, and Typecheck Gate.
Latest indexed changes and source events
Claude Code hooks: the guardrails I wish I'd set up on day one verified by the PulseGate indexer
Other apps tracked under the same category.