Prevent accidental destructive operations
hooks-safetypluginsetup L2★3,035
davepoon/buildwithclaude ↗What it does
Prevent rm, force-push, credential leak, and other destructive operations
Best for
Teams using Claude Code with destructive git and shell operations where accidental force-push or rm -rf would be catastrophic (startups, financial systems).
Inputs
- · command about to execute (implicit from hook intercept)
Outputs
- · permission prompt (if destructive)
- · warning message (rationale for block)
- · alternative command suggestion (optional)
Preconditions
- · hooks configured in .claude/hooks.json
- · Claude Code 2.0+ hook system active
Failure modes
- · hook misconfigured — dangerous commands bypass guard
- · user ignores prompt — proceeds with --force flag
- · false positive — benign command blocked (user frustration)
Trust signals
- · 655+ hooks (from cc-safe-setup, comprehensive coverage)
- · explicit safety targets (rm, force-push, credential leak, large files, root)
- · prompts before destruction (user confirmation required)