hook-creator

Create and configure Claude Code hooks for PreToolUse, PostToolUse, and Notification events.

1|Updated Dec 11, 2025
One-click install
npx skills add https://github.com/evanfang0054/cc-system-creator-scripts --skill hook-creator-evanfang0054
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hook-creator
Source: https://github.com/evanfang0054/cc-system-creator-scripts/tree/main/.claude/skills/hook-creator
Command: npx skills add https://github.com/evanfang0054/cc-system-creator-scripts --skill hook-creator-evanfang0054

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill enables creating and configuring Claude Code hooks to customize agent behavior.

Core Features & Use Cases

  • Hook creation and lifecycle configuration: generate and tailor hooks tied to PreToolUse, PostToolUse, and Notification events.
  • Matcher-based event filtering: specify which tools trigger which hooks using patterns like Bash, Edit|Write.
  • Centralized governance: manage permissions, logging, and automated actions across projects to enforce consistent agent behavior.

Quick Start

Example: npx ts-node .claude/skills/hook-creator/scripts/init_hook.ts my-hook --path ./hooks

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 Code hooks to customize agent behavior?

You can create Claude Code hooks to customize agent behavior by configuring event-driven scenarios like PreToolUse, PostToolUse, and Notification events to automate actions and enforce policies. This skill supports matcher-based configurations to tailor hook lifecycles.

What are Claude Code hooks and when do I need them?

Claude Code hooks are event-driven configurations that automate actions, enforce policies, and improve observability for agents. You need them to manage permissions, logging, and automated actions across projects for consistent agent behavior.

Can I filter which tools trigger specific hooks in Claude Code?

Yes, you can filter which tools trigger specific hooks in Claude Code using matcher-based event filtering. By specifying patterns like Bash or Edit|Write, you can control exactly which tools initiate your configured PreToolUse or PostToolUse hooks.

What is the best way to manage permissions and logging for Claude Code agents?

The best way to manage permissions and logging for Claude Code agents is through centralized governance using hooks. By configuring PermissionRequest and Notification events, you can enforce consistent agent behavior and automate actions across projects.

How do I set up a hook for PreToolUse or PostToolUse events?

You set up hooks for PreToolUse or PostToolUse events by using frontmatter-driven metadata and the SKILL.md workflow. This skill provides a dedicated references directory for hook-event guidance to generate and tailor hooks tied to these specific events.