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 mhenke
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/mhenke-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
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Shell scripts
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/hook-development
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 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 coding assistant 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
- 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 coding assistant Plugins
## Overview
Hooks are event-driven automation scripts that execute in response to coding assistant 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 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 hook-config.json Format
**For plugin hooks** in `hooks/hook-config.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": "PLUGIN_ROOT/scripts/validate.sh"
}
]
}
]
}
}
```
### Settings Format (Direct)
**For user settings** in `.agent/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 hook-config.json, wrap these in `{"hooks": {...}}`.
## Hook Events
### PreToolUse
Execute before any tool runs. Use to approve, deny, or modify tool calls.From mhenke/claude-code-unplugged, MIT.
More from mhenke/claude-code-unplugged
- 0.502score
claude-opus-4-5-migration
mhenke
Migrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5.
SkillCFreshness: C★ 1Claude Code +9 - 0.496score
security-guidance
mhenke
Security warnings, patterns scanner, and LLM diff security reviews
SkillCFreshness: C★ 1Claude Code +9 - 0.493score
ralph-wiggum
mhenke
Iterative feedback loop commands
SkillCFreshness: C★ 1Claude Code +9 - 0.493score
github-management
mhenke
Issue and pull request lifecycle automation scripts
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
learning-output-style
mhenke
Prompts users for lightweight contributions to encourage learning
SkillCFreshness: C★ 1Claude Code +9 - 0.488score
commit-commands
mhenke
Git commit and repository workflows
SkillCFreshness: C★ 1Claude Code +9 - 0.488score
code-review
mhenke
Automated PR and code reviewer guidelines
SkillCFreshness: C★ 1Claude Code +9 - 0.486score
explanatory-output-style
mhenke
Provides educational insights and explanations during code execution
SkillCFreshness: C★ 1Claude Code +9 - 0.484score
hookify
mhenke
Extensible user-configured prompt hooks
SkillCFreshness: C★ 1Claude Code +9 - 0.479score
agent-sdk-dev
mhenke
Help developers build Agent SDK applications
SkillCFreshness: C★ 1Claude Code +9 - 0.479score
pr-review-toolkit
mhenke
Comprehensive code review toolkit
SkillCFreshness: C★ 1Claude Code +9 - 0.479score
plugin-dev
mhenke
Development assistance for creating CLI plugins
SkillCFreshness: C★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Jun 18, 2026 (4 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/mhenke/claude-code-unplugged
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from mhenke
- 0.502score
claude-opus-4-5-migration
mhenke
Migrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5.
SkillCFreshness: C★ 1Claude Code +9 - 0.496score
security-guidance
mhenke
Security warnings, patterns scanner, and LLM diff security reviews
SkillCFreshness: C★ 1Claude Code +9 - 0.493score
github-management
mhenke
Issue and pull request lifecycle automation scripts
SkillCFreshness: C★ 1Claude Code +9 - 0.493score
ralph-wiggum
mhenke
Iterative feedback loop commands
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
learning-output-style
mhenke
Prompts users for lightweight contributions to encourage learning
SkillCFreshness: C★ 1Claude Code +9 - 0.488score
code-review
mhenke
Automated PR and code reviewer guidelines
SkillCFreshness: C★ 1Claude Code +9
Cite this page
hook-development skill. Agent Mart. https://agentmart.dev/skills/mhenke-hook-development (last updated 2026-10-24)