hook-creator

Create native Claude Code hook scripts with JSON output and templates.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/HTRamsey/claude-config --skill hook-creator-htramsey
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hook-creator
Source: https://github.com/HTRamsey/claude-config/tree/main/skills/hook-creator
Command: npx skills add https://github.com/HTRamsey/claude-config --skill hook-creator-htramsey

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Template-based creation of native Claude Code hooks (PreToolUse, PostToolUse, etc.) with strict JSON output format.

Core Features & Use Cases

  • ProScript templates and required output format
  • Guidance on context fields and permissions
  • Examples of common hook patterns

Quick Start

Run init_hook.py to generate a new hook skeleton and customize the logic.

Frequently Asked Questions about hook-creator

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

FAQPage Schema
How do I create Claude hooks for tool use safeguards?

Create Claude hooks by running init_hook.py to generate hook scripts that add PreToolUse and PostToolUse safeguards. The Skill generates native hook templates in ~/.claude/hooks/ and configures them in settings.json, enabling you to customize logic for specific tools and events.

What are PreToolUse and PostToolUse hooks in Claude Code?

PreToolUse and PostToolUse hooks are native Claude Code automation scripts that intercept tool execution. PreToolUse runs before a tool executes; PostToolUse runs after. This Skill creates these hooks with strict JSON output format to enforce safeguards and control tool behavior.

Can I use hooks to automate tool execution safety checks?

Yes. This Skill creates hook scripts that apply safety checks at tool execution boundaries. You can configure PreToolUse hooks to validate inputs and PostToolUse hooks to inspect outputs, with graceful failure handling and template-driven initialization to streamline integration.

Do I need coding experience to set up Claude hooks?

The Skill provides template-driven initialization and ProScript templates, so you customize pre-built hook skeletons rather than write from scratch. Basic familiarity with JSON and hook events helps, but the templates guide you through common hook patterns.

What events can Claude hooks monitor beyond tool use?

This Skill supports PreToolUse, PostToolUse, UserPromptSubmit, and Stop events. You configure which tools and events trigger your hooks, enabling automation across user input submission and execution halting, not just tool execution boundaries.

How do I update or manage existing hooks?

The Skill enables hook creation, updates, and configuration stored in ~/.claude/hooks/ and the settings.json hooks section. Run init_hook.py to generate new hooks or modify existing templates; all hooks follow strict JSON output format for consistency and validation.