guard

Enforce destructive-command warnings and directory-scoped edit protections via PreToolUse hooks.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Guard mode protects production and critical environments by warning on destructive commands and enforcing strict edit boundaries.

Core Features & Use Cases

  • Destructive-command warnings: alerts and confirms before executing commands like rm -rf, DROP TABLE, or force-push in prod.
  • Directory-scoped edit restrictions: blocks edits outside a user-defined safe directory.
  • Pre-flight safety checks: validates safety conditions before any tool use, leveraging sibling safety guards (/careful and /freeze).

Quick Start

Run guard mode to enable destructive-command warnings and edit-boundary protections for the active project.

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 like rm -rf or DROP TABLE in production?

To prevent destructive commands in production, you need safety mode to enforce warnings and require confirmation before executing risky operations like rm -rf or DROP TABLE. It validates commands through pre-flight checks before execution.

Can I restrict file edits to a specific directory during critical deployments?

Yes, you can restrict file edits to a specific directory by enforcing directory-scoped edit boundaries. This blocks any modifications attempted outside your user-defined safe directory during critical deployments.

How do PreToolUse hooks enforce edit boundaries and validate commands?

PreToolUse hooks enforce edit boundaries by intercepting and validating commands before execution. They check operations against safety conditions and freeze boundaries, stopping risky actions before they run.

What is the best way to add pre-flight safety checks for debugging workflows?

The best way to add pre-flight safety checks for debugging workflows is to enable guard mode. It leverages sibling safety components to validate safety conditions before any tool use, protecting critical environments during debugging.

Does this production protection mode work across both development and production workflows?

Yes, production protection mode works across both development and production workflows. It covers deployments, debugging, and critical edits, enforcing destructive-command warnings and strict edit boundaries in both environments.

Why does force-push trigger a destructive-command warning during deployments?

Force-push triggers a destructive-command warning because it is classified as a risky operation that can overwrite critical production state. The safety mode alerts and requires confirmation before executing such commands.