본문으로 건너뛰기
cccskills
무료GitHub에 공개

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.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md3.3 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

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

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Validate custom agent file format and structure. Use after creating or editing an agent, before committing agent changes, or when an agent fails to load.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

claude-world/director-mode-lite802026년 8월 31일 업데이트

Generate custom agent from template. Use when creating a new subagent from scratch, or scaffolding an agent file with correct frontmatter.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

claude-world/director-mode-lite802026년 8월 31일 업데이트

agents

무료

List all available agents (core, expert, self-evolving). Use when the user asks what agents are available or runs /agents.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

claude-world/director-mode-lite802026년 8월 31일 업데이트

auto-loop

무료

TDD-based autonomous development loop with checkpoint recovery and observability changelog

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

claude-world/director-mode-lite802026년 8월 31일 업데이트

changelog

무료

View and manage the runtime changelog for observability

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

claude-world/director-mode-lite802026년 8월 31일 업데이트

Track development session events in a daily markdown changelog, including file changes, test results, and key decisions.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

claude-world/director-mode-lite802026년 8월 31일 업데이트

claude-world의 스킬 모두 보기

이 스킬의 문제 신고