hook-development

Design Claude Code plugin hooks for tool-use events with prompt and command patterns.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/astrosteveo/marketplace --skill hook-development-astrosteveo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hook-development
Source: https://github.com/astrosteveo/marketplace/tree/main/plugins/plugin-dev/skills/hook-development
Command: npx skills add https://github.com/astrosteveo/marketplace --skill hook-development-astrosteveo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jq, curl, psql, md5sum, nc, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a comprehensive framework for designing and implementing Claude Code plugin hooks, enabling robust, secure, and configurable automation around tool usage events.

Core Features & Use Cases

  • Define and orchestrate event-driven hooks for PreToolUse, PostToolUse, SessionStart, Stop, and SubagentStop
  • Support both prompt-based and command hooks to implement flexible validation, safety checks, and automation
  • Include practical patterns, examples, and debugging workflows to accelerate plugin development in real-world projects

Quick Start

Configure a basic hook setup: add a Prompt-based PreToolUse hook to validate a tool input, load project context at SessionStart, and perform a final Stop check to ensure task completion.

Frequently Asked Questions about hook-development

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

FAQPage Schema
How do I configure PreToolUse hooks in Claude Code?

PreToolUse hooks in Claude Code can be configured as either prompt-based or command hooks to validate tool inputs. You define them in your plugin setup to intercept and check parameters before execution.

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

Prompt-based hooks use natural language instructions for validation, while command hooks execute shell scripts with dependencies like jq or curl. Both patterns support event-driven automation for PreToolUse and PostToolUse workflows.

How can I debug Claude Code plugin hooks that are not triggering?

Debugging Claude Code plugin hooks involves checking your JSON output formats, verifying timeout configurations, and tracing event triggers. The framework provides specific debugging workflows to identify and resolve hook execution failures.

Do I need jq and curl installed to use command hooks with Claude Code?

Yes, command hooks often require dependencies like jq, curl, psql, md5sum, and nc to execute shell-based validation and automation. Ensure these tools are installed in your environment for reliable hook performance.

Can I run safety checks on tool usage with PostToolUse hooks?

PostToolUse hooks enable safety checks and validation after tool execution completes. You can implement command or prompt-based patterns to verify outputs and ensure secure automation around tool usage events.

What security guidelines should I follow when implementing Claude Code hooks?

Claude Code hook security guidelines specify configuring strict timeouts, validating JSON outputs, and limiting command hook permissions. Following these ensures reliable, secure, and maintainable plugin hook implementations.