guard

Warn before destructive commands and restrict file edits to a chosen directory.

6|2|Updated Oct 18, 2021
One-click install
npx skills add https://github.com/jerrywu001/jerrywu001 --skill guard-jerrywu001
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: guard
Source: https://github.com/jerrywu001/jerrywu001/tree/main/.claude/skills/guard
Command: npx skills add https://github.com/jerrywu001/jerrywu001 --skill guard-jerrywu001

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents accidental or overly broad changes during high-risk work by warning before destructive operations and restricting edits to a chosen directory.

Core Features & Use Cases

  • Destructive command warnings: Warns before running commands such as rm -rf, DROP TABLE, force-push, and similar high-impact actions.
  • Directory-scoped edit restrictions: Blocks file edits outside a user-selected boundary directory to reduce blast radius.
  • Use case: Debugging or making production-adjacent changes where you want guardrails while still allowing work inside a safe workspace.

Quick Start

Activate guard mode, then provide the absolute path to the directory where edits are allowed when prompted.

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 commands like rm -rf or DROP TABLE during interactive debugging?

To prevent destructive commands during debugging, you need a safety mode that warns before executing high-impact actions like rm -rf or DROP TABLE. This skill intercepts and warns against destructive patterns using pre-tool checks before execution.

How do I restrict file edits to a specific directory to reduce blast radius?

To restrict file edits to a specific directory, you establish an edit boundary that limits writes to a chosen path. This skill applies freeze boundary checks via hook scripts to block any file modifications outside your selected directory.

How can I prepare production-safe edits without risking accidental changes to live-adjacent systems?

Preparing production-safe edits requires combining directory-scoped restrictions with destructive command warnings. This skill enforces both by running pre-tool checks for dangerous patterns and applying boundary checks on write actions to protect live-adjacent systems.

How do destructive command warnings work in interactive development environments?

Destructive command warnings in interactive development work by running pre-tool checks that identify high-impact patterns like force-push or DROP TABLE. The system intercepts these operations and alerts you before the action is executed, preventing harmful changes.

Can I use directory-scoped edit restrictions alongside other debugging workflows?

Yes, you can use directory-scoped edit restrictions alongside standard debugging workflows. The safety mode applies boundary checks specifically to edit and write actions via hook scripts, allowing unrestricted work inside the safe workspace while blocking external modifications.

What are the limitations of using edit boundaries for production safeguards?

The limitation of using edit boundaries for production safeguards is that restrictions apply only to file edits and write actions within the configured path. You must manually activate guard mode and provide an absolute directory path to enforce the boundary checks.