hook-builder

Create, configure, and debug Claude Code hooks for event-driven automation.

Updated Dec 22, 2025
One-click install
npx skills add https://github.com/royhenengel/Claude-Customizations --skill hook-builder-royhenengel
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: hook-builder
Source: https://github.com/royhenengel/Claude-Customizations/tree/main/skills/Tooling/hook-builder
Command: npx skills add https://github.com/royhenengel/Claude-Customizations --skill hook-builder-royhenengel

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill empowers you to create, configure, and debug Claude Code hooks, enabling powerful event-driven automation without modifying core Claude functionality.

Core Features & Use Cases

  • Hook Creation: Learn to define custom hooks for various events (PreToolUse, PostToolUse, etc.).
  • Configuration: Understand how to set up matchers, choose hook types (command/prompt), and handle input/output.
  • Debugging: Get guidance on troubleshooting common hook issues.
  • Use Case: Automatically format code after every Write or Edit tool use, or block destructive Bash commands like rm -rf.

Quick Start

Create a hook that logs all bash commands to a file.

Frequently Asked Questions about hook-builder

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up Claude Code hooks for event-driven automation?▼

Claude Code hooks enable event-driven automation by defining custom workflows for events like PreToolUse and PostToolUse. You configure matchers, choose hook types, and handle input/output schemas to trigger actions automatically without modifying core functionality.

Can I use Claude Code hooks to block destructive bash commands?▼

Yes, you can use Claude Code hooks to block destructive bash commands. By configuring a PreToolUse hook with a matcher for the Bash tool, you can intercept and prevent commands like rm -rf from executing based on custom validation logic.

How do I automatically format code after writing files in Claude Code?▼

To automatically format code after writing files, configure a PostToolUse hook matched to the Write or Edit tool. This event-driven setup triggers your formatting script immediately after the tool executes, ensuring code consistency.

What are the different types of Claude Code hooks I can configure?▼

Claude Code hooks consist of various event types like PreToolUse and PostToolUse, which support both command and prompt hook types. You configure these using matchers and input/output schemas to define custom workflows, validation, and context injection.

Why are my Claude Code hooks not triggering during tool use?▼

If Claude Code hooks are not triggering, debugging involves checking the configured matchers against the event type and verifying the input/output schemas. Common issues include mismatched tool names or incorrect hook configuration in the setup.