Dicklesworthstone/destructive_command_guard
A Rust-based hook that intercepts and blocks dangerous git and shell commands before they execute in AI coding agent environments.

The Destructive Command Guard (dcg) provides a safety layer for AI coding assistants by hooking into supported agents and preventing execution of risky operations like force-pushes, destructive git operations, or dangerous shell commands. It supports a wide range of AI coding tools including Claude Code, Codex CLI, Gemini CLI, GitHub Copilot CLI, Cursor, and others. The tool runs as a high-performance Rust binary that can be installed via a simple script and automatically configures compatible agent hooks.