guard

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

Updated Dec 22, 2019
One-click install
npx skills add https://github.com/sajalsuhane/sajalsuhane.github.io --skill guard-sajalsuhane
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: guard
Source: https://github.com/sajalsuhane/sajalsuhane.github.io/tree/main/.claude/skills/gstack/guard
Command: npx skills add https://github.com/sajalsuhane/sajalsuhane.github.io --skill guard-sajalsuhane

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides maximum safety by warning on destructive commands and enforcing an edit boundary to protect production data and live debugging sessions.

Core Features & Use Cases

  • Destructive command warnings for dangerous operations (rm -rf, DROP TABLE, force-push, etc.) during interactive sessions.
  • Directory-bound edits that restrict changes to a user-specified path, preventing accidental modifications outside that area.
  • Seamless integration with sibling skills (/careful and /freeze) to enable a combined safety workflow.

Quick Start

Activate guard mode and specify the directory to protect; the system will start enforcing the boundary and warn on risky commands.

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 force-push during interactive debugging sessions?

To prevent destructive commands during interactive debugging, you need an automated guardrail that warns on risky operations like rm -rf, DROP TABLE, or force-push. This safety mode intercepts these actions and requires confirmation before execution.

Can I restrict file edits to a specific directory to protect production data?

Yes, you can restrict file edits to a specific directory by enforcing an edit boundary. This confines all modifications to a user-specified path, preventing accidental changes to production data outside that defined area.

What is the best way to set up directory-bound edit guards and safe defaults for production environments?

The best way to set up directory-bound edit guards is to activate a full safety mode that combines destructive command warnings with strict path confinement. This provides automated guardrails and safe defaults for production contexts.

How do automated safety hooks integrate with edit boundaries to secure live debugging sessions?

Automated safety hooks integrate with edit boundaries by providing combined guardrails across the workflow. They enforce safe defaults, block edits outside the boundary, and warn on destructive actions to secure live debugging sessions.

When do I need to enable guard mode for software engineering tasks?

You need to enable guard mode when working in production environments or debugging contexts where edits must be confined to a specific directory and destructive actions require explicit confirmation to prevent data loss.

What are the limitations of relying on edit boundaries for production safety?

A limitation of edit boundaries is that they only restrict modifications to a defined directory path. They do not inherently block destructive commands unless paired with automated warning hooks to intercept risky operations.