guard

Warn before destructive commands and restrict edits to a specified directory.

Updated Apr 8, 2026
One-click install
npx skills add https://github.com/SoSoBurner/GStack --skill guard-sosoburner
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: guard
Source: https://github.com/SoSoBurner/GStack/tree/main/guard
Command: npx skills add https://github.com/SoSoBurner/GStack --skill guard-sosoburner

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

The Skill Unit "guard" mitigates the risks of accidental destructive operations in command-line environments by providing warnings for potentially dangerous commands and restricting edits to specified directories.

Core Features & Use Cases

  • Destructive Command Warnings: Warns before executing dangerous commands like 'rm -rf' or 'DROP TABLE'.
  • Directory Scoping: Restricts edits to a user-defined directory, preventing unintended file modifications outside the safe boundary.
  • Use Case: Ideal for protecting production environments or during debugging, especially for engineers and system administrators looking for a failsafe mode.

Quick Start

Run /guard to enable safety features, and then specify the directory where edits should be restricted.

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 in a production environment?

Command-line safety monitoring intercepts and warns before executing destructive commands like 'rm -rf' or 'DROP TABLE'. It enforces safe execution by restricting file edits to user-defined directory boundaries, preventing unintended modifications to live system files.

Can I restrict directory edits to a specific path to avoid out-of-scope file modifications?

Yes, directory scoping restricts edits to a user-defined safe boundary. By specifying a target directory, the environment prevents any unintended file modifications or writes outside that scope during command execution.

What is command-line safety mode and when do I need it for system administration?

Command-line safety mode is a failsafe mechanism that monitors command execution and enforces directory restrictions. You need it when protecting live systems or debugging critical environments where accidental destructive operations or out-of-scope edits pose significant risks.

How do I set up a failsafe mode for safe command execution during debugging?

Run the safety mode activation command and specify the directory where edits should be restricted. This immediately enables destructive command warnings and directory protection, creating a safe execution boundary for your debugging session.

Does command monitoring work without additional dependencies or environment setup?

Yes, command monitoring operates through standalone scripts without requiring additional dependencies. It functions directly within your command-line environment to provide warnings and enforce directory restrictions immediately upon activation.

What are the limitations of directory protection in command-line environments?

Directory protection focuses on warning against destructive commands and scoping edits, but it relies on user-defined boundaries. It serves as a failsafe to prevent accidental out-of-scope edits rather than a comprehensive access control system for malicious actors.