guard

Warn on destructive commands and restrict edits to a user-defined directory.

Updated Apr 5, 2026
One-click install
npx skills add https://github.com/rahmanayon/beehive --skill guard-rahmanayon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: guard
Source: https://github.com/rahmanayon/beehive/tree/main/.claude/skills/gstack/guard
Command: npx skills add https://github.com/rahmanayon/beehive --skill guard-rahmanayon

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Guard mode provides simultaneous destructive-command warnings and per-directory edit restrictions to prevent accidental or dangerous changes in production or critical environments.

Core Features & Use Cases

  • Destructive-command warnings: alert before commands like rm -rf, DROP TABLE, or force-push are executed.
  • Edit boundary enforcement: restrict edits to a user-specified directory, protecting other areas.
  • Setup via guided prompt: AskUserQuestion collects the target directory and configures the guardrail.

Quick Start

Ask the user for a directory to restrict edits to, then enable destructive command warnings and an edit boundary for that directory.

Frequently Asked Questions about guard

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

FAQPage Schema
How do I restrict file edits to a specific directory?

To restrict file edits to a specific directory, you can define an edit boundary that limits modifications to a single user-specified path. This prevents accidental changes to critical files outside the designated boundary during maintenance.

What is the best way to add safety guardrails for debugging production systems?

The best way to add safety guardrails for debugging production systems is to enforce simultaneous destructive-command warnings and per-directory edit restrictions. This approach ensures dangerous commands are intercepted and file modifications stay within safe limits.

Can I configure edit boundaries without manual configuration files?

You can configure edit boundaries through a guided setup prompt that asks for your target directory. The specified boundary is then stored in a local state file for persistence, eliminating the need for manual configuration file management.

When should I enable per-directory edit restrictions?

You should enable per-directory edit restrictions during any operation requiring guardrails to prevent accidental changes, such as production maintenance or debugging prod systems. This ensures modifications remain confined to your designated safe zone.

How do destructive command warnings work with edit boundaries?

Destructive command warnings and edit boundaries work simultaneously by intercepting dangerous commands like force-push while restricting file modifications to a predefined directory. This dual approach provides comprehensive protection against accidental or dangerous changes.