claude-code-hook-development
CommunityDevelop robust Claude Code hooks with guardrails and automation.
Software Engineering#automation#claude-code#guardrails#hook#PostToolUse#PreToolUse#policy-enforcement
Authordwmkerr
Version1.0.0
Installs0
System Documentation
What problem does it solve?
Claude Code hook development provides a structured approach to creating, configuring, and governing guards and automations that run on specific events, ensuring consistent policy enforcement across tool usage.
Core Features & Use Cases
- Hook Types: Command hooks (bash/script execution) and Prompt hooks (LLM-driven decisions) to cover a wide range of automation and governance needs.
- Exit Codes & Behavior: Clear exit code conventions (0 = allow, 2 = block) for reliable enforcement and predictable Claude responses.
- Settings & File Layout: Standard locations (.claude/settings.json and .claude/hooks/) for configuration and hook scripts, enabling deterministic deployment.
- Hook Events & Matchers: Supports PreToolUse, PostToolUse, PermissionRequest, UserPromptSubmit, Stop, SessionStart, and other events with a flexible matcher system.
- Usage Scenarios: Enforce security policies, block dangerous commands, automate routine checks, and insert guardrails during development workflows.
- Activation & References: Activation relies on documented references and examples to implement common policies and patterns.
Quick Start
Create a basic hook by placing a script under .claude/hooks/ and registering it in .claude/settings.json, then consult the References for sample patterns and activation steps.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: claude-code-hook-development Download link: https://github.com/dwmkerr/claude-toolkit/archive/main.zip#claude-code-hook-development Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.