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 AI security & guardrails 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 costs nothing to use. Claude Code Hooks is available on the web and the command line.
techpotions builds and maintains Claude Code Hooks, and it first shipped in 2026. Key capabilities include Secret Shield, Danger Blocker, and Typecheck Gate.
Summary written by a language model from the project’s public pages.
What PulseGate has recorded for this listing
Closest matches by what these projects do