safety-guard

Intercept destructive commands and lock file edits outside designated directories.

3|Updated Apr 9, 2026
One-click install
npx skills add https://github.com/rlagycks/oh-my-forge --skill safety-guard-rlagycks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: safety-guard
Source: https://github.com/rlagycks/oh-my-forge/tree/main/skills/safety-guard
Command: npx skills add https://github.com/rlagycks/oh-my-forge --skill safety-guard-rlagycks

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill prevents accidental or intentional destructive operations on production systems and sensitive directories, protecting critical infrastructure and data integrity.

Core Features & Use Cases

  • Destructive Command Interception: Warns or blocks commands like 'rm -rf', 'git push --force', or 'DROP TABLE' commands before execution.
  • File Edit Locking: Locks file changes outside specified directories to maintain focus and prevent accidental modifications.
  • Max Safety Mode: Combines command warnings and directory lockdown for comprehensive protection during autonomous operations in software development, deployment, or data management scenarios.
  • Use Case: Use this Skill to ensure a deployment script cannot accidentally delete important data or overwrite critical files during an automated release process.

Quick Start

Enable protection modes and define restricted directories to prevent destructive edits and commands on critical project folders.

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 like rm -rf or git push --force during automated deployment?

Destructive command interception captures high-risk execution requests like rm -rf, git push --force, or DROP TABLE and blocks them before they run, ensuring operational integrity and protecting production infrastructure from accidental or malicious damage.

Can I lock file modifications outside designated directories during development?

Yes, you can lock file modifications outside designated directories by enabling file edit locking, a mode that freezes changes to critical folders and maintains focus by preventing accidental modifications to sensitive project files.

What is the best way to protect production environments from accidental data deletion in deployment scripts?

The best way to protect production environments is to enable a max safety mode that combines destructive command warnings with directory lockdown, safeguarding critical infrastructure and data integrity during automated software release processes.

Does max safety mode work for both autonomous operations and manual software development?

Yes, max safety mode works for both autonomous operations and manual software development by combining command warnings and directory lockdown to provide comprehensive protection across various data management and deployment scenarios.

How do I configure restricted directories to prevent destructive edits on critical project folders?

You can configure restricted directories by enabling protection modes and defining specific folders as off-limits, which locks file changes and intercepts destructive commands to maintain operational integrity across critical project folders.