guard

Intercept destructive shell commands and restrict file edits to a designated directory.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill prevents accidental system damage and unauthorized file modifications by enforcing strict safety boundaries and monitoring for destructive commands.

Core Features & Use Cases

  • Destructive Command Warnings: Intercepts and warns before executing dangerous operations like rm -rf, DROP TABLE, or force-pushes.
  • Directory-Scoped Edits: Restricts all file write and edit operations to a user-defined safe directory, preventing accidental changes to system or configuration files.
  • Use Case: Use this when performing complex refactoring or debugging in a production environment to ensure that no accidental deletions or out-of-scope edits occur.

Quick Start

Activate guard mode by requesting full safety and specifying the target directory for restricted edits.

Frequently Asked Questions about guard

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

FAQPage Schema
How do I prevent accidental data loss from destructive shell commands during development?

Destructive command warnings intercept dangerous operations like rm -rf, DROP TABLE, or force-pushes before execution. This mechanism monitors shell commands in high-stakes development environments to prevent accidental system damage and unauthorized file modifications.

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

You restrict file system edits by activating guard mode and specifying a target directory for restricted edits. This enforces strict safety boundaries, ensuring all file write and edit operations remain confined to your designated safe directory.

Do I need gstack path utilities to enforce safety guardrails?

Yes, enforcing safety guardrails requires integration with gstack path utilities and local hook scripts. These tools validate every tool execution against defined safety boundaries to intercept destructive commands and restrict file modifications.

When should I use safety guardrails in a production environment?

Use safety guardrails when performing complex refactoring or debugging in a production environment. This ensures no accidental deletions or out-of-scope edits occur during high-stakes development operations.

What are the limitations of intercepting destructive shell commands?

Intercepting destructive shell commands requires local hook scripts to validate tool execution against defined safety boundaries. If a command bypasses these hooks or operates outside the gstack path utilities, the safety guardrails may not intercept it.