hook-development

Create and configure Claude Code plugin hooks for event-driven automation.

Updated May 30, 2026
One-click install
npx skills add https://github.com/jeffpecky/vortex --skill hook-development-jeffpecky
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hook-development
Source: https://github.com/jeffpecky/vortex/tree/main/src/vendor/official-plugins/marketplaces/claude-plugins-official/plugins/plugin-dev/skills/hook-development
Command: npx skills add https://github.com/jeffpecky/vortex --skill hook-development-jeffpecky

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill streamlines the process of creating and implementing advanced hook configurations for Claude Code plugins, enabling users to manage event-driven automation with ease.

Core Features & Use Cases

  • Advanced Hook Creation: Offers a comprehensive guide for creating and implementing Claude Code plugin hooks.
  • Event-Driven Automation: Supports PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, and Notification hooks.
  • Prompt-Based Hooks: Allows for context-aware validation using LLM-driven decision making.
  • Command Hooks: Executes bash commands for fast deterministic checks and external tool integration.
  • Configuration Formats: Supports both hooks.json for plugin hooks and .settings.json for user settings.

Quick Start

To create a PreToolUse hook that validates file write safety, use the following configuration:

{
  "PreToolUse": [
    {
      "matcher": "Write|Edit",
      "hooks": [
        {
          "type": "prompt",
          "prompt": "Validate file write safety. Check: system paths, credentials, path traversal, sensitive content. Return 'approve' or 'deny'."
        }
      ]
    }
  ]
}

Frequently Asked Questions about hook-development

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

FAQPage Schema
How do I configure Claude Code plugin hooks for event-driven automation?

Configuring Claude Code plugin hooks involves defining event types like PreToolUse or PostToolUse in a hooks.json file. This skill streamlines creating these configurations, enabling context-aware validation and command execution for automated plugin workflows.

Can I use bash commands for file validation in Claude Code hooks?

Yes, Claude Code hooks support command types that execute bash commands for fast deterministic file validation checks. You can configure these command hooks alongside prompt-based hooks within your plugin's event-driven automation structure.

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

Prompt-based hooks use LLM-driven decision making for context-aware validation, while command hooks execute bash commands for fast deterministic checks. Both hook types can be configured for events like PreToolUse and Stop within your plugin.

Does Claude Code hook configuration require jq and bash dependencies?

Advanced Claude Code hook configuration requires jq and bash dependencies to support command hook execution and JSON data processing. You need knowledge of the Claude Code plugin structure to implement these event-driven automation hooks effectively.

How do I validate file write safety using PreToolUse hooks in Claude Code?

Validating file write safety uses a PreToolUse hook configured with a matcher for Write or Edit tools. The hook utilizes a prompt-based type to check system paths, credentials, and sensitive content, returning an approve or deny decision.

What event types are supported for Claude Code plugin hooks?

Claude Code plugin hooks support event types including PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, and Notification. These events enable comprehensive event-driven automation across the plugin lifecycle.