guard

Enforce directory-scoped edit boundaries and warn before destructive commands.

8|2|Updated Mar 24, 2026
One-click install
npx skills add https://github.com/MFS-code/gstack --skill guard-mfs-code
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: guard
Source: https://github.com/MFS-code/gstack/tree/main/guard
Command: npx skills add https://github.com/MFS-code/gstack --skill guard-mfs-code

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents accidents during high-risk coding or operational changes by combining destructive-command warnings with a strict edit boundary for a chosen directory.

Core Features & Use Cases

  • Destructive command warnings: Warns before executing dangerous patterns like rm -rf, DROP TABLE, and force-push attempts.
  • Directory-scoped edit enforcement: Blocks file edits outside a user-selected path to reduce unintended changes.
  • Use for “guard mode” workflows: Ideal when debugging production, touching critical repositories, or making changes under pressure.

Quick Start

Activate it by telling your agent to run the manual trigger command: /guard.

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 during production debugging?

To prevent accidental destructive commands during production debugging, you can activate a safety mode that warns before executing patterns like rm -rf, DROP TABLE, and force-push attempts. This mode uses hook-based prechecks to intercept and alert you before risky commands run.

What is the best way to enforce a strict edit boundary for a specific directory path?

The best way to enforce a strict edit boundary for a specific directory path is to use a directory freeze validation script. This blocks file edits outside your selected path, ensuring changes remain scoped to the chosen directory and reducing unintended modifications.

How do I manually activate guard mode for high-risk coding and operational changes?

You manually activate guard mode for high-risk coding changes by instructing your agent to run the manual trigger command. This loads sibling careful and freeze validation scripts to apply allowed tools and hook-based prechecks for your sensitive maintenance tasks.

Does guard mode work without pre-existing dependencies or external components?

Yes, guard mode works without pre-existing dependencies or external components. It operates by loading internal sibling careful and freeze validation scripts, applying hook-based prechecks and directory-scoped edit enforcement directly within your agent environment.

When should I not use a directory freeze boundary during sensitive development tasks?

You should not use a directory freeze boundary when your sensitive development tasks require editing files across multiple directories outside a single path. The strict edit enforcement blocks out-of-scope file edits, which will halt workflows needing broader repository access.