guard

Warn before destructive commands and freeze edits to a directory.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents unsafe edits and destructive commands by combining destructive-command warnings with a directory-scoped edit freeze.

Core Features & Use Cases

  • Destructive-command warnings to prompt before dangerous actions like rm -rf, DROP TABLE, or force-push.
  • Directory-bound edit protection to restrict edits to a user-specified path.
  • Dependency note: relies on sibling /careful and /freeze hooks to enforce safety.

Quick Start

Activate guard mode by enabling both the careful and freeze protections for a target directory.

Frequently Asked Questions about guard

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

FAQPage Schema
How do I prevent unsafe edits and destructive commands during production deployments?

You can prevent unsafe edits by enabling directory-scoped freeze boundaries and descriptive warnings for destructive commands. This setup restricts modifications to a specified path and prompts before dangerous actions like rm -rf or DROP TABLE.

What is a directory-scoped edit freeze for development workflows?

A directory-scoped edit freeze is a protection mechanism that restricts file modifications to a user-specified path. It enforces edit boundaries to ensure only approved directories are changed during critical workflows.

How do I set up warnings for destructive commands like force-push and DROP TABLE?

You set up destructive-command warnings by enabling careful protections that trigger prompts before dangerous actions. The system intercepts commands like force-push and DROP TABLE during pre-tool checks to require explicit confirmation.

Do I need specific hooks installed to enable edit boundaries and destructive warnings?

Yes, you need the careful and freeze hooks installed and invoked during pre-tool checks. These sibling hooks provide the underlying enforcement for both the descriptive warnings and the directory-scoped edit boundaries.

Can I restrict code modifications to a specific target directory?

Yes, you can restrict code modifications by applying a directory-bound edit freeze. This limits all edits exclusively to your user-specified path, preventing accidental changes to files outside the target directory.

Why combine destructive-command warnings with an edit freeze?

Combining warnings with an edit freeze provides full safety mode by addressing both broad command risks and localized file modifications. Warnings prevent dangerous actions while the freeze enforces strict directory boundaries for comprehensive protection.