Reference
Hooks
The plugin hooks and what they enforce.
Hooks are silent outside agent-kit projects and never block on their own errors.
| Event | Matcher | Script | What it does |
|---|---|---|---|
SessionStart | — | session-start.mjs | SessionStart 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. |
PreToolUse | Bash | git-guard.mjs | PreToolUse(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. |
PostToolUse | Write | script-nudge.mjs | PostToolUse(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.mjs | Stop 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. |