Custom Hooks

Customize your vibe coding workflow with powerful hooks for Claude Code. Automate notifications, actions, and integrations.

What are Custom Hooks?
Claude Code hooks are shell commands that execute in response to events like tool calls, session start, or agent completion. These hooks live in ~/.claude/settings.json and can automate your workflow.

More hooks coming soon...

Slack notifications, Telegram alerts, auto-commit, and more!

Hook Coverage

ClaudeKit ships with 13 hooks in stable and 15 hooks in beta. All hooks are composable via a shared utility library.

13 hooks — stable 15 hooks — beta

Hook Utility Library

All hooks share a set of utility modules under hooks/lib/. These handle common concerns so each hook stays focused.

ck-config-utils Read/validate .ck.json configuration
colors ANSI color formatting for terminal output
config-counter Track skills, hooks, agents counts
context-builder Build session context with WARN 70%/CRITICAL 90% thresholds
git-info-cache Cache git status for performance
hook-logger Structured logging for hooks
privacy-checker Block access to sensitive files (.env, credentials)
project-detector Detect project type and package manager
scout-checker Check if scout agents are available
transcript-parser Parse Claude conversation transcripts

Beta Hooks

Beta

Two new hooks ship in beta along with a new Stop lifecycle event.

session-state.cjs

Persist and restore session progress across compactions. Saves last active plan, todo items, subagent outputs, and branch/commit status to .claude/session-state/.last-state.md. Triggers: SessionStart (load), Stop/SubagentStop (persist). 159 lines.

plan-format-kanban.cjs

Validate plan.md link formatting. Triggers: PostToolUse on Write/Edit operations. 61 lines.

New: Stop lifecycle event

Beta adds a Stop trigger that fires when a session ends. Used by session-state.cjs to persist state before shutdown.

Test Structure: Tests migrated from hooks/tests/ → hooks/__tests__/ (Jest-like pattern) for better tooling compatibility.

Learn more about ClaudeKit built-in hooks at ClaudeKit Documentation