guard

Warn before destructive commands and restrict file edits to specified directories.

Updated Jun 4, 2026
One-click install
npx skills add https://github.com/burgebj/gstack --skill guard-burgebj
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: guard
Source: https://github.com/burgebj/gstack/tree/main/guard
Command: npx skills add https://github.com/burgebj/gstack --skill guard-burgebj

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires Bash, Read, AskUserQuestion, and includes scripts (resource) and references (resource) components.

What problem does it solve?

The guard Skill unit is designed to prevent mistakes and accidental damage in coding by providing destructive command warnings and restricting edits to specific directories.

Core Features & Use Cases

  • Destructive Command Warnings: Warns before executing potentially dangerous commands like rm -rf or DROP TABLE.
  • Directory-Specific Edits: Blocks any edits to files outside a user-defined directory, ensuring safe editing in production environments.
  • Use Case: Ideal for when you need to edit a production system and want to ensure no accidental deletions or changes occur outside of a designated area.

Quick Start

Run /guard /path/to/your/directory to activate guard mode for a specific 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 command execution like rm -rf in a development workflow?

To prevent destructive command execution, you can activate guard mode to warn before running potentially dangerous shell commands. It checks bash scripts and prompts warnings for risky operations.

Can I restrict file editing to a specific directory to ensure code safety in production environments?

Yes, you can restrict file editing to specific directories to ensure code safety. By activating guard mode with a target path, it blocks any file modifications outside that defined directory boundary.

What is the best way to protect my system from unintended modifications when editing production code?

The best way to protect your system from unintended modifications is to enforce directory restrictions and receive destructive command warnings. This limits edits to designated areas and flags risky commands.

Does this code safety tool require specific dependencies to function?

Yes, the code safety tool requires Bash, Read, and AskUserQuestion dependencies to function. These components enable the execution of directory boundary checks and command warning prompts.

How do I activate directory restrictions for a specific path?

To activate directory restrictions for a specific path, run the command `/guard /path/to/your/directory`. This initiates the directory boundary enforcement and destructive command warnings.