One-click install
npx skills add https://github.com/Tashima-Tarsh/Disha --skill hook-development-tashima-tarsh
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Hook Development
Source: https://github.com/Tashima-Tarsh/Disha/tree/main/disha/services/integrations/Anthropic/plugins/plugin-dev/skills/hook-development
Command: npx skills add https://github.com/Tashima-Tarsh/Disha --skill hook-development-tashima-tarsh

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill eliminates the manual effort of building and maintaining custom automation for Claude Code plugin workflows, enabling consistent enforcement of security policies, quality standards, and context loading without repetitive manual intervention.

Core Features & Use Cases

  • Dual Hook Types: Implement both flexible prompt-based LLM hooks for context-aware validation and fast deterministic command hooks for performance-critical checks.
  • Full Event Coverage: Automate actions across all Claude Code events including PreToolUse, PostToolUse, Stop, SessionStart, and UserPromptSubmit.
  • Security & Compliance: Block dangerous commands, prevent path traversal, and validate tool use to protect project integrity. For example, a development team can use this Skill to automatically deny destructive bash operations and enforce test runs before finalizing code changes.

Quick Start

Use the Hook Development skill to create a PreToolUse hook that automatically blocks all write attempts to .env credential files in your Claude Code plugin.

Frequently Asked Questions about Hook Development

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

FAQPage Schema
How do I automate tool use approval and security enforcement for Claude Code plugins?

Tool use approval and security enforcement for Claude Code plugins are automated by implementing custom event-driven hooks. These hooks validate tool use, block dangerous commands, and prevent path traversal to protect project integrity without manual intervention.

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

Prompt hooks in Claude Code are flexible LLM-based hooks for context-aware validation, whereas command hooks are fast deterministic scripts for performance-critical checks. Both hook types automate actions across PreToolUse, PostToolUse, Stop, and SessionStart events.

How do I create a PreToolUse hook to block write attempts to specific files?

To block write attempts to specific files like .env credentials, you create a PreToolUse hook using the Hook Development skill. This hook intercepts tool use events and automatically denies destructive bash operations or write commands targeting sensitive paths.

Can I use jq to validate plugin hook configurations and parse event data?

Yes, jq is a required dependency for validating plugin hook configurations and parsing event data. It processes JSON inputs from Claude Code events, enabling deterministic command hooks to execute fast, performance-critical security checks.

How do I test and debug event-driven hooks for Claude Code workflows?

Testing and debugging event-driven hooks for Claude Code workflows involves validating hook configuration, checking prompt and command hook execution, and ensuring security policies function correctly across all events including SessionStart and UserPromptSubmit.

What are the limitations of using command hooks for workflow automation in Claude Code?

Command hooks for workflow automation in Claude Code are limited to fast deterministic checks and cannot perform context-aware validation like prompt-based LLM hooks. They require jq for JSON parsing and are best suited for performance-critical policy enforcement rather than complex reasoning.