guard

Intercept destructive shell commands and restrict file writes to a defined directory.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This skill prevents accidental destructive actions and unauthorized file modifications by enforcing strict safety boundaries during sensitive operations.

Core Features & Use Cases

  • Destructive Command Warnings: Intercepts commands like rm -rf or force-pushes to prevent accidental data loss.
  • Directory-Scoped Edits: Restricts file editing to a specific, user-defined directory to ensure changes remain contained.
  • Use Case: When performing maintenance on a live production system, activate this skill to ensure that no accidental edits occur outside the designated configuration folder and that all dangerous commands are double-checked.

Quick Start

Activate guard mode and restrict all future file edits to the current project 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 shell commands during production system maintenance?

Restricting file system write operations to a defined directory scope prevents unauthorized configuration changes by containing all edits within user-approved project boundaries. This directory-scoped approach ensures live system modifications remain isolated and predictable.

What do I need to set up directory-scoped file editing protection in my engineering workflow?

Setting up directory-scoped file editing protection requires integration with local gstack state management and shell hook execution to validate command safety and path boundaries. These components intercept operations and enforce the defined directory limits.

Can I restrict file editing operations to a specific project directory scope?

Yes, you can restrict file editing operations to a specific project directory scope by activating a safety boundary mode. This contains all file modifications within the designated configuration folder, preventing accidental edits outside the target area.

What are the limitations of using shell hook execution for command safety validation?

Using shell hook execution for command safety validation requires local gstack state management integration, meaning it depends on specific engineering workflow environments to function. It acts as an interceptor rather than a standalone execution environment.