Hook Development

Design and implement Claude Code hooks with hooks.json configuration.

1|Updated Dec 29, 2025
One-click install
npx skills add https://github.com/henmessi/plugin-dev --skill hook-development-henmessi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Hook Development
Source: https://github.com/henmessi/plugin-dev/tree/main/skills/hook-development
Command: npx skills add https://github.com/henmessi/plugin-dev --skill hook-development-henmessi

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and scripts (resource) components.

What problem does it solve?

This Skill provides guidance for designing and implementing Claude Code hooks (PreToolUse, PostToolUse, Stop, SessionStart, etc.), with a focus on advanced prompt-based hooks and deterministic command hooks.

Core Features & Use Cases

  • Hook types (prompt-based, command-based) and their usage
  • Hook configuration formats (hooks.json, plugin.json inline)
  • Event coverage with PreToolUse, PostToolUse, Stop, SessionStart, etc.
  • Security patterns, performance considerations, and testing guidance
  • Best practices for scaling hooks across plugins

Quick Start

Create a hooks.json at hooks/ with at least one PreToolUse or Stop hook. Add a prompt-based hook to illustrate decision-making, and validate with the hook developer scripts.