guard

Warn on destructive commands and enforce directory-bound edits via bash hooks and a persisted boundary state file.

Updated Mar 27, 2026
One-click install
npx skills add https://github.com/TobiasPerry/aws-hackathon --skill guard-tobiasperry
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: guard
Source: https://github.com/TobiasPerry/aws-hackathon/tree/main/.claude/skills/gstack/guard
Command: npx skills add https://github.com/TobiasPerry/aws-hackathon --skill guard-tobiasperry

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Full safety mode protects production and debugging sessions by warning about destructive commands and enforcing directory-bound edits.

Core Features & Use Cases

  • Combines /careful (destructive command warnings) with /freeze (directory-bound edits) to provide two layers of safety.
  • Enforces a user-defined restricted directory to prevent edits outside a safe zone, reducing risk during maintenance.
  • Enables strict guardrails for admin tasks when asked to enable guard mode or "maximum safety" to lock down a system.

Quick Start

Ask the user for the restricted directory and enable guard mode to warn on dangerous commands and block edits outside that path.

Frequently Asked Questions about guard

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

FAQPage Schema
How do I prevent destructive commands from running during system administration?

To prevent destructive commands during system administration, you can enable guard mode to automatically warn against risky inputs. It applies safety hooks to your bash session, intercepting dangerous commands before they execute.

How do I restrict file edits to a specific directory during debugging?

You can restrict file edits to a specific directory by using a directory-bound freeze mode. The system prompts you for a safe path, persists this boundary to a state file, and actively blocks any modifications outside that zone.

What is maximum safety mode for production maintenance?

Maximum safety mode for production maintenance is a combined enforcement layer that integrates destructive command warnings with directory-bound edit restrictions. It creates strict guardrails to prevent data loss and unauthorized changes.

Do I need bash hooks to enable guard mode for safe development?

Yes, enabling guard mode for safe development relies on bash hooks to intercept commands. It also depends on sibling safety tools that manage destructive command warnings and directory-bound edit freezing.

Can I use directory-bound edits and destructive command warnings together?

Yes, you can use directory-bound edits and destructive command warnings together by enabling full guard mode. It combines freeze and careful tools to provide two layers of safety, reducing risk during maintenance.

How do I set up a restricted directory boundary for safe edits?

To set up a restricted directory boundary for safe edits, initiate guard mode and the system will prompt you for the target path. It persists this restricted directory to a state file to continuously enforce the safe zone.