destructive-change-guard

Enforce gated safety checks before destructive file and data operations.

1|Updated Apr 23, 2026
One-click install
npx skills add https://github.com/shawns-yao/destructive-change-guard --skill destructive-change-guard
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: destructive-change-guard
Source: https://github.com/shawns-yao/destructive-change-guard/tree/main
Command: npx skills add https://github.com/shawns-yao/destructive-change-guard --skill destructive-change-guard

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Destructive Change Guard prevents AI agents from accidentally removing or overwriting user-owned information that is hard to recover, such as code logic, documentation, config meaning, or records.

Core Features & Use Cases

  • Light vs strong protection modes: uses a fast path for clearly low-risk, tightly scoped changes and a full gated workflow for medium/high-risk destructive work.
  • Stop-first safety rule: immediately halts when the request matches never-auto-execute destructive patterns (e.g., rm -rf, git reset --hard, git clean, DELETE/DROP/TRUNCATE).
  • Structured risk assessment and recovery gate: classifies target, change type, information-loss risk, recoverability, ownership, and scope, and then requires recovery readiness for medium/high risk.

Quick Start

Use this skill when you suspect your task might delete, rewrite, or bulk-modify existing content: Ask your agent to run destructive-change-guard before performing any destructive or scope-unclear changes.

Frequently Asked Questions about destructive-change-guard

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

FAQPage Schema
How do I prevent AI agents from accidentally deleting or overwriting code and config files?▼

To prevent accidental data loss, you can enforce gated safety checks for destructive changes. This requires AI agents to stop and assess recovery readiness before executing medium or high-risk operations like deletes, resets, or bulk replacements.

What is a recovery gate when performing destructive git operations like hard resets?▼

A recovery gate is a structured safety checkpoint that classifies risk, recoverability, and scope before executing destructive git operations. It ensures recovery readiness is verified for medium and high-risk changes, preventing irreversible information loss.

How to classify risk before running bulk replacements or rollbacks on existing documentation?▼

Risk classification involves assessing the target, change type, information-loss potential, and scope of bulk replacements or rollbacks. Medium and high-risk documentation changes require passing a structured recovery gate before execution.

Does the stop-first safety rule automatically block all destructive commands like rm -rf and git clean?▼

Yes, the stop-first safety rule immediately halts never-auto-execute patterns like rm -rf, git reset --hard, and git clean. This prevents accidental removal of user-owned information by requiring manual confirmation before proceeding.

Can I use a fast path for low-risk tightly scoped changes alongside strong protection for destructive ones?▼

Yes, light and strong protection modes allow a fast path for clearly low-risk, tightly scoped changes while enforcing a full gated workflow with recovery templates for medium and high-risk destructive work.

What are the limitations of using automated change control for scope-unclear cleanups?▼

Automated change control for scope-unclear cleanups requires halting execution immediately. Operations lacking clear scope cannot auto-execute and must pass structured risk assessment and recovery readiness checks to prevent data loss.