add_hooklisted
Install: claude install-skill VytCepas/project-init
> **Claude Code specific**: this skill manages Claude Code configuration
> (settings.json wiring). Other agents do not consume what it produces.
## Step 0 — Confirm the current schema (best-effort)
The event names and output schema below are a snapshot and can lag Claude Code
releases. **If** a docs-lookup tool is available to you — the Context7 MCP, or
WebFetch when it's permitted — confirm the event name / output field against the
current reference (<https://docs.agents.com/en/docs/claude-code/hooks>) before
relying on it. This skill's `allowed-tools` does not grant those tools, so skip
this step cleanly whenever the tool is unavailable, unapproved, egress is
disabled (`--no-egress` / air-gapped), or the lookup fails — fall back to the
embedded reference below. Don't request extra permissions and never block on it.
## Step 1 — Choose an event
Pick the event that matches when the hook should fire:
**Tool execution** (most common):
- `PreToolUse` — before a tool runs; output block JSON to block it
- `PostToolUse` — after a tool runs; cannot block, can log or validate
- `PostToolBatch` — after a batch of parallel tool calls completes
- `PostToolUseFailure` — after a tool fails
- `PermissionRequest` — when Claude asks for permission; can auto-approve
- `PermissionDenied` — when permission is denied; can request a retry
**Session lifecycle:**
- `SessionStart` — when a session begins
- `SessionEnd` — when a session closes
- `PreCompact` — before context compaction (can blo