guard

Enforces directory-boundary edits and warns before destructive commands in Bash.

Updated Jun 16, 2026
One-click install
npx skills add https://github.com/miko06/MedicineSimulator --skill guard-miko06
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: guard
Source: https://github.com/miko06/MedicineSimulator/tree/main/.opencode/skills/gstack-guard
Command: npx skills add https://github.com/miko06/MedicineSimulator --skill guard-miko06

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

The Skill provides comprehensive safety checks for destructive commands and enforces directory-boundary edits, protecting critical directories and mitigating accidental data loss.

Core Features & Use Cases

  • Destructive Command Warnings: Warns before executing commands like 'rm -rf', 'DROP TABLE', and 'force-push'.
  • Directory-Scope Edit Restrictions: Blocks edits outside a specified directory, enhancing security for production systems.
  • Use Case: Ideal for environments where safety is paramount, such as during production system maintenance or debugging live systems.

Quick Start

Run the guard command to activate full safety mode. Provide the directory to restrict edits to 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 data loss from destructive commands like rm -rf or force-push?

To prevent accidental data loss from destructive commands, you can activate a full safety mode that intercepts and warns before executing commands like 'rm -rf', 'DROP TABLE', and 'force-push'. This mitigates accidental data loss by requiring explicit confirmation.

How can I enforce directory-scope edit restrictions to protect production files?

To enforce directory-scope edit restrictions, you configure a boundary that blocks unauthorized file edits outside a specified directory. This enhances security for production systems by strictly controlling where file modifications can occur.

Does this file edit restriction tool work for production system maintenance?

Yes, this file edit restriction tool is ideal for production system maintenance. It provides comprehensive safety checks and directory-boundary edits designed for environments where safety is paramount and system integrity must be strictly controlled.

What are the limitations of using Bash hooks for command warnings?

A limitation of using Bash hooks for command warnings is that execution requires Bash and relies on hooks from sibling directories. If the environment lacks Bash support or proper directory structure, the safety checks cannot function.

How do I activate full safety mode for destructive command warnings?

To activate full safety mode for destructive command warnings, run the guard command and provide the directory to restrict edits to when prompted. This immediately enforces safety checks and blocks unauthorized file edits.