guard

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill ensures that destructive commands and edits are restricted to specific directories, providing a safety net for production environments and development debugging.

Core Features & Use Cases

  • Destructive Command Warnings: Warns before executing commands like rm -rf, DROP TABLE, and force-push.
  • Directory-Scope Edits: Blocks edits outside a specified directory, protecting against unintended changes.
  • Use Case: When asked to "guard mode" or "maximum safety" in a production environment, this Skill provides a layer of security by preventing accidental deletions or changes to critical files.

Quick Start

Set guard mode for the 'prod' directory and enable warnings with the command: /guard prod

Frequently Asked Questions about 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 DROP TABLE from running in production?

To prevent destructive commands in production, you need a safety mechanism that intercepts commands like rm -rf or DROP TABLE and issues warnings before execution. This provides a layer of security against accidental deletions.

Can I restrict directory edits to a specific scope to protect system files?

Yes, you can restrict directory edits to a specific scope by configuring directory protection rules. This blocks edits outside a specified directory, ensuring critical system files remain protected from unintended modifications.

How do I set up guard mode for maximum safety in a development environment?

To set up guard mode for maximum safety in a development environment, apply directory restrictions and enable destructive command warnings. You can typically activate this by specifying the target directory in your command line.

What is the best way to warn before executing force-push or similar destructive actions?

The best way to warn before executing force-push or similar destructive actions is to implement a monitoring layer that flags these commands. This ensures destructive actions are monitored and restricted to authorized directories.

Does directory protection work for both development debugging and production security?

Yes, directory protection works for both development debugging and production security. It applies to any scenario where destructive actions need monitoring, ensuring critical files are protected from accidental modification across environments.