Claude Code hooks guard rails
Fail-closed PreToolUse, post-edit and Stop hooks that block force-pushes, .env reads and wild deletes, check each edit and run tests before done.
- 2 2 Rules
- 1 1 Skills
- – 0 MCP
These loadouts ship small, tested shell scripts that enforce rules outside the model: PreToolUse hooks that deny dangerous commands with a reason, a loop runner that stops on no progress or a false DONE, and a Terraform guard that blocks apply and destroy. Every script comes with a self-test the verifier runs.
Every one installs for Claude Code, Codex CLI, Cursor, Gemini CLI, Antigravity CLI and GitHub Copilot unless its card says otherwise.
Fail-closed PreToolUse, post-edit and Stop hooks that block force-pushes, .env reads and wild deletes, check each edit and run tests before done.
Run an agent in a Ralph-style loop with guard rails: a fresh process per pass, state in files, iteration and no-progress limits, and a check it cannot fake.
Let agents write Terraform and produce plans but never apply: a guard hook for apply, destroy and state changes, a plan summary that flags deletes, pinned providers.
Looking for something narrower? Search within Bash or filter everything.