hook-development

Develop prompt-based and command hooks for Claude Code plugins.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Hooks empower Claude Code plugins to react to events, enforce policies, and automate workflows without embedding fragile logic in application code.

Core Features & Use Cases

  • Prompt-based and command hooks for flexible validation and deterministic checks across events (PreToolUse, Stop, SessionStart, etc.)
  • Guidance on configuring hooks with hooks.json, scripts, and context loading to enable end-to-end automation.
  • Real-world use case: enforce security checks before tool use, load project context at session start, and ensure tasks are complete before stopping.

Quick Start

Create a minimal plugin hook using a prompt-based check in hooks.json and a simple script under scripts/, then run claude --debug to validate the integration.

Frequently Asked Questions about hook-development

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

FAQPage Schema
How do I create Claude Code hooks to automate workflows and enforce policies?

Claude Code hooks automate workflows and enforce policies by configuring prompt-based and command hooks in hooks.json with scripts. Use claude --debug to validate the integration and ensure safe execution.

What is the difference between prompt-based and command hooks in Claude Code plugins?

Claude Code prompt-based hooks provide flexible validation through prompts, while command hooks execute deterministic checks. Both react to events like PreToolUse, Stop, or SessionStart to coordinate multi-event automation securely.

Can I load project context automatically at session start using Claude Code hooks?

Claude Code hooks support context loading at SessionStart events. Configuring hooks in hooks.json enables end-to-end automation, loading project context automatically when a session initializes to inform subsequent operations.

How do I enforce security checks before tool use with Claude Code hooks?

To enforce security checks before tool use, configure Claude Code hooks for the PreToolUse event. This triggers validation scripts or prompts, ensuring policies are met securely before application tools execute.

Do I need jq installed to use hook automation scripts for Claude Code?

jq is a required dependency for the hook-development skill. Installing jq provides the environment glue necessary for parsing JSON and executing rigorous validation within Claude Code hook scripts.

Why does my Claude Code hook integration fail validation without timeouts?

Claude Code hook integration fails validation without timeouts because the structured workflow enforces safe execution with timeouts. Rigorous validation ensures reliable integration by preventing hanging processes during event coordination.