create-hooks

Implement Claude Code hook configurations for PreToolUse, PostToolUse, Stop, and SessionStart events.

Updated Feb 14, 2026
One-click install
npx skills add https://github.com/DYAI2025/MOD_shark-engine --skill create-hooks-dyai2025
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-hooks
Source: https://github.com/DYAI2025/MOD_shark-engine/tree/main/sharkengine/.claude/skills/create-hooks
Command: npx skills add https://github.com/DYAI2025/MOD_shark-engine --skill create-hooks-dyai2025

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Hooks are essential for controlling Claude Code behavior; this skill provides expert guidance for creating, configuring, and using Claude Code hooks to tailor tool behavior.

Core Features & Use Cases

  • Step-by-step guidance to design, implement, test, and debug hooks
  • Coverage of PreToolUse, PostToolUse, Stop, SessionStart, UserPromptSubmit, and more
  • Real-world examples for logging, validation, automation, and notifications

Quick Start

Create a simple PreToolUse hook that logs each command to a file.

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 PreToolUse and PostToolUse events?

Claude Code hooks are configured by defining event listeners in YAML frontmatter with name, description, matchers, and input/output schemas to safely control and extend tool behavior for PreToolUse, PostToolUse, Stop, and SessionStart events.

What are Claude Code hooks used for in automation workflows?

Claude Code hooks are used for automating validations, logging commands, sending notifications, and customizing workflows by intercepting events like UserPromptSubmit and Stop to safely extend tool behavior.

Can I use hook configurations to validate tool inputs before execution?

Yes, PreToolUse hook configurations validate tool inputs before execution by defining matchers and input schemas that intercept commands, enabling you to block or modify actions based on custom validation rules.

Do I need any dependencies or scripts to set up SessionStart hooks?

No dependencies are required to set up SessionStart hooks, but you can optionally reference external scripts within the YAML configuration to handle event listeners and define custom automation workflows.

What is the best way to debug Claude Code hooks that are not triggering?

The best way to debug Claude Code hooks not triggering is to verify YAML frontmatter compatibility, check that matchers align with your target event types, and test input/output schemas against the expected PreToolUse or PostToolUse payloads.