guard

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

Updated Mar 13, 2026
One-click install
npx skills add https://github.com/AkbarDevop/ayah-studio --skill guard-akbardevop
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: guard
Source: https://github.com/AkbarDevop/ayah-studio/tree/main/.claude/skills/gstack/guard
Command: npx skills add https://github.com/AkbarDevop/ayah-studio --skill guard-akbardevop

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires bash, and includes scripts (resource) components.

What problem does it solve?

The guard skill addresses the issue of accidental destructive operations in production or debugging environments by providing warnings and restrictions on edits.

Core Features & Use Cases

  • Destructive Command Warnings: Warns before executing potentially destructive commands like rm -rf, DROP TABLE, etc.
  • Directory-Scope Edits: Restricts file edits to a specified directory, preventing accidental changes outside the boundary.
  • Use Case: When performing operations on a live system, use guard to ensure that you are only making changes in the intended location and receive warnings about dangerous commands.

Quick Start

Run the 'guard' command with the directory you want to protect as an argument.

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 in a production environment?

To prevent destructive commands in production, you need a tool that enforces safety checks and warns before executing operations like rm -rf or DROP TABLE. This provides a critical confirmation layer, stopping accidental data loss during live system operations.

What is directory-scoped editing and how does it protect my codebase?

Directory-scoped editing restricts file modifications to a specified directory boundary, preventing accidental changes outside the target location. This mechanism ensures debugging or patching efforts remain isolated, protecting the rest of the file system from unintended alterations.

How do I restrict bash script edits to a specific directory boundary?

You can restrict bash script edits to a specific directory by running a boundary enforcement command with the target folder as an argument. This limits file modifications to that specific scope, ensuring operations only affect files within the explicitly defined boundary.

Can I get warnings for dangerous bash commands before they execute on a live system?

Yes, you can intercept and warn about dangerous bash commands before execution on a live system. By combining command checking and boundary restrictions, the system halts potentially destructive operations, prompting for confirmation before proceeding.

Does this command checking tool work for general debugging environments or only production?

This command checking tool works effectively for both production and debugging environments. It enforces safety checks and directory boundary restrictions whenever you are performing operations, making it suitable for any context requiring strict edit limitations.

What are the limitations of using directory protection for safe file edits?

The limitation of using directory protection is that it strictly confines edits to the specified directory, meaning any required changes outside that boundary will be blocked. It relies on bash and focuses solely on restricting scope and warning about destructive commands.