destructive_command_guard 0.4.5

A Claude Code hook that blocks destructive commands before they execute
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
  "command": "git reset --hard",
  "decision": "deny",
  "rule_id": "core.git:reset-hard",
  "pack_id": "core.git",
  "pattern_name": "reset-hard",
  "reason": "git reset --hard destroys uncommitted changes. Use 'git stash' first.",
  "source": "pack",
  "matched_span": [
    0,
    16
  ],
  "agent": {
    "detected": "unknown",
    "trust_level": "medium",
    "detection_method": "none"
  }
}