claude-hook-builder

Automate Claude Code hook creation and configuration for tool workflows.

6|Updated Dec 30, 2025
One-click install
npx skills add https://github.com/pur3v4d3r/pur3-pkb-codebase --skill claude-hook-builder-pur3v4d3r
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: claude-hook-builder
Source: https://github.com/pur3v4d3r/pur3-pkb-codebase/tree/main/.claude/skills/claude-hook-builder
Command: npx skills add https://github.com/pur3v4d3r/pur3-pkb-codebase --skill claude-hook-builder-pur3v4d3r

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates the creation and configuration of Claude Code hooks to govern tool execution, validation, and automation workflows.

Core Features & Use Cases

  • Auto-invokes when users create or configure hooks to streamline setup.
  • Supports PreToolUse, PostToolUse, UserPromptSubmit, SessionStart, and SessionEnd events for comprehensive control.
  • Provides both command-based and prompt-based hook definitions, plus guidance and templates to accelerate integration.
  • Includes knowledge-base references and project guides to help teams implement consistent hook strategies.

Quick Start

Prompt Claude Code to create a new hook by specifying the event, matcher, and the script or command to run.

Frequently Asked Questions about claude-hook-builder

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

FAQPage Schema
How do I create Claude Code hooks to automate tool workflows?

To create Claude Code hooks, define the event, matcher, and script in YAML frontmatter within SKILL.md. This Skill auto-generates configurations for PreToolUse, PostToolUse, UserPromptSubmit, SessionStart, and SessionEnd events to automate validations and context injection.

What events can I configure Claude Code hooks for?

Claude Code hooks support PreToolUse, PostToolUse, UserPromptSubmit, SessionStart, and SessionEnd events. These events allow you to handle tool execution validations, transformations, prompt submissions, and session management automations.

How do I set up a PreToolUse hook for validation in Claude Code?

Set up a PreToolUse hook by specifying the event, matcher, and command in your SKILL.md YAML frontmatter. This configuration intercepts tool execution to run validation scripts or prompt-based definitions before the tool processes the request.

Can I use prompt-based definitions instead of scripts for Claude Code hooks?

Yes, Claude Code hooks support both command-based and prompt-based definitions. You can specify either a script to run or a prompt-based instruction to handle tool execution, validations, and context injection across various workflow events.

What do I need to configure before setting up Claude Code hooks?

You need a SKILL.md file containing YAML frontmatter with at least a name and description. Optional scripts, references, and assets can be included to implement the hook logic and automate tool execution workflows effectively.

Why are my Claude Code session management hooks not triggering?

Session management hooks require correct configuration for SessionStart and SessionEnd events in the YAML frontmatter. Ensure your SKILL.md defines the event, matcher, and command properly, as missing or malformed definitions will prevent hooks from triggering.