dicklesworthstone/destructive_command_guard

The Destructive Command Guard (dcg) is for blocking dangerous git and shell commands from being executed by agents.

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 15 minutes ago
Added to GitGenius on September 11th, 2026
Created on January 7th, 2026
Open Issues & Pull Requests: 12 (+0)
GitHub issues: Enabled
Number of forks: 243
Total Stargazers: 5,957 (+0)
Total Subscribers: 21 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 14.6 hours
Mean response time: 22.8 hours
90th percentile: 2.2 days
Tracked items: 261

How this project is maintained

Around half of the issues opened in the past year never receive a reply. Only 16% of issues opened in the past year have been closed. Three people close 98% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 11
New in 7 days: 20
Closed in 7 days: 11
Avg open age: 3 days
Stale 30+ days: 0
Stale 90+ days: 0

Recent activity

Opened in 7 days: 18
Closed in 7 days: 11
Comments in 7 days: 0
Events in 7 days: 1

Top labels

  • bug (16)
  • enhancement (10)
  • question (4)
  • documentation (3)
  • duplicate (1)

Detailed Description

Destructive Command Guard is a safety hook for AI coding agents that blocks dangerous git and shell commands from being executed.

The tool addresses the risk of AI agents accidentally running destructive commands that could delete or corrupt code and data. It works by intercepting commands before execution across multiple AI coding platforms including Claude Code, GitHub Copilot CLI, VS Code Copilot Chat, Cursor, Gemini CLI, Grok, and others. The hook evaluates commands against a set of dangerous patterns and prevents those matching destructive criteria from running, allowing safe commands to proceed normally.

Developers using AI agents should adopt this tool if they want an additional safety layer protecting their repositories and file systems from accidental destruction. It suits any workflow where AI agents have terminal or git access, particularly in development environments where a single errant command could cause significant data loss. The tool is designed to integrate seamlessly with existing agent setups through automated installation that detects the platform and configures hooks for supported agents.

The project is written in Rust and maintains active support across a broad ecosystem of AI agent platforms, with native integration paths for multiple tools and compatibility layers for others. Development includes ongoing expansion of platform support, as evidenced by native integrations for emerging agents and documented integration recipes for additional tools. The codebase demonstrates attention to cross-platform compatibility, with explicit support for Linux, macOS, Windows via WSL, and native Windows through separate installation methods.