guard

Warn on destructive commands and block edits outside a configured directory.

4|2|Updated Mar 29, 2026
One-click install
npx skills add https://github.com/florianhorner/mammamiradio --skill guard-florianhorner
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: guard
Source: https://github.com/florianhorner/mammamiradio/tree/main/.claude/skills/gstack/guard
Command: npx skills add https://github.com/florianhorner/mammamiradio --skill guard-florianhorner

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a comprehensive safety layer that combines warnings for destructive commands with directory-based edit restrictions to prevent accidental damage in development or production.

Core Features & Use Cases

  • Combines /careful (destructive-command warnings) with /freeze (edit boundary enforcement) to shield critical systems during risky operations.
  • Lets teams debug and deploy with confidence by blocking edits outside a configured directory while still allowing safe changes inside it.
  • Integrates with hooks and helper scripts to enforce a configurable guard boundary during shell sessions.

Quick Start

Specify the directory to restrict edits to and enable destructive-command warnings to activate guard mode.

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 bash commands during production maintenance?

Preventing accidental destructive bash commands requires a safety layer that warns when dangerous shell commands are executed. This guard mode applies during risky shell sessions, ensuring critical systems remain shielded from unintended damage.

What is a directory-based edit boundary and how does it protect file modifications?

A directory-based edit boundary blocks file modifications outside a specifically configured directory. This prevents accidental edits to critical system files while still allowing safe changes inside the defined boundary during debugging.

Can I restrict file edits to a specific directory while debugging?

Yes, you can restrict file edits to a specific directory by configuring a guard boundary. This blocks modifications outside the target folder, allowing teams to debug with confidence without risking unrelated files.

How do I configure a guard boundary for shell sessions and file edits?

Configuring a guard boundary involves specifying a target directory to restrict edits to and enabling destructive-command warnings. This integrates with helper scripts to enforce the safety boundary across shell sessions.

When do I need a safety layer for destructive command warnings?

A safety layer for destructive command warnings is needed when performing risky operations in development or production. It is essential during production maintenance or debugging tasks where accidental damage to critical systems is a concern.

What are the limitations of using edit boundary enforcement for security policies?

Edit boundary enforcement limitations include its restriction to a single configured directory, meaning edits outside are completely blocked. It relies on integration with specific helper scripts to maintain the guard boundary during active shell sessions.