Reference

Hooks

The plugin hooks and what they enforce.

Hooks are silent outside agent-kit projects and never block on their own errors.

EventMatcherScriptWhat it does
SessionStart—session-start.mjsSessionStart hook: injects the project profile (voice, language, git flow, method, work lanes), a compact knowledge index and the script index. Silent outside agent-kit projects.
PreToolUseBashgit-guard.mjsPreToolUse(Bash) hook: blocks git commands the project's git flow forbids. Exit 2 blocks the call and shows stderr to Claude. Silent outside agent-kit projects.
PostToolUseWritescript-nudge.mjsPostToolUse(Write) hook: when the agent writes a script somewhere it will be lost (outside the project, at the project root, or in a tmp folder), remind it of the scripts skill so the script is found and reused next time.
Stop—checkpoint.mjsStop hook: after every turn (sync: async hooks are dropped when a headless run exits), saves where the work stands so the next session can resume — branch, changed files, active work. Silent; never fails.