hook-development

Design Claude Code plugin hooks with JSON schema validation and linting.

Updated Apr 8, 2026
One-click install
npx skills add https://github.com/NGTPTE/TuriX-MarketPlace --skill hook-development-ngtpte
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hook-development
Source: https://github.com/NGTPTE/TuriX-MarketPlace/tree/main/plugins/plugin-dev/skills/hook-development
Command: npx skills add https://github.com/NGTPTE/TuriX-MarketPlace --skill hook-development-ngtpte

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill helps you design, validate, and ship Claude Code plugin hooks that automate repetitive checks, context loading, and event-driven responses without fragile ad hoc scripts.

Core Features & Use Cases

  • Hook authoring guidance: Create prompt-based or command-based hooks for events such as PreToolUse, PostToolUse, Stop, SessionStart, and UserPromptSubmit.
  • Safety and policy enforcement: Block dangerous commands, protect sensitive paths, and validate tool use before changes land.
  • Testing and maintenance workflows: Use the included validator, linter, and test helper to check JSON structure, script quality, and sample hook behavior before deployment.
  • Real-world example: Build a PreToolUse guard for Bash that approves harmless commands, asks for confirmation on risky ones, and denies destructive operations.

Quick Start

Ask the assistant to create a safe Claude Code hook for a specific event, validate the configuration, and recommend the matching test script.

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 safety checks and workflow enforcement?

To create Claude Code hooks, you design prompt-based or command-based definitions for events like PreToolUse, PostToolUse, or SessionStart. This process automates safety checks, context loading, and workflow enforcement by validating tool use before changes land.

When do I need to use PreToolUse or PostToolUse plugin hooks for validation?

You need PreToolUse or PostToolUse plugin hooks when automating safety checks and validating tool use. PreToolUse blocks dangerous commands or protects sensitive paths before execution, while PostToolUse handles event-driven responses and context loading after operations complete.

What is the best way to validate Claude Code hook configurations before deployment?

The best way to validate Claude Code hook configurations is using the included validator and linter to check JSON structure, script quality, and sample hook behavior. Sample input testing and JSON schema validation ensure reliable plugin deployment.

Can I use command-based hooks to block dangerous Bash commands in Claude Code?

Yes, you can use command-based hooks to block dangerous Bash commands in Claude Code. A PreToolUse guard can approve harmless commands, ask for confirmation on risky ones, and deny destructive operations to enforce safety policies.

Do I need jq and timeout installed to develop Claude Code plugin hooks?

Yes, you need jq and timeout installed as dependencies to develop Claude Code plugin hooks. These tools support the command-based hook definitions, JSON schema validation, and script execution workflows required for reliable plugin deployment.

Why should I use portable CLAUDE_PLUGIN_ROOT paths in my Claude Code hook scripts?

You should use portable CLAUDE_PLUGIN_ROOT paths in Claude Code hook scripts to ensure reliable plugin deployment across different environments. Portable paths prevent fragile ad hoc scripts and maintain consistent hook behavior during testing and maintenance workflows.