guard

Warn before executing destructive commands and block edits outside a specified directory.

1|Updated May 25, 2026
One-click install
npx skills add https://github.com/chiruu12/nudge --skill guard-chiruu12
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: guard
Source: https://github.com/chiruu12/nudge/tree/main/.agents/skills/gstack-guard
Command: npx skills add https://github.com/chiruu12/nudge --skill guard-chiruu12

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

The guard skill addresses the risk of accidental destructive actions in a directory by providing warnings and restrictions on file edits.

Core Features & Use Cases

  • Destructive Command Warnings: Warns before executing destructive commands like rm -rf, DROP TABLE, and force-push.
  • Directory-Scope Edits: Blocks edits outside a specified directory to prevent accidental modifications.
  • Use Case: Ideal for developers or sysadmins working on production systems where avoiding accidental deletions or overwrites is crucial.

Quick Start

Set up guard mode for a specific directory and start using it to edit files.

Frequently Asked Questions about guard

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

FAQPage Schema
How do I get warnings before executing destructive shell commands like rm -rf?

To get warnings before executing destructive shell commands, you need a directory protection tool that monitors operations and intercepts commands like rm -rf, DROP TABLE, and force-push. This skill provides that safety mode by warning you before potentially harmful commands execute.

Can I restrict file edits to a specific directory to prevent accidental modifications outside of it?

Yes, you can restrict file edits to a specific directory to prevent accidental modifications. This skill blocks any edits outside your specified directory scope, ensuring operations remain contained and maintaining system integrity during sensitive production work.

What is the best way to prevent accidental destructive actions on production systems?

The best way to prevent accidental destructive actions on production systems is to deploy a safety mode that warns before executing harmful commands and restricts directory scopes. This skill acts as a guard for developers and sysadmins to avoid accidental deletions or overwrites.

Does this directory protection mechanism require any dependencies to set up guard mode?

No, setting up guard mode does not require any dependencies. The skill operates independently using its built-in scripts to monitor directory-scope edits and provide destructive command warnings without needing external packages or environments.

When should I use a dedicated command warning tool instead of relying on standard shell prompts?

You should use a dedicated command warning tool when working in sensitive production environments where avoiding accidental deletions is crucial. Unlike standard shell prompts, this skill actively blocks edits outside a specified directory and warns before executing destructive actions.

Why are my file edits being blocked when working outside a specified directory scope?

Your file edits are blocked outside a specified directory scope because the safety mode actively restricts modifications to maintain system integrity. This directory-scope protection prevents accidental overwrites by ensuring you only edit files within the configured boundary.