guard

Warn on destructive commands and enforce directory-scoped edit boundaries.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Full safety mode combines destructive-command warnings with directory-scoped edits to prevent accidental damage during production operations and debugging live systems. Use when you need maximum protection against unintended destructive edits and command execution.

Core Features & Use Cases

  • Destructive-command warnings: alerts before executing dangerous commands such as rm -rf, DROP TABLE, or force-push in collaborative environments.
  • Edit-boundary enforcement: restricts edits to a user-specified directory to prevent edits outside protected areas.
  • Safe orchestration: coordinates with sibling /careful and /freeze components to provide robust protection.

Quick Start

Set a freeze boundary for a target directory and enable guard mode to activate destructive-command warnings.

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 maintenance?

Preventing accidental destructive commands during production maintenance requires a safety mode that warns before executing dangerous actions like rm -rf or DROP TABLE. It also enforces directory-scoped edit boundaries to restrict changes to protected areas.

What is the best way to restrict edits to a specific directory when debugging live systems?

Restricting edits to a specific directory when debugging live systems involves setting a freeze boundary. This enforces directory-scoped edit boundaries, preventing unintended file modifications outside the target path.

Can I get warnings before executing dangerous shell commands like force-push in collaborative environments?

Yes, you can get warnings before executing dangerous shell commands like force-push in collaborative environments by activating guard mode. This provides destructive-command warnings to alert you before potentially harmful actions are executed.

Does full safety mode work without sibling careful and freeze components?

Full safety mode relies on sibling careful and freeze components to provide robust protection. It coordinates with these components to deliver warning checks and boundary enforcement, meaning they are required for the complete safety workflow.

When should I not use directory-scoped edit boundaries?

You should not use directory-scoped edit boundaries when you need to make broad changes across an entire repository that spans multiple directories. The boundary enforcement restricts edits to a single user-specified directory, limiting wide-ranging modifications.