From director-mode-lite
Validates hooks configuration in .claude/settings.json and hook scripts against the official Claude Code spec. Use after editing hooks or when a hook fails to fire.
How this skill is triggered — by the user, by Claude, or both
Slash command
/director-mode-lite:hooks-checkThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Validate hooks configuration in `.claude/settings.json` and hook scripts against
Validate hooks configuration in .claude/settings.json and hook scripts against
the official Claude Code spec.
Verify the hooks section exists and is valid.
Claude Code defines 30 hook events. Accept any of them; flag unknown names
with a typo hint (e.g. PrePromptSubmit -> UserPromptSubmit,
PostToolBatchFailure -> PostToolBatch, SubagentStarts -> SubagentStart).
| Group | Events |
|---|---|
| Lifecycle | SessionStart, SessionEnd, Setup |
| Prompt | UserPromptSubmit, UserPromptExpansion |
| Tool | PreToolUse, PostToolUse, PostToolUseFailure, PostToolBatch |
| Permission | PermissionRequest, PermissionDenied |
| Subagent | SubagentStart, SubagentStop |
| Stop | Stop, StopFailure |
| Task | TaskCreated, TaskCompleted |
| Compaction | PreCompact, PostCompact |
| Notification | Notification, MessageDisplay |
| MCP elicitation | Elicitation, ElicitationResult |
| Environment | ConfigChange, CwdChanged, FileChanged, InstructionsLoaded, WorktreeCreate, WorktreeRemove, TeammateIdle |
That is all 30 events. See the official hooks docs for each event's payload.
type is one of: command, prompt, http, mcp_tool, agent (default command)type: command: command path exists and script is executabletype: prompt: prompt string is non-emptymatcher is a string if present (tool events: tool name, regex, or *)timeout is a positive integer if present (default: 60s per hook)once is boolean if presentif / statusMessage are strings if present0 = allow/continue, exit 2 = block for PreToolUse).When a script does emit JSON, validate it against the event contract:
hookSpecificOutput.permissionDecision is allow, deny, or
ask. The legacy top-level {"decision": "approve" | "block"} is still accepted.{"decision": "block", "reason": "<next prompt>"} — the key is reason.hook_event_name (not hook_type).## Hooks Validation Report
### Configuration Status: VALID / INVALID
### Configured Hooks
| Event | Matcher | Script | Status |
|-------|---------|--------|--------|
| Stop | * | auto-loop-stop.sh | OK |
### Script Validation
| Script | Exists | Executable | Output |
|--------|--------|------------|--------|
| auto-loop-stop.sh | OK | OK | JSON OK / silent |
### Issues Found
1. [Issue and fix]
hook_type -> hook_event_name in emitted JSONnpx claudepluginhub claude-world/director-mode-lite --plugin director-mode-liteScaffolds Claude Code hooks with templates, validation, and conflict analysis. Analyzes existing hooks, prevents conflicts, and generates boilerplate code automatically.
Guides development of event-driven hooks for Claude Code plugins using prompt-based and command-based configurations in hooks.json for events like PreToolUse, PostToolUse, Stop, and SessionStart to validate tools and automate workflows.
Guides implementation of event-driven hooks in Claude Code plugins using prompt-based validation and bash commands for PreToolUse, Stop, and session events.