guard

Block destructive commands and edits outside a specified directory.

9|3|Updated Jan 29, 2022
One-click install
npx skills add https://github.com/I194/PMTools_2.0 --skill guard-i194
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: guard
Source: https://github.com/I194/PMTools_2.0/tree/main/.claude/skills/gstack/guard
Command: npx skills add https://github.com/I194/PMTools_2.0 --skill guard-i194

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Full safety mode that warns before destructive commands and blocks edits outside a predefined directory, reducing risk when touching production or debugging live systems.

Core Features & Use Cases

  • Destructive command warnings for dangerous operations (rm -rf, DROP TABLE, force-push, etc.)
  • Directory-boundary edits: edits outside the chosen path are blocked
  • Combines /careful and /freeze into a single safety command
  • Use cases: when performing critical changes in prod or during live debugging, where strict safety is required

Quick Start

Guard mode: specify the directory to restrict edits to and enable destructive-command warnings.

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 from running in a production environment?

To prevent destructive commands in production, you can enforce safety warnings that intercept dangerous operations like rm -rf or DROP TABLE before execution. This Skill blocks risky changes by applying a freeze boundary and requiring confirmation.

Can I restrict file edits to a specific directory boundary during live debugging?

Yes, you can restrict file edits to a specific directory boundary during live debugging. By setting a predefined path, the tool blocks any edit operations attempted outside that chosen directory scope.

What is the best way to warn before force-push or database drops in operational environments?

The best way to warn before force-push or database drops is to combine careful warnings with a freeze boundary. This approach enforces edit boundaries and intercepts destructive commands in operational environments.

How do destructive command warnings and freeze boundaries work together?

Destructive command warnings and freeze boundaries work together by invoking sibling scripts to enforce checks before tool use. Warnings intercept dangerous operations while the freeze boundary restricts edits to a predefined directory.

When do I need strict edit boundaries for production safety?

You need strict edit boundaries for production safety when performing critical changes or debugging live systems. This approach ensures directory-scoped edits remain restricted and warns before destructive actions occur.

Are there limitations to using directory-scoped edit restrictions?

A limitation of directory-scoped edit restrictions is that edits outside the chosen path are completely blocked. This ensures safety but requires correctly specifying the target directory beforehand to avoid interrupting valid operations.