hook-developerlisted
Install: claude install-skill parcadei/Continuous-Claude-v3
# Hook Developer
Complete reference for developing Claude Code hooks. Use this to write hooks with correct input/output schemas.
## When to Use
- Creating a new hook
- Debugging hook input/output format
- Understanding what fields are available
- Setting up hook registration in settings.json
- Learning what hooks can block vs inject context
## Quick Reference
| Hook | Fires When | Can Block? | Primary Use |
|------|-----------|------------|-------------|
| **PreToolUse** | Before tool executes | YES | Block/modify tool calls |
| **PostToolUse** | After tool completes | Partial | React to tool results |
| **UserPromptSubmit** | User sends prompt | YES | Validate/inject context |
| **PermissionRequest** | Permission dialog shows | YES | Auto-approve/deny |
| **SessionStart** | Session begins | NO | Load context, set env vars |
| **SessionEnd** | Session ends | NO | Cleanup/save state |
| **Stop** | Agent finishes | YES | Force continuation |
| **SubagentStart** | Subagent spawns | NO | Pattern coordination |
| **SubagentStop** | Subagent finishes | YES | Force continuation |
| **PreCompact** | Before compaction | NO | Save state |
| **Notification** | Notification sent | NO | Custom alerts |
**Hook type options:** `type: "command"` (bash) or `type: "prompt"` (LLM evaluation)
---
## Hook Input/Output Schemas
### PreToolUse
**Purpose:** Block or modify tool execution before it happens.
**Input:**
```json
{
"session_id": "string",
"transcript_path": "string",
"cwd