dangerous-command-guard¶
PreToolUse guard that blocks obviously dangerous shell commands.
Trigger¶
- Event:
PreToolUse - Matcher:
Bash
What it blocks¶
rm -rf /and~/$HOMEvariantsgit push --force/-fgit reset --hardchmod -R 777dd of=/dev/sd*/nvme*/disk*cat/tail/headonid_rsa/id_ed25519/*.pemcat/grep/sedon.envcurl ... | shandwget ... | sh
Exit codes¶
0— allow2— block
Kill switches¶
CLAUDE_HARNESSES_DISABLE=1
Notes¶
Pattern matches are intentionally narrow to minimize false positives. Operators on /dev/loop*, /dev/xvd*, /dev/mapper/* are not matched — widen the regex if your environment exposes those.
Pack: safety-pack