guard

Warn on destructive commands and restrict edits to a designated directory.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Safeguards production environments by combining destructive-command warnings with a directory-scoped edit boundary, preventing risky actions and unintended edits.

Core Features & Use Cases

  • Destructive-command warnings surface potential destructive operations before execution.
  • Directory-boundary enforcement via a freeze mechanism to restrict edits to a designated path.
  • Integrates with related safety components to provide layered protection for engineering workflows.

Quick Start

Enable guard mode to activate destructive command warnings and a directory edit boundary for a chosen 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 bash commands from running in production environments?

To prevent destructive bash commands, enable safety warnings that intercept risky operations before execution, requiring confirmation to proceed and protecting production environments from unintended damage during maintenance.

What is directory-boundary enforcement and how does it restrict file edits?

Directory-boundary enforcement restricts file edits to a designated path using a freeze mechanism, preventing unintended modifications outside the approved scope. This protects sensitive system areas during risky engineering workflows.

How do I set up directory-scoped edit restrictions for sensitive debugging tasks?

Setting up directory-scoped edit restrictions involves activating a freeze mechanism that confines modifications to a designated path, ensuring debugging actions cannot alter files outside the approved boundary.

Can I combine destructive-command warnings with directory edit boundaries?

Combining destructive-command warnings with directory edit boundaries provides layered protection for production systems, ensuring both risky bash operations and out-of-scope file modifications are intercepted before execution.

Does the safety guard mode work with Bash, Read, and AskUserQuestion tools?

Safety guard mode supports Bash, Read, and AskUserQuestion tools to enforce safety boundaries before actions run, requiring integration with careful and freeze components to provide full production environment protection.

When should I not use destructive-command warnings and directory boundaries?

Destructive-command warnings and directory boundaries should not be used for routine, low-risk development where execution speed is critical, as precheck confirmations and freeze restrictions introduce friction suited for sensitive maintenance rather than everyday coding.