agentsclimarketplace

Hooks check

Skill claude-world/director-mode-lite/skills/hooks-check

Validate hooks configuration and scripts. Use after adding or editing hooks in settings.json, before committing hook changes, or when a hook fails to fire.From its SKILL.md

Install
npx -y skills add claude-world/director-mode-lite --skill hooks-check

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

3.3 KB, 845 tokens by cl100k_base, as published. Nobody here has run it

Hooks Validator

Validate hooks configuration in .claude/settings.json and hook scripts against the official Claude Code spec.


Validation Steps

1. Check settings.json

Verify the hooks section exists and is valid.

2. Validate Hook Event Names

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).

GroupEvents
LifecycleSessionStart, SessionEnd, Setup
PromptUserPromptSubmit, UserPromptExpansion
ToolPreToolUse, PostToolUse, PostToolUseFailure, PostToolBatch
PermissionPermissionRequest, PermissionDenied
SubagentSubagentStart, SubagentStop
StopStop, StopFailure
TaskTaskCreated, TaskCompleted
CompactionPreCompact, PostCompact
NotificationNotification, MessageDisplay
MCP elicitationElicitation, ElicitationResult
EnvironmentConfigChange, CwdChanged, FileChanged, InstructionsLoaded, WorktreeCreate, WorktreeRemove, TeammateIdle

That is all 30 events. See the official hooks docs for each event's payload.

3. Validate Each Hook Entry

  • type is one of: command, prompt, http, mcp_tool, agent (default command)
  • If type: command: command path exists and script is executable
  • If type: prompt: prompt string is non-empty
  • matcher 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 present
  • if / statusMessage are strings if present

4. Validate Hook Scripts

  • File exists and is executable
  • Has an appropriate shebang
  • If the script emits structured output on stdout, it is valid JSON. Silent / exit-code-only hooks are valid — no stdout is required (exit 0 = allow/continue, exit 2 = block for PreToolUse).

Decision Output Schema

When a script does emit JSON, validate it against the event contract:

  • PreToolUse: hookSpecificOutput.permissionDecision is allow, deny, or ask. The legacy top-level {"decision": "approve" | "block"} is still accepted.
  • Stop / SubagentStop: continuation uses {"decision": "block", "reason": "<next prompt>"} — the key is reason.
  • Input JSON always carries the event under hook_event_name (not hook_type).

Output Format

## 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]

Auto-Fix

  • Make scripts executable
  • Add missing shebang
  • Create missing hook scripts
  • Correct a misspelled event name to the nearest valid event
  • Normalize hook_type -> hook_event_name in emitted JSON

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Gives 0 of the 12 instructions most quality gates skills give in 845 tokens

Counted across 1,524 of the 2,830 authors here whose files we hold, read 2026-09-06

  • Read full output and check exit codein 45 of 1524, across 40 files
  • Verify output confirms the claimin 44 of 1524, across 39 files
  • Identify the command that proves the claimin 43 of 1524, across 39 files
  • Execute the full verification commandin 36 of 1524, across 30 files
  • Produce a verification reportin 34 of 1524, across 18 files
  • Review git diff changesin 30 of 1524, across 16 files
  • Fix build failures immediatelyin 29 of 1524, across 9 files
  • Group findings by severityin 28 of 1524
  • State claim only with evidencein 27 of 1524, across 22 files
  • Verify regression tests with red-green cyclein 26 of 1524, across 22 files
  • Run the full test suitein 26 of 1524, across 25 files
  • Run test suite with coveragein 25 of 1524, across 10 files

Said here and by no other author read

  • Validate hook event names against the official list
  • Ensure prompt strings are non-empty
  • Validate matcher types and timeout values
  • Verify scripts have an appropriate shebang
  • Validate structured output against the event contract
  • Add missing shebangs to scripts

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.