block-destructive-commands 0.2.0

Denies Bash commands that match destructive patterns (recursive rm on roots, force push, hard reset, destructive SQL, disk formatting) before they run. A tool.call hook with a Bash matcher that returns { deny } without calling next.

claude-code-templates 32,507 on davila7/claude-code-templates

Install

Terminal
git clone https://github.com/davila7/claude-code-templates.git
claude --plugin-dir claude-code-templates/cli-tool/components/mods/security/block-destructive-commands

Run in a terminal. Claude Code loads the mod from that folder for the session.

Hooks into

  • Tool calls

Also in davila7/claude-code-templates

More guardrails mods

All guardrails mods
Repo stars
32,507
Repo forks
3,739
License
MIT
Last commit
Checked
c0ca7da,
Source on GitHub