guard

Warn on destructive Bash commands and restrict edits to a specified directory.

1|Updated Dec 23, 2025
One-click install
npx skills add https://github.com/rkumar261/studio-cast --skill guard-rkumar261
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: guard
Source: https://github.com/rkumar261/studio-cast/tree/main/.claude/skills/gstack/guard
Command: npx skills add https://github.com/rkumar261/studio-cast --skill guard-rkumar261

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This solution protects critical environments by warning on destructive commands and restricting edits to a user-specified directory.

Core Features & Use Cases

  • Destructive command warnings during shell operations (rm -rf, DROP TABLE, force-push, etc.).
  • Directory edit boundary enforcement to prevent accidental changes outside a designated path.
  • Combines safety checks with guided prompts to set and persist a freeze boundary across sessions; ideal for development, staging, and prod debugging.

Quick Start

After activation, prompt the user for a directory to lock 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 accidental file edits outside a specific directory during debugging?

You can restrict file edits to a specific directory by setting a freeze boundary. This enforces safety hooks that prevent unintended changes to critical paths during development, staging, or production debugging.

How do I get warnings for destructive shell commands like rm -rf or force-push?

Destructive command warnings monitor shell operations and alert you before executing dangerous actions like rm -rf, DROP TABLE, or force-push. This prevents irreversible damage to critical local and remote environments.

Can I persist an edit boundary across sessions for staging and prod debugging?

Yes, you can persist an edit boundary across sessions. The system verifies the selected freeze directory and maintains the constraint, ensuring long-term protection for critical systems during ongoing operations.

What is the best way to lock down file modifications for DevOps workflows?

Locking down file modifications for DevOps workflows involves applying safety hooks that warn on dangerous Bash actions and restricting edits to a user-specified directory. This constrains both command safety and file boundaries.

Does directory edit boundary enforcement work across local and remote environments?

Yes, directory edit boundary enforcement works across local and remote environments. It applies to development, operations, and debugging workflows, constraining both command safety and file edits wherever they are executed.

When do I need to restrict edits to a freeze directory?

You need to restrict edits to a freeze directory when working in sensitive contexts like staging or production debugging. It protects critical systems by preventing accidental changes outside a designated path.