Safety Guard

Intercept destructive commands and lock directories in production environments.

1|Updated Apr 7, 2026
One-click install
npx skills add https://github.com/Michae2xl/claude-skills-michael --skill safety-guard-michae2xl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Safety Guard
Source: https://github.com/Michae2xl/claude-skills-michael/tree/main/skills/safety-guard
Command: npx skills add https://github.com/Michae2xl/claude-skills-michael --skill safety-guard-michae2xl

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill is designed to prevent accidental and destructive operations in production systems, safeguarding against critical data loss and system instability.

Core Features & Use Cases

  • Prevent Destructive Commands: Blocks dangerous commands before they execute, providing warnings and alternatives.
  • Lock Directory Edits: Restricts file edits to specific directories, ensuring that changes are localized to intended areas.
  • Multi-Mode Protection: Offers Careful, Freeze, and Guard modes for varying levels of protection and flexibility.
  • Unlock Functionality: Allows manual override when necessary with a simple command.
  • Integration with ECC 2.0: Paired with risk scoring for enhanced observability.

Quick Start

Activate the Safety Guard with safety-guard on and protect the 'src/api/' directory with safety-guard guard --dir src/api/ --allow-read-all.

Frequently Asked Questions about Safety Guard

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

FAQPage Schema
How do I prevent destructive commands from running in production environments?

Preventing destructive operations in production environments involves intercepting harmful commands before execution and providing safe alternatives. This mechanism blocks dangerous commands to safeguard against critical data loss and system instability.

Can I lock specific directories to restrict file edits in production systems?

Yes, you can lock specific directories to restrict file edits and ensure changes remain localized to intended areas. Safety Guard provides directory locking functionality to restrict edits and maintain system integrity in automated workflows.

What protection modes are available for securing production system integrity?

Protection modes for securing production system integrity include Careful, Freeze, and Guard modes. These modes offer varying levels of protection and flexibility to prevent accidental destructive operations based on your environment's needs.

How do I temporarily override directory locks when necessary?

You can temporarily override directory locks when necessary by using a simple unlock command. Safety Guard includes unlock functionality that allows manual override of directory restrictions when administrative changes are required.

Does Safety Guard work with risk scoring systems for observability?

Yes, Safety Guard integrates with ECC 2.0 risk scoring to provide enhanced observability for production systems. This integration pairs command blocking and directory locking with risk assessment to ensure data integrity in automated workflows.

What's the best way to activate command blocking for a specific directory?

The best way to activate command blocking for a specific directory is to enable the guard mode and target the path. You can activate Safety Guard and protect directories like 'src/api/' by specifying the directory and read permissions in the command.