guard

Check destructive commands and restrict file edits to a specified directory.

Updated Mar 29, 2026
One-click install
npx skills add https://github.com/Santiagoisper/BOPE_VERSION_DEFINITIVA --skill guard-santiagoisper
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: guard
Source: https://github.com/Santiagoisper/BOPE_VERSION_DEFINITIVA/tree/main/.agents/skills/gstack/guard
Command: npx skills add https://github.com/Santiagoisper/BOPE_VERSION_DEFINITIVA --skill guard-santiagoisper

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires bash, and includes scripts (resource) components.

What problem does it solve?

The guard Skill addresses the risk of accidental destructive commands and unauthorized file edits, providing an additional layer of safety when working with critical systems.

Core Features & Use Cases

  • Destructive Command Warnings: Alerts before executing rm -rf, DROP TABLE, force-push, etc.
  • Directory-Scope Edits: Restricts file edits to a specified directory.
  • Use Case: Ideal for developers and system administrators working on production systems to prevent accidental data loss or system instability.

Quick Start

Run the guard skill with the path to the directory you want to restrict edits to, like so: guard /path/to/directory.

Frequently Asked Questions about guard

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

FAQPage Schema
How do I prevent accidental destructive commands like rm -rf or DROP TABLE in a production environment?

Preventing destructive commands in a production environment requires implementing pre-execution safety checks that intercept operations like rm -rf or DROP TABLE. The guard skill provides this by utilizing bash scripts to issue warnings before risky commands execute, ensuring system integrity.

How do I restrict file edits to a specific directory scope?

To restrict file edits to a specific directory scope, you run the guard skill with the target directory path as an argument. This enforces directory-scope restrictions, preventing unauthorized file modifications outside the specified boundary during critical system operations.

Do I need bash to run directory-scope edit restrictions and safety checks?

Yes, you need bash to run directory-scope edit restrictions and safety checks because the guard skill relies on bash scripts to perform its pre-execution command validation and enforce operational safety boundaries.

What is the best way to add a safety layer against force-push and unauthorized file edits?

The best way to add a safety layer against force-push and unauthorized file edits is applying a guard mode that restricts directory edits and warns before destructive commands. This approach protects system integrity without altering the core workflow.

Can I use command checking tools for managing production system safety?

Yes, you can use command checking tools for managing production system safety. They provide an additional layer of protection by validating commands pre-execution and restricting edits to authorized directories, preventing accidental data loss and instability.

When should I not use directory edit restriction tools?

You should avoid directory edit restriction tools when your workflow requires flexible, cross-directory file modifications or when pre-execution command checks might interfere with automated scripts that intentionally execute destructive operations without user input.