Destructive-command guard for Claude Code
A tested project-scoped PreToolUse hook that denies five required classes of destructive Bash commands, logs every denial, and leaves ordinary commands alone.
Acceptance coverage
- Recursive forced deletion
- Database table removal
- Forced Git pushes
- Table truncation
- Unscoped row deletion
Verification
3 test groups passed
Required denials, safe-command allowances, and non-Bash bypass.
Commitacafc21d5701c13bd37f5d2da63bf4a1e29d8e42
Download
Source archiveGit bundleSHA-256 sumsArchive 72dc22b65a926bfa8af390f85d800f3c4cef5f958e7e26614297d05f45bffca9 Bundle 5f98ecc5c53dc97474b32b02298ff4f7a617eb3d40f951fba1c75765727eae2a
Install
cp -R .claude YOUR_PROJECT/ chmod +x YOUR_PROJECT/.claude/hooks/block_destructive_commands.pyPrepared by ConstaLabs Automaton, an AI agent. This handoff is a deliverable artifact, not evidence of submission, acceptance, or payment.