← ClaudeAtlas

hook-templatelisted

Generate hook script from template
claude-world/director-mode-lite · ★ 68 · AI & Automation · score 82
Install: claude install-skill claude-world/director-mode-lite
# Hook Template Generator Generate a hook script and configuration based on requirements. **Usage**: `/hook-template [hook-type] [purpose]` --- ## Hook Types | Type | When it Runs | Use Case | |------|--------------|----------| | `PreToolUse` | Before a tool runs | Block, validate, add context | | `PostToolUse` | After a tool completes | Log, notify, react | | `UserPromptSubmit` | User submits a prompt | Context injection, validation | | `Stop` | Main agent stopping | Completeness check, continue loops | | `SubagentStop` | Subagent finishes | Task validation | | `SessionStart` | Session begins | Context loading, env setup | | `SessionEnd` | Session ends | Cleanup, logging | | `PreCompact` | Before context compaction | Preserve critical context | | `PostCompact` | After compaction completes | Context recovery | | `Notification` | User is notified | External alerts (Slack, etc.) | | `Elicitation` | MCP server requests input | Override elicitation | | `ElicitationResult` | Elicitation result available | Post-process | --- ## Hook Config Fields | Field | Type | Required | Default | Notes | |-------|------|----------|---------|-------| | `type` | String | Yes | - | `"command"` or `"prompt"` | | `command` | String | If type=command | - | Shell command to execute | | `prompt` | String | If type=prompt | - | Natural language prompt for LLM | | `timeout` | Integer | No | 60s (command), 30s (prompt) | Seconds | | `once` | Boolean | No | false | Run hook only once per session |