guard

Warn on destructive commands and enforce directory-scoped edit boundaries.

1|Updated Mar 31, 2026
One-click install
npx skills add https://github.com/LaPaGaYo/nexus --skill guard-lapagayo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: guard
Source: https://github.com/LaPaGaYo/nexus/tree/main/skills/safety/guard
Command: npx skills add https://github.com/LaPaGaYo/nexus --skill guard-lapagayo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Full safety mode combines destructive-command warnings with directory-scoped edits to protect production and critical systems from accidental or malicious changes.

Core Features & Use Cases

  • Destructive-command warnings via the /careful hook to catch dangerous operations.
  • Directory-boundary enforcement via the /freeze hook to limit edits to a chosen path.
  • Combined safety workflow for production-grade safety in development and release contexts.

Quick Start

Ask the user for a directory to restrict edits to and enable guard mode with destructive warnings.

Frequently Asked Questions about guard

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

FAQPage Schema
How do I prevent destructive shell commands from modifying production files?

To prevent destructive shell commands, you can enable safety hooks that trigger warnings on dangerous operations and enforce edit boundaries to protect production directories.

Can I restrict file edits to a specific directory for production safety?

Yes, you can restrict file edits to a specific directory by applying directory-boundary enforcement, which limits all modifications to your chosen path and blocks changes outside that scope.

What are safety hooks and how do they enforce edit boundaries?

Safety hooks are prebuilt mechanisms that enforce edit boundaries by intercepting shell actions and file edits, warning you about destructive commands before they execute.

How do I enable guard mode for safe and restricted edits in development?

You enable guard mode by specifying a directory to restrict edits to, which activates destructive-command warnings and directory-scoped file protection for your development workflow.

When should I use directory restrictions and destructive warnings?

You should use directory restrictions and destructive warnings during production-grade development and release contexts to protect critical systems from accidental or malicious changes.