destructive_command_guard

Block destructive git, filesystem, and database commands from AI coding agents.

2|Updated May 30, 2026
One-click install
npx skills add https://github.com/quangdang46/destructive_command_guard --skill destructive-command-guard-quangdang46
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: destructive_command_guard
Source: https://github.com/quangdang46/destructive_command_guard/tree/main
Command: npx skills add https://github.com/quangdang46/destructive_command_guard --skill destructive-command-guard-quangdang46

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires serde, serde_json, serde_yaml, toml, toml_edit, fancy-regex, regex, memchr, aho-corasick, colored, clap, chrono, ast-grep-core, ast-grep-language, fsqlite, rust-mcp-sdk, tokio, ratatui, comfy-table, indicatif, console, self_update, vergen-gix, tracing, tracing-subscriber, sha2, hmac, flate2, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill blocks destructive commands executed by AI coding agents, preventing accidental deletion or modification of your codebase.

Core Features & Use Cases

  • Command Blocking: Blocks dangerous git, filesystem, database, and other commands before they execute.
  • Safe Patterns: Allows common commands while blocking destructive ones.
  • Modular Packs: Organizes destructive command patterns by category for flexible configuration.
  • Integration: Integrates with various AI coding agents like Claude Code, Codex CLI, Gemini CLI, and more.
  • Use Case: Use this Skill to protect your code from accidental 'git reset --hard' or 'rm -rf ./src' commands.

Quick Start

Use the destructive_command_guard skill to block the 'rm -rf ./src' command.

Frequently Asked Questions about destructive_command_guard

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I block destructive git commands executed by AI coding agents?

Blocking destructive git commands from AI coding agents requires intercepting dangerous operations like 'git reset --hard' before execution. This Skill applies modular pattern packs to identify and block these commands in code repositories and administrative workflows.

What is the best way to prevent accidental filesystem deletion when using AI coding tools?

Preventing accidental filesystem deletion like 'rm -rf ./src' is achieved by configuring safe pattern packs that allow common commands while specifically blocking destructive filesystem operations executed by AI agents.

Does this command blocking Skill integrate with Claude Code and Gemini CLI?

Yes, this command blocking Skill integrates with various AI coding agents including Claude Code, Codex CLI, and Gemini CLI, requiring specific configuration to intercept destructive commands within those environments.

How do I configure modular packs to block database and filesystem protection patterns?

Configuring modular packs involves selecting destructive command patterns organized by category, allowing you to flexibly apply database protection and filesystem protection rules while permitting safe commands.

Can I allow safe commands while blocking destructive database operations in my repository?

Yes, the Skill allows safe commands to execute normally while actively blocking destructive database operations, using regex and AST-based pattern matching to distinguish between safe and dangerous command categories.