guard

Warn before destructive commands and restrict edits to a directory boundary.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Protect critical systems by combining destructive-command warnings with directory-bound edit restrictions, preventing accidental damage during maintenance, debugging, or production work.

Core Features & Use Cases

  • Destructive-command warnings trigger before executing dangerous operations (rm -rf, DROP TABLE, force-push, etc.).
  • Directory-bound edits prevent modifications outside a user-specified path, enabling safe collaboration and debugging.
  • Integrates with existing safety hooks from sibling /careful and /freeze skills to provide end-to-end protection during CLI sessions.

Quick Start

Set guard mode by selecting a directory to restrict edits and then confirm the boundary.

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 CLI sessions?

Preventing accidental destructive commands requires real-time warnings that trigger before executing dangerous operations. This skill intercepts commands like rm -rf, DROP TABLE, and force-push during Bash, Edit, and Write operations to guard against accidental damage in production-like workflows.

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

Yes, restricting file edits to a specific directory boundary prevents modifications outside a user-specified path. You set a directory-bound edit restriction to enable safe collaboration and debugging while protecting critical systems from accidental damage during maintenance.

Does this CLI safety guard work with existing Bash and Edit hooks?

Yes, this CLI safety guard integrates with existing safety hooks by executing careful and freeze scripts for pre-action safety checks. It requires hooks that execute these scripts during Bash, Edit, and Write operations to provide end-to-end protection during CLI sessions.

What is the best way to enforce safe boundaries in production-like environments?

Enforcing safe boundaries in production-like environments involves combining destructive-command warnings with directory-bound edit restrictions. This approach applies real-time safety checks during maintenance and debugging workflows to prevent accidental damage to critical systems.

Why do I need pre-action safety checks for Write and Edit operations?

Pre-action safety checks for Write and Edit operations are needed to intercept potentially destructive commands before execution. Without these hooks executing careful and freeze scripts, accidental modifications could damage critical files outside established directory boundaries during CLI sessions.