guard

Enforce destructive command warnings and directory-bound edit restrictions via PreToolUse hooks.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

In environments where destructive actions and edits could impact production, guard mode provides a safety layer that warns before destructive commands and confines edits to a defined directory.

Core Features & Use Cases

  • Destructive command warnings for dangerous actions like rm -rf, DROP TABLE, and force-push.
  • Directory-bound edit restrictions that prevent edits outside a user-specified path.
  • Seamless integration with the existing /careful and /freeze workflows to provide a single, auditable guard.

Quick Start

Ask the user which directory should edits be restricted to; then enable guard mode to activate both protections.

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 prod debugging?

Preventing accidental destructive shell commands during prod debugging requires a safety layer that intercepts dangerous actions like rm -rf or DROP TABLE and issues warnings before execution. This is achieved by enabling guard mode to enforce strict boundaries.

Can I restrict file edits to a specific directory boundary?

Yes, you can restrict file edits to a specific directory boundary by specifying your target path when enabling guard mode. The system confines all modifications to that directory, preventing any accidental or unauthorized edits outside the defined boundary.

What is the best way to warn before destructive actions like force-push or rm -rf?

The best way to warn before destructive actions like force-push or rm -rf is to activate a comprehensive guard mode that monitors shell commands and edits. It applies PreToolUse hooks to intercept and warn against dangerous operations automatically.

Does guard mode work with existing careful and freeze workflows?

Yes, guard mode seamlessly integrates with existing careful and freeze workflows to provide a single, auditable safety guard. It coordinates with these sibling scripts to enforce both destructive command warnings and directory-bound edit restrictions simultaneously.

When do I need edit boundaries and destructive command warnings in system maintenance?

You need edit boundaries and destructive command warnings in system maintenance or prod debugging whenever strict safety is required across a directory. This prevents catastrophic data loss from dangerous shell commands and confines modifications to authorized paths.