guard

Prevent destructive commands and enforce edit boundaries via hooks.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents accidental destructive actions and edits outside an allowed boundary, reducing risk when working with production systems and live debugging.

Core Features & Use Cases

  • Destructive command warnings for dangerous operations (rm -rf, DROP TABLE, etc.).
  • Edit boundary enforcement to restrict edits to a chosen directory.
  • Easy integration with /careful and /freeze to provide comprehensive safety.

Quick Start

Ask which directory should edits be restricted to and enable guard mode to activate both warnings and boundary enforcement.

Frequently Asked Questions about guard

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

FAQPage Schema
How do I prevent destructive shell commands like rm -rf or DROP TABLE from running accidentally?

To prevent destructive shell commands like rm -rf or DROP TABLE from running accidentally, you can enforce safety guardrails that trigger preflight warnings and prompt the user before proceeding.

What is the best way to restrict file edits to a specific directory boundary during live debugging?

To restrict file edits to a specific directory boundary during live debugging, apply edit boundary enforcement that blocks modifications outside an explicitly chosen directory to protect critical systems.

How do I set up edit boundary enforcement and warnings for production systems?

To set up edit boundary enforcement and warnings for production systems, specify which directory edits should be restricted to and activate guard mode to enable both warning prompts and boundary enforcement.

Can I integrate preflight checks with other safety modes like freeze?

Yes, preflight checks can integrate directly with safety modes like freeze, pairing boundary enforcement and hooks to provide comprehensive risk-mitigation across command execution and file edits.

Does this prod-safety approach work for auditing workflows requiring strict guardrails?

Yes, this prod-safety approach works for auditing workflows requiring strict guardrails, applying hooks and boundary enforcement to ensure preflight checks and user prompts before executing any risky action.