guard

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a unified safety layer that warns on destructive commands and enforces a directory-based edit boundary to protect critical systems during development and debugging.

Core Features & Use Cases

  • Destructive-command warnings that alert before potentially destructive actions (rm -rf, DROP TABLE, force-push, etc.).
  • Directory-bound editing enforcement by delegating to the sibling /freeze tool to restrict edits outside a specified path.
  • Uses the sibling /careful tool to surface safe, preflight checks before executing risky operations in prod or staging.

Quick Start

Enable guard mode to enforce destructive-command warnings and a restricted edit boundary.

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 like rm -rf or DROP TABLE from running during development?

Destructive command warnings intercept risky operations like rm -rf, DROP TABLE, or force-push and alert you before execution. This safety layer activates pre-use checks to surface potentially destructive actions before they impact your environment.

Can I restrict file edits to a specific directory boundary during debugging?

Yes, you can restrict file edits to a specific directory boundary by delegating edit enforcement to a freeze mechanism. This ensures modifications cannot occur outside a specified path, protecting critical systems during staging and debugging workflows.

Do I need additional safety tools installed to use guard mode for risk mitigation?

Yes, guard mode requires sibling careful and freeze skills to be installed. It integrates with these tools to provide comprehensive safety controls, using careful for preflight checks and freeze for directory-bound edit enforcement.

What is the best way to add preflight safety checks before executing risky operations in production?

The best way to add preflight safety checks in production is to activate a unified safety layer that integrates pre-use checks with destructive-command warnings. This surfaces safe, preflight validations before executing risky operations in prod or staging environments.

When should I not rely on a directory-bound edit boundary for protecting critical systems?

A directory-bound edit boundary should not be your sole reliance if your workflow involves editing files across multiple unrelated paths. It enforces restrictions within a specified path but requires sibling tools for comprehensive destructive-command warning coverage.