Claude Code Guardrails
Production-ready hooks that stop Claude Code from running anything irreversible.
Blocks rm -rf /, force pushes, git reset --hard, DROP TABLE, DELETE with no WHERE, curl | sh, and writing a live AWS, GitHub, Stripe or Slack key into your source. Ordinary work — npm install, pytest, a push to your own branch — passes untouched.
What's included:
• 7 hooks, each implemented twice — PowerShell for Windows, bash for macOS and Linux
• 96 runnable tests, so you can verify it before you trust it
• A security-review subagent and a /guardrails-audit skill
• Installers that back up and merge your existing config instead of replacing it
• A local audit trail — one JSON line per tool call, and nothing leaves your machine
• Full guide in English and Spanish
No dependencies. No jq. MIT licensed, yours to modify.
Guardrails reduces the blast radius of an agent working in your repository. It's a safety net, not a sandbox — keep working in version control and reading your diffs.