qmetrics.net

Destructive Command Guard

Rust hook blocking destructive commands for AI coding agents

dcg intercepts shell, git, and filesystem commands before AI coding agents run them, with modular security packs, explain mode, and installers for many agent products.

Overview

Destructive Command Guard (dcg) is a Rust-based hook that runs before AI coding agents execute shell commands. It blocks destructive git, filesystem, database, container, cloud, and related operations according to configurable rule packs, and reports denials with explanations while keeping machine-readable hook output on stdout.

The tool integrates with many coding agents through install commands that merge PreToolUse or equivalent hooks into each product's configuration. Supported agents named in the source include Claude Code, Codex CLI, Gemini CLI, GitHub Copilot CLI, VS Code Copilot Chat, Cursor, Hermes Agent, Grok, Antigravity, OpenCode, Oh My Pi, Crush, Reasonix, Muse Code, Amp, and others, with agent-specific profiles adjusting packs and allowlists.

Default packs guard core filesystem and git mistakes, disk formatting commands, and on Windows additional filesystem and volume-shadow protections. Optional packs cover Kubernetes, Docker, Terraform, cloud providers, databases, and more. Features include heredoc and inline script scanning, smart context detection, scan mode for CI, explain mode, allowlists, and bypass controls for intentional exceptions.

Installers for Linux, macOS, WSL, and native Windows download verified binaries and configure detected hooks. The relay emphasizes low latency filtering and bounded failure behavior when analysis times out.

Key features

  • Pre-execution blocking for agent shell tools
  • More than fifty modular security packs
  • Heredoc and inline script scanning
  • Explain mode for blocked commands
  • CI scan mode for repository review
  • Agent-specific profiles and installers
  • Allowlists and one-shot bypass options
  • Windows and POSIX command coverage

Use cases

  • Protecting repos from agent git resets
  • Guarding databases and Kubernetes from agents
  • Standardizing hooks across multiple AI CLIs
  • CI checks for dangerous embedded commands
  • Reviewing why a command was denied

Tags

Similar software

Claude-BugHunter

Claude Code skill pack for authorized bug hunting

Installs eighty-four auto-loading security skills, slash commands, and engagement tooling so Claude Code assists web, API, and external red-team testing within enforced scope.

★ 25.7k⟳ yesterdayMIT
AI Assisted CodingDesktop/CLI app

Codex Security

CLI and SDK for AI-assisted vulnerability scanning

Codex Security scans repositories for vulnerabilities, validates findings, drafts patches, and exports reports. Use the CLI, TypeScript SDK, Codex plugin, or GitHub Action.

★ 14.4k⟳ 3 days agoApache-2.0
AI Assisted CodingDesktop/CLI app

Mantis

AI agent toolkit for vulnerability discovery and patching

Portable skills plus an ADK reference harness let coding agents threat-model, scan, reproduce, and patch issues across many stacks. Intended only for isolated, restricted environments.

★ 2.8k⟳ todayApache-2.0
AI Assisted CodingDesktop/CLI app

REA

MCP and CLI reverse-engineering toolkit for agents

REA connects coding agents and terminals to local analysis tools for binaries, Electron apps, websites, .NET, and Android targets. Setup registers MCP access and investigation skills via npm.

★ 480.8k⟳ todayMIT

Superpowers

Agent skills methodology for disciplined coding

Superpowers adds composable skills and bootstrap instructions so coding agents brainstorm specs, plan in small tasks, follow test-driven development, and review work. Plugins install into many agent marketplaces and CLIs.

★ 328.1k⟳ 24 days agoMIT

ECC

Open-source agent engineering toolkit for coding harnesses

ECC adds planning, verification, review, memory, skills, and security scanning to coding agents such as Claude Code, Codex, and Cursor. It installs as plugins, packages, and managed adapters across multiple harnesses.

★ 311.7k⟳ 8 days agoMIT
Frameworks & PlatformsDesktop/CLI app