guard

Warn before destructive command execution and block file edits outside a specified directory.

11|2|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/ajsai47/holyclaude --skill guard-ajsai47
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: guard
Source: https://github.com/ajsai47/holyclaude/tree/main/skills/team/guard
Command: npx skills add https://github.com/ajsai47/holyclaude --skill guard-ajsai47

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

When working on production systems or critical codebases, accidental execution of destructive commands (like rm -rf, DROP TABLE, force-push) or unintended edits to files outside your intended scope can cause catastrophic data loss or system outages.

Core Features & Use Cases

  • Destructive command warnings: Alerts you before executing high-risk commands like file deletions, database drops, or forced pushes, with an option to override if needed.
  • Directory-scoped edit restrictions: Blocks all file edits outside a user-specified directory to prevent unintended changes to unrelated parts of the codebase.
  • Use case: Ideal for debugging live production environments, making changes to critical infrastructure code, or any scenario where you need maximum protection against accidental modifications.

Quick Start

Use the guard skill to activate full safety mode and restrict all file edits to your project's root directory.

Frequently Asked Questions about guard

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

FAQPage Schema
How do I prevent accidental execution of destructive commands like rm -rf during production debugging?

Preventing destructive command execution requires activating a safety mode that intercepts high-risk commands like rm -rf, DROP TABLE, and force-push, issuing warnings before they run while allowing manual overrides when needed.

How do I restrict file edits to a specific directory to protect critical codebases?

Restricting file edits to a specific directory involves enforcing directory-scoped write access control that blocks all unintended file modifications outside your user-specified project root.

What is directory-scoped write access control for code protection?

Directory-scoped write access control is a safety mechanism that blocks file edits outside a user-specified boundary, preventing unintended changes to unrelated parts of a critical codebase.

Can I override a destructive command warning when maintaining critical infrastructure?

Yes, destructive command warnings provide an option to override the block, allowing you to intentionally execute high-risk commands like force-push or database drops when maintaining critical infrastructure.

What are the limitations of enforcing edit boundaries on production systems?

Enforcing edit boundaries requires specifying a target directory upfront and relies on integrated hook scripts to validate command execution, meaning any edits outside the configured boundary are strictly blocked.