guard

Enforce safety checks and per-directory edit boundaries for destructive commands.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Full safety mode reduces risk when performing potentially destructive operations by combining destructive-command warnings with directory-scoped edits, ensuring safer workflows during maintenance and debugging.

Core Features & Use Cases

  • Combines careful warnings for dangerous commands with a per-directory edit boundary to prevent accidental changes outside a target path.
  • Provides a guided setup and quick enablement for prod safety during high-risk tasks.

Quick Start

Enable guard mode for a specific directory to restrict edits and warn before destructive commands.

Frequently Asked Questions about guard

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I prevent accidental edits outside a target directory during prod debugging?

To prevent accidental edits outside a target directory during prod debugging, you can enforce per-directory edit boundaries. This safety mode restricts modifications to a specific path, ensuring operations remain isolated and safer.

What is the best way to warn on destructive commands before they execute?

Warning on destructive commands is achieved by implementing safety checks via PreToolUse hooks. These hooks intercept potentially dangerous commands, prompting a warning before any risky operation is executed.

Can I restrict file modifications to a specific path for maintenance tasks?

Yes, you can restrict file modifications to a specific path for maintenance tasks by enabling a safety mode. This establishes per-directory edit boundaries, preventing accidental changes outside your designated target path.

How do I mitigate risk when applying commands that could delete data or modify configs?

Risk mitigation for destructive commands involves combining destructive-command warnings with directory-scoped edit restrictions. This approach ensures safer workflows by checking commands and enforcing boundaries before execution.

Does this safety mode require specific components to enforce directory restrictions?

Enforcing directory restrictions requires integration with careful and freeze components. These components work together through PreToolUse hooks to check commands and apply the necessary per-directory edit boundaries.

When should I enable guard mode for high-risk operations?

You should enable guard mode during high-risk operations like prod debugging, maintenance, or any task that could delete data and modify critical configs. It provides guided setup to quickly lock down edits and warn on destructive commands.