guard

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill ensures safety in system operations by providing warnings for destructive commands and restricting edits to specified directories.

Core Features & Use Cases

  • Destructive Command Warnings: Warns before executing commands like rm -rf, DROP TABLE, force-push, etc.
  • Directory-Scope Edits: Blocks edits outside a specified directory.
  • Use Case: Ideal for 'guard mode' in production environments or when debugging live systems, to prevent accidental damage.

Quick Start

Run /guard to activate full safety mode. Then, when prompted, specify the directory to restrict edits to.

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 in production environments?

Preventing accidental destructive commands in production requires a safety mode that warns before executing operations like rm -rf, DROP TABLE, or force-push. Guard mode intercepts these high-risk commands to ensure system operations safety.

Can I restrict file edits to a specific directory during live system debugging?

Yes, you can restrict file edits to a specific directory during live system debugging. By specifying a target directory when prompted, the system enforces directory boundaries and blocks any modifications attempted outside that scope.

What destructive commands trigger warnings when system operations safety mode is active?

When system operations safety mode is active, warnings trigger for destructive commands including rm -rf, DROP TABLE, and force-push. The monitoring system identifies these high-risk operations and halts to provide a warning before execution.

How do I activate directory restrictions and command warnings for system operations?

To activate directory restrictions and command warnings for system operations, run the /guard command to enable full safety mode. When prompted, specify the target directory to enforce boundaries and begin monitoring for destructive commands.

Does guard mode work for debugging live systems without blocking necessary file modifications?

Guard mode works for debugging live systems by only blocking modifications outside a specified directory. As long as necessary file modifications occur within the restricted directory scope, operations proceed normally while destructive command warnings remain active.