inject-rules
Adds your project's rules file to Claude's context at session start and with every prompt. Never blocks.
Thirteen Claude Code hooks, switched on per project. A rule written in a prompt can be skipped. A hook that returns exit 2 cannot. Install once; each hook stays off in every folder until that folder opts in with one config file.
Verified boundary: every hook is tested by running it as a child process with a real hook event (140 tests, Node 24 on Windows), every ported hook has a parity test against its original, and node doctor.mjs checks that the installed copy is registered and alive. A read ledger proves that files exist with the stated line counts, not that the code was understood or reused. A fresh receipt proves freshness, not a true result. measure-gate gives up after a set number of blocks so it can never loop forever.
Each one has one job. The ones labelled before tool use block a tool call. The ones labelled turn end block the end of a turn.
inject-rulesAdds your project's rules file to Claude's context at session start and with every prompt. Never blocks.
deploy-gateBlocks a deploy command until a gate file for the exact commit passes its checks.
walk-brief-guardBlocks a walk brief that breaks a rule you set, such as a missing required section.
read-ledger-gateBlocks any write to a code file until a read ledger lists the upstream files that were read, with true line counts.
db-write-guardBlocks a command that can write to a live database, unless a fresh go file is present.
no-idleBlocks the end of a turn while background workers are left unattended.
double-checkBlocks the end of a turn once, so Claude re-checks its work against a checklist. The second stop goes through.
measure-gateBlocks the end of a turn while the code is newer than the newest measurement receipt. No "done" without a number.
citation-gateBlocks the end of a turn while an audit, review or handoff cites a file the session never read. UNVERIFIED is always accepted; silence is not.
sprint-gateWhile a sprint is armed the agent cannot end the turn. Only a human with the passphrase can disarm; the cap pauses, never disarms.
command-gateBlocks a forbidden shell verb even behind sudo, a path prefix, a pipeline or sh -c. Default rule: never kill a process by name or pattern. Optional commit-size gate.
ran-before-doneRecords edits to runnable files and tool calls that ran anything. If code was edited and nothing ever ran, blocks the stop once.
wakeAfter a delay, 20 minutes by default, wakes Claude with a status list of its workers.
Needs Node.js 18 or newer. No npm packages. The installer backs up your settings file first, never duplicates entries, and leaves every other hook alone.
git clone https://github.com/scottconverse/claude-hook-kit
cd claude-hook-kit
node install.mjs
node init-project.mjs C:/dev/my-project --example agent-build
node install.mjs copies the hooks to ~/.claude/hook-kit/ and registers them in ~/.claude/settings.json..claude/hook-kit.json to the project folder. List only the hooks you want, with their settings.From examples/agent-build.hook-kit.json. No code before the upstream code was read; no "done" before a fresh measurement.
{
"read-ledger-gate": {
"upstreamRoots": ["C:/upstream/project-a", "C:/upstream/project-b"],
"mustMention": ["project-a", "project-b"],
"minEntries": 10,
"minLines": 2000
},
"measure-gate": {
"receiptDir": "work/receipts",
"receiptPattern": "^receipt-.*\\.json$",
"measureCommand": "node work/measure/run.mjs",
"maxBlocks": 3
}
}
settings.json before it changes it, and prints the backup path.A sibling kit for Codex, with the same project conventions: codex-hook-kit.