guard

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides a safety surface that warns about destructive commands and enforces directory-scoped edits to prevent accidental or malicious changes in critical environments.

Core Features & Use Cases

  • Destructive-command warnings: alerts on dangerous commands (e.g., rm -rf, DROP TABLE, force-push) and prevents execute without confirmation.
  • Edit-boundary enforcement: restricts edits to a specified directory, blocking changes outside the boundary.
  • Combined safety workflow: integrates careful (warnings) and freeze (boundaries) for high-assurance prod debugging and compliance scenarios.
  • Lightweight setup: relies on sibling careful and freeze scripts to perform checks before tool use.

Quick Start

Provide the target directory and run guard mode to enable full safety.

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 in production?

Guard mode prevents destructive commands by warning on dangerous operations like rm -rf, DROP TABLE, or force-push, requiring confirmation before execution to protect critical environments during maintenance.

What is directory-bound edit enforcement for staging and development workflows?

Directory-bound edit enforcement restricts file modifications to a specified target directory, blocking changes outside the boundary to maintain controlled change boundaries and auditability during debugging.

How do I set up edit boundaries for a specific target directory?

Provide the target directory and enable guard mode to enforce directory-scoped edits, preventing accidental or malicious file modifications outside the specified boundary path.

Can I integrate command-safety warnings with existing Bash scripts?

Yes, the safety workflow leverages Bash, Read, and AskUserQuestion tools, coordinating sibling scripts to perform pre-use checks and integrate command-safety warnings within existing workflows.

Does workflow security guard mode work without external dependencies?

Guard mode has no formal dependencies but coordinates lightweight sibling scripts for pre-use checks, utilizing Bash, Read, and AskUserQuestion tools to enforce edit boundaries and destructive-command warnings.