create-hooks

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

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/saxjax/saxjaxTuner --skill create-hooks-saxjax
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-hooks
Source: https://github.com/saxjax/saxjaxTuner/tree/main/.claude/skills/create-hooks
Command: npx skills add https://github.com/saxjax/saxjaxTuner --skill create-hooks-saxjax

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Expert guidance for creating, configuring, and using Claude Code hooks. Use when working with hooks, setting up event listeners, validating commands, automating workflows, adding notifications, or understanding hook types (PreToolUse, PostToolUse, Stop, SessionStart, UserPromptSubmit, etc).

Core Features & Use Cases

Hooks provide programmatic control over Claude's behavior without modifying core code, enabling project-specific automation, safety checks, and workflow customization. Hooks are event-driven automation for Claude Code that execute shell commands or LLM prompts in response to tool usage, session events, and user interactions. They fire in an event hierarchy: events (PreToolUse, PostToolUse, Stop, etc.) trigger matchers (tool patterns) which fire hooks (commands or prompts). Hooks can block actions, modify tool inputs, inject context, or simply observe and log Claude's operations.

Quick Start

To begin, create the hooks config at .claude/hooks.json, choose the event, select the hook type, configure the matcher, and test with claude --debug.

Frequently Asked Questions about create-hooks

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

FAQPage Schema
How do I create Claude Code hooks for event-driven workflow automation?

Claude Code hooks are event-driven automation mechanisms that execute shell commands or LLM prompts in response to tool usage and session events. They fire when events trigger matchers, enabling programmatic control over Claude's behavior without modifying core code.

Can I use Claude Code hooks to validate commands before execution?

Yes, PreToolUse hooks validate commands before execution. You can configure matchers for specific tool patterns and run shell commands or prompts to block actions, modify tool inputs, or inject context into Claude's operations.

What types of events can I listen to with Claude Code hooks?

Claude Code hooks support event types including PreToolUse, PostToolUse, Stop, SessionStart, and UserPromptSubmit. These events trigger matchers based on tool patterns, which then fire hooks to execute commands or prompts.

What's the best way to debug Claude Code hooks during setup?

The best way to debug Claude Code hooks is to test configurations using the claude --debug command. This verifies that events trigger matchers correctly and hooks execute as expected in the .claude/hooks.json setup.

Do I need YAML frontmatter in SKILL.md to configure Claude Code hooks?

Yes, configuring Claude Code hooks requires YAML frontmatter in SKILL.md with a name and description. Optional scripts, references, and assets can be included to extend hook capabilities and support custom automation workflows.

Why would I use hooks instead of modifying core code for workflow automation?

Hooks provide programmatic control over Claude's behavior without modifying core code, enabling project-specific automation and safety checks. They allow you to observe, log, block, or modify operations through event-driven listeners rather than altering the application.