guardrail-hookslisted
Install: claude install-skill AlpayC/claude-skill-set
# Guardrail hooks
Everything in the context window is a suggestion. Compliance drops as a session grows — which is exactly the condition unattended work creates. For the rules that must not be optional, prose is the wrong instrument.
`agentic-guardrails` says *why* each rule exists and what the right answer is. These hooks make four of them mechanical. Both are needed: a hook that blocks without explaining teaches nothing, and prose that explains without blocking holds only while attention lasts.
## What is installed
| Hook | Event | Enforces |
|---|---|---|
| `block-dangerous.mjs` | PreToolUse / Bash | No pushing or publishing without a human; no `reset --hard`, `clean -f`, `branch -D`, `checkout .`, `rm -rf`; no `--force` or `--legacy-peer-deps` to move past an error |
| `guard-paths.mjs` | PreToolUse / Write, Edit | `.env` and generated output are never hand-edited; writes outside the spec's blast radius go to the human |
| `check-shortcuts.mjs` | PostToolUse / Write, Edit | `any`, `@ts-ignore`, bare `@ts-expect-error`, `eslint-disable`, `.skip`, `.only`, test retries — reported back with the real fix |
| `require-evidence.mjs` | Stop | A run marked running does not end without `gates.md` and a ledger |
The Stop hook blocks **once** per run. It says what is missing; stopping again is allowed. A guardrail that can trap a session is worse than none, because the next person disables the whole set.
## Install
```bash
node hooks/install-hooks.mjs <repo> # team