Hook
Pre-Bash SQL Safety
Block destructive SQL without a paired SELECT verification.
Install
manual
add to ~/.claude/settings.json hooks.PreToolUse
Add this to your Claude Code MCP settings or run via the CLI.
About
PreToolUse hook on Bash. Detects DELETE/UPDATE/DROP/TRUNCATE without an inline SELECT to confirm impact. Returns block decision.
Common use cases
- •Prevent accidental table drops
- •Force impact verification
- •Enforce SQL hygiene
Tags
securitysqlsafety