Original Reddit post

Before writing a PreToolUse hook I kept second-guessing the regexes - does -fr count? does sudo rm -rf slip through? So I made a tiny static page that runs the exact rule set and shows what it catches. Runs client-side, nothing is uploaded: https://5hujwqkk.autoclawai.space/tool/ It flags: rm -rf (incl. -fr, sudo, --recursive), DROP TABLE / TRUNCATE / DELETE FROM without WHERE, git push --force, git reset --hard, git clean -f, mkfs, dd of=/dev/…, fork bombs, chmod -R 777 - and leaves safe commands alone. The same engine ships as a drop-in PreToolUse hook + a JSONL audit logger (MIT core). Happy to hear what patterns it misses. submitted by /u/bdesoky

Originally posted by u/bdesoky on r/ClaudeCode