Hook Development
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based…
Skill by Claude-Code-Community-Ireland
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/claude-code-community-ireland-hook-development
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
Hook Development- Description
- This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.
- License
- MIT
- Instructions
- 708 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Agent Skills spec issues
- name: only lowercase letters, digits and single hyphens allowed
- name: "Hook Development" does not match folder "hook-development"
- body: 708 lines (spec recommends under 500)
Files (11)
- SKILL.md
- load-context.sh · examples/
- validate-bash.sh · examples/
- validate-write.sh · examples/
- advanced.md · references/
- migration.md · references/
- patterns.md · references/
- README.md · scripts/
- hook-linter.sh · scripts/
- test-hook.sh · scripts/
- validate-hook-schema.sh · scripts/
SKILL.md (first lines)
# Hook Development for Claude Code Plugins
## Overview
Hooks are event-driven automation scripts that execute in response to Claude Code events. Use hooks to validate operations, enforce policies, add context, and integrate external tools into workflows.
**Key capabilities:**
- Validate tool calls before execution (PreToolUse)
- React to tool results (PostToolUse)
- Enforce completion standards (Stop, SubagentStop)
- Load project context (SessionStart)
- Automate workflows across the development lifecycle
## Hook Types
### Prompt-Based Hooks (Recommended)
Use LLM-driven decision making for context-aware validation:
```json
{
"type": "prompt",
"prompt": "Evaluate if this tool use is appropriate: $TOOL_INPUT",
"timeout": 30
}
```
**Supported events:** Stop, SubagentStop, UserPromptSubmit, PreToolUse
**Benefits:**
- Context-aware decisions based on natural language reasoning
- Flexible evaluation logic without bash scripting
- Better edge case handling
- Easier to maintain and extend
### Command Hooks
Execute bash commands for deterministic checks:
```json
{
"type": "command",
"command": "bash ${CLAUDE_PLUGIN_ROOT}/scripts/validate.sh",
"timeout": 60
}
```
**Use for:**
- Fast deterministic validations
- File system operations
- External tool integrations
- Performance-critical checks
## Hook Configuration Formats
### Plugin hooks.json Format
**For plugin hooks** in `hooks/hooks.json`, use wrapper format:
```json
{
"description": "Brief explanation of hooks (optional)",
"hooks": {
"PreToolUse": [...],
"Stop": [...],
"SessionStart": [...]
}
}
```
**Key points:**
- `description` field is optional
- `hooks` field is required wrapper containing actual hook events
- This is the **plugin-specific format**
**Example:**
```json
{
"description": "Validation hooks for code quality",
"hooks": {
"PreToolUse": [
{
"matcher": "Write",
"hooks": [
{
"type": "command",
"command": "${CLAUDE_PLUGIN_ROOT}/hooks/validate.sh"
}
]
}
]
}
}
```
### Settings Format (Direct)
**For user settings** in `.claude/settings.json`, use direct format:
```json
{
"PreToolUse": [...],
"Stop": [...],
"SessionStart": [...]
}
```
**Key points:**
- No wrapper - events directly at top level
- No description field
- This is the **settings format**
**Important:** The examples below show the hook event structure that goes inside either format. For plugin hooks.json, wrap these in `{"hooks": {...}}`.
## Hook Events
### PreToolUse
Execute before any tool runs. Use to approve, deny, or modify tool calls.From Claude-Code-Community-Ireland/claude-code-resources, MIT.
More from Claude-Code-Community-Ireland/claude-code-resources
- 0.477score
start-of-day
Claude-Code-Community-Ireland
Comprehensive daily project sync - checks git repos, analyzes all code, reads documentation, and provides status report.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
performance-profiling
Claude-Code-Community-Ireland
Performance analysis methodology — identifying bottlenecks, profiling techniques, benchmarking, and common optimization patterns.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
architecture-decision-record
Claude-Code-Community-Ireland
ADR format and methodology for documenting significant technical decisions with context, alternatives considered, and consequences.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
incident-response
Claude-Code-Community-Ireland
Incident response procedures — triage, communication, investigation, mitigation, and post-incident review.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
conventional-commits
Claude-Code-Community-Ireland
Generate well-formatted conventional commit messages from staged changes.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
tdd-workflow
Claude-Code-Community-Ireland
Test-driven development methodology — red-green-refactor cycle, writing failing tests first, minimal implementation, and iterative refinement.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
debugging-systematic
Claude-Code-Community-Ireland
Systematic debugging methodology — binary search isolation, hypothesis-driven debugging, reproducing issues, and root cause analysis.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
dependency-audit
Claude-Code-Community-Ireland
Dependency management and auditing — evaluating new dependencies, security vulnerability scanning, update strategies, and license compliance.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
community-code-reviewer
Claude-Code-Community-Ireland
Perform thorough, constructive code reviews on pull requests and code changes.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
finish-the-day
Claude-Code-Community-Ireland
End-of-day wrap up - analyzes all work done, creates detailed daily update log, commits all changes, and pushes to remote.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
discord
Claude-Code-Community-Ireland
Manage your Discord server - post announcements, create events, moderate, and more.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
refactoring-patterns
Claude-Code-Community-Ireland
Safe refactoring techniques — extract method, rename, move, inline, and structural patterns.
SkillDFreshness: D★ 11Claude Code +9
Signals
- Stars
- 11
- Forks
- 4
- Open issues
- 4
- Last commit (this folder)
- Jan 29, 2026 (9 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
- 0.552score
hook-development
Galaxy-Dawn
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based…
SkillDFreshness: D★ 5.9KClaude Code +9 - 0.332score
Hook Development
lilinji
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based…
SkillBFreshness: B★ 16Claude Code +9 - 0.225score
hook-development
fabiano001
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based…
SkillDFreshness: DClaude Code +9 - 0.224score
Hook Development
HelixDevelopment
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based…
SkillDFreshness: DClaude Code +9 - 0.220score
hook-development
Wizarck
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based…
SkillDFreshness: DClaude Code +9
More from Claude-Code-Community-Ireland
- 0.477score
debugging-systematic
Claude-Code-Community-Ireland
Systematic debugging methodology — binary search isolation, hypothesis-driven debugging, reproducing issues, and root cause analysis.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
dependency-audit
Claude-Code-Community-Ireland
Dependency management and auditing — evaluating new dependencies, security vulnerability scanning, update strategies, and license compliance.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
architecture-decision-record
Claude-Code-Community-Ireland
ADR format and methodology for documenting significant technical decisions with context, alternatives considered, and consequences.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
community-code-reviewer
Claude-Code-Community-Ireland
Perform thorough, constructive code reviews on pull requests and code changes.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
conventional-commits
Claude-Code-Community-Ireland
Generate well-formatted conventional commit messages from staged changes.
SkillDFreshness: D★ 11Claude Code +9 - 0.477score
discord
Claude-Code-Community-Ireland
Manage your Discord server - post announcements, create events, moderate, and more.
SkillDFreshness: D★ 11Claude Code +9
Cite this page
Hook Development skill. Agent Mart. https://agentmart.dev/skills/claude-code-community-ireland-hook-development (last updated 2026-10-24)