Lifecycle Hooks
7 Automation Hooks
Node and Bash scripts, all dispatched through run-hook.js, that run automatically at key points during a Claude Code session — from startup to shutdown. Optional private hooks live in a gitignored local/ layer.
session-start-pull.sh
Runs in the background (async), at most once per PULL_INTERVAL_HOURS (default 24). Fast-forward pulls the toolkit, the marketplace clones, and optionally your project repos. Never commits, pushes, or merges, and logs to a file instead of Claude's context. /pull-repos forces a pull.
session-start-repo-health.sh
Checks local git state (no network) and prints a short banner only when a repo is behind, unpushed, dirty, diverged, or detached. Silent when everything is clean.
guard.js
Blocks a short list of footguns with a structured deny: rm -rf on / or ~, force push, reset --hard, git clean, discarding all changes, curl | sh, destructive SQL, package publishing, AI attribution trailers, and writes to .env, credential, key, .git/, or node_modules files. Everything else passes silently.
secret-scan.js
Scans the file just written for strings that look like real credentials (AWS, OpenAI/Anthropic, GitHub, GitLab, Slack tokens, private keys) and tells Claude via additionalContext so it removes them before committing. Never blocks.
session-end-repo-health.sh
Walks the same repos at exit, in the background. In repos owned by the configured GITHUB_OWNERS it commits pending changes as a checkpoint, then pushes (optionally through REPO_PUSH_COMMAND). It skips repos that are mid-merge, conflicted, held by a build (<git-dir>/checkout-hold), or whose changes look like a secret. Report-only when GITHUB_OWNERS is unset.
daily-maintenance.js
At most daily, schedules a background usage rollup and the configured repository maintenance sweep. Public output contains no transcripts; private runtime data is not part of the toolkit inventory.
statusline.js
Draws model, effort, folder and branch, context %, 5h/7d usage, and cost under the prompt. Rendered by the client and never sent to Claude, so it costs zero tokens.