guard

Monitor and restrict destructive commands and file edits within specified directories.

Updated Jun 11, 2026
One-click install
npx skills add https://github.com/26mitch26/ai-mall --skill guard-26mitch26
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: guard
Source: https://github.com/26mitch26/ai-mall/tree/main/.claude/skills/guard
Command: npx skills add https://github.com/26mitch26/ai-mall --skill guard-26mitch26

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

The guard skill provides a safety net for users performing directory operations, preventing destructive actions and ensuring edits are made within specified boundaries.

Core Features & Use Cases

  • Destructive Command Warnings: Warns users before executing commands that could cause data loss or system damage.
  • Directory-Scope Edits: Restricts file edits to a specified directory, protecting other directories from unintended changes.
  • Use Case: When working on a production environment or when multiple developers are collaborating on a project, guard helps maintain the integrity of the system by preventing accidental destructive actions.

Quick Start

To activate guard mode for the 'data' directory, type: /guard /data

Frequently Asked Questions about guard

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent destructive bash commands from executing in production directories?

You can prevent destructive bash commands by activating a monitoring skill that checks operations before execution. It warns you about potential data loss and enforces directory boundaries to restrict file edits within specified paths.

What is directory-scope edit restriction and how does it protect collaborative work?

Directory-scope edit restriction limits file modifications to a specified directory, protecting other paths from unintended changes. This maintains system integrity when multiple developers collaborate on a project.

How do I restrict file edits to a specific directory using bash scripts?

You restrict file edits by running a command like `/guard /data` to activate monitoring for that directory. The bash scripts enforce boundaries by checking commands and blocking edits outside the specified scope.

Can I get warnings before executing bash commands that cause data loss?

Yes, you can get warnings before executing data loss commands by using a safety monitoring script. The tool intercepts destructive actions and alerts you before they are carried out in your environment.

What are the limitations of using bash scripts for command monitoring in production environments?

Limitations of using bash scripts for command monitoring include relying on the script's ability to accurately identify destructive commands. It may not catch every edge case in complex environments without proper boundary configuration.