create-hooks

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

17|1|Updated Jan 3, 2026
One-click install
npx skills add https://github.com/cfircoo/claude-code-toolkit --skill create-hooks-cfircoo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-hooks
Source: https://github.com/cfircoo/claude-code-toolkit/tree/main/skills/create-hooks
Command: npx skills add https://github.com/cfircoo/claude-code-toolkit --skill create-hooks-cfircoo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

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. This Skill teaches you how to create, configure, and debug hooks for validating commands, automating workflows, injecting context, and implementing custom completion criteria.

Hooks provide programmatic control over Claude's behavior without modifying core code, enabling project-specific automation, safety checks, and workflow customization.

Core Features & Use Cases

  • Hooks events: PreToolUse, PostToolUse, UserPromptSubmit, Stop, SessionStart, etc.
  • Create and manage hooks config: .claude/hooks.json
  • Logging and observability of Claude actions
  • Block destructive commands and inject context
  • Automate workflows and notifications

Quick Start

  1. Create hooks config file:
    • Project: .claude/hooks.json
    • User: ~/.claude/hooks.json
  2. Choose hook event (when it fires)
  3. Choose hook type (command or prompt)
  4. Configure matcher
  5. Test with claude --debug