Install the safety net into Claude Code
何时使用: You've been bitten by an agent overwriting uncommitted changes.
步骤
-
Wire hooksRun the included setup; settings.json gets PreToolUse entries.✓ 已复制→ Hooks active
-
TestAsk Claude to
git reset --hard; expect block.✓ 已复制→ Block triggered
结果: Destructive ops require explicit override.