guard

Block destructive commands and file edits outside a specified directory.

Updated May 27, 2026
One-click install
npx skills add https://github.com/Shmurdoc/EasyRide-v1 --skill guard-shmurdoc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: guard
Source: https://github.com/Shmurdoc/EasyRide-v1/tree/main/.opencode/skills/gstack-guard
Command: npx skills add https://github.com/Shmurdoc/EasyRide-v1 --skill guard-shmurdoc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

When working on production systems or debugging live environments, accidental execution of destructive commands (e.g., rm -rf, DROP TABLE, force-push) or unintended edits to files outside your target directory can lead to data loss, service outages, and costly rollbacks.

Core Features & Use Cases

  • Dual Safety Protections: Combines real-time warnings for high-risk destructive commands (rm -rf, DROP TABLE, force-push, git reset --hard, etc.) with strict edit boundary enforcement to prevent unintended file changes.
  • Scoped Edit Restrictions: Locks all file edit operations to a user-specified directory, blocking any modifications to files outside the chosen path to avoid accidental changes to critical system files.
  • Use Case: Ideal for production deployments, live system debugging, or any scenario where you need maximum guardrails to prevent accidental data loss or service disruption.

Quick Start

Activate guard mode by asking the AI to enable full safety mode and provide the directory path you want to restrict all file edits to.

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 during live debugging?

To prevent accidental destructive commands during live debugging, you can activate full safety mode to enforce real-time warnings for high-risk command patterns like rm -rf, DROP TABLE, and git reset --hard.

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

Yes, you can restrict file edits to a specific directory by enabling full safety mode, which locks all file edit operations to your chosen path and blocks modifications to any files outside that boundary.

What is the best way to add guardrails for production system maintenance?

The best way to add guardrails for production system maintenance is to enable dual safety protections, combining real-time warnings for destructive commands with strict edit boundary enforcement to prevent data loss and service disruption.

How do I block force-push and git reset --hard from executing accidentally?

To block force-push and git reset --hard from executing accidentally, enable a safety mode that monitors command patterns in real-time and issues immediate warnings before high-risk destructive commands are executed.

Does edit scoping work for preventing unintended changes to critical system files?

Yes, edit scoping works for preventing unintended changes by locking all file edit operations to a user-specified directory, strictly blocking any modifications to critical system files outside that defined boundary.

What are the limitations of using a safety mode for production deployments?

A limitation of using this safety mode is that it only provides warnings for destructive commands and blocks edits outside a specified directory, meaning it relies on user-specified boundaries to define the scope of protection.