One-click install
npx skills add https://github.com/bhianerd/aimemory --skill guard-bhianerd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: guard
Source: https://github.com/bhianerd/aimemory/tree/main/.claude/skills/gstack/guard
Command: npx skills add https://github.com/bhianerd/aimemory --skill guard-bhianerd

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents accidental destructive actions and risky edits by combining destructive-command warnings with a directory-scoped edit boundary, which reduces mistakes during production work and live debugging.

Core Features & Use Cases

  • Destructive command warnings: Flags high-risk operations (for example rm -rf, DROP TABLE, and similar patterns) before they execute.
  • Freeze boundary for edits: Blocks writing or editing outside a user-selected directory to limit damage when troubleshooting.
  • Best used in high-stakes situations: Ideal for “guard mode”, “full safety”, “lock it down”, or “maximum safety” requests when working on prod-like environments or sensitive repos.

Quick Start

Ask the user to run /guard, then provide the directory path you want to allow edits within when prompted.

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 during production debugging?

Preventing accidental destructive commands during production debugging requires a combined guard mode that flags high-risk operations like rm -rf or DROP TABLE before execution. It restricts edits to a specific directory and blocks unsafe command execution.

What is a directory-scoped edit boundary and how does it protect sensitive repos?

A directory-scoped edit boundary is a freeze mechanism that blocks writing or editing files outside a user-selected absolute directory path. It protects sensitive repos by limiting accidental out-of-scope modifications during live troubleshooting workflows.

How do I set up a freeze boundary for live troubleshooting in a production environment?

To set up a freeze boundary for live troubleshooting, invoke the guard mode and provide the absolute directory path you want to allow edits within when prompted. The system then enforces directory-scoped restrictions using a trailing slash state file to confine file writes.

Can I restrict file edits to a specific directory when modifying live production code?

Yes, you can restrict file edits to a specific directory when modifying live production code by enabling a freeze boundary. This blocks any writing or editing actions outside your resolved absolute directory path to limit potential damage.

When should I use a combined guard mode for live debugging workflows?

You should use a combined guard mode for live debugging workflows when working in prod-like environments or sensitive repos and need maximum safety. It is ideal for situations requiring both destructive command warnings and directory-scoped edit restrictions simultaneously.