hook-development

Develop Claude Code plugin hooks for policy enforcement and event-driven workflows.

1|Updated Apr 1, 2026
One-click install
npx skills add https://github.com/Kingdaddy007/Claude-leaked-source-code --skill hook-development-kingdaddy007
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hook-development
Source: https://github.com/Kingdaddy007/Claude-leaked-source-code/tree/main/stubs/downloads/official-plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/hook-development
Command: npx skills add https://github.com/Kingdaddy007/Claude-leaked-source-code --skill hook-development-kingdaddy007

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Hooks are the building blocks for secure, automated Claude Code plugin workflows. This skill provides a comprehensive guide to designing and implementing event-driven hooks (PreToolUse, PostToolUse, Stop, SessionStart, etc.) with an emphasis on advanced prompt-based patterns that reduce scripting needs while increasing safety and reliability.

Core Features & Use Cases

  • Comprehensive hook design for Claude Code plugins, including prompt-based and command hooks
  • Guidance on configuration formats, lifecycle management, and best practices
  • Real-world patterns for validation, context loading, and cross-event workflows

Quick Start

Create your first hook configuration in hooks.json and begin defining prompt-based hooks to govern tool use.

Frequently Asked Questions about hook-development

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

FAQPage Schema
What are Claude Code hooks and how do they automate plugin workflows?

Claude Code hooks are event-driven building blocks for plugins that enforce policies, validate tool use, and automate workflows across lifecycle events like PreToolUse, PostToolUse, Stop, and SessionStart. They enable safe, context-aware automation within the plugin ecosystem.

How do I create a prompt-based hook to validate tool use in Claude Code?

You can create prompt-based hooks by defining configurations in a hooks.json file. This approach reduces scripting needs by using advanced prompt patterns to govern tool use, validate inputs, and load context safely across various plugin lifecycle events.

When should I use PreToolUse versus PostToolUse hooks for security validation?

Use PreToolUse hooks to enforce security policies and validate actions before a tool executes, preventing unsafe operations. PostToolUse hooks manage event-driven workflows and context loading after execution, ensuring structured lifecycle management and reliable integration.

Does Claude Code support command hooks alongside prompt-based hooks?

Yes, Claude Code supports both prompt-based and command hooks. The skill provides comprehensive guidance on configuration formats, lifecycle management, and best practices for both types, enabling robust testing patterns and reliable integration with CLAUDE_PLUGIN_ROOT and environment handling.

What is the best way to manage cross-event workflows in Claude Code plugins?

The best way to manage cross-event workflows is by implementing structured hook definitions across lifecycle events. This approach utilizes real-world patterns for validation and context loading, ensuring robust testing and reliable integration with CLAUDE_PLUGIN_ROOT and environment variables.