guard

Warn on destructive commands and restrict edits to a protected directory.

Updated Mar 17, 2026
One-click install
npx skills add https://github.com/Kakarottoooo/onegent --skill guard-kakarottoooo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: guard
Source: https://github.com/Kakarottoooo/onegent/tree/main/.agents/skills/gstack/guard
Command: npx skills add https://github.com/Kakarottoooo/onegent --skill guard-kakarottoooo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Safeguard environments by emitting warnings for destructive commands and enforcing directory-scoped edits to prevent accidental or unauthorized modifications.

Core Features & Use Cases

  • Destructive-command warnings that prompt before executing dangerous actions.
  • Directory-bound edits enforced at runtime to prevent changes outside a protected path.
  • Audit-ready safeguards for production debugging and maintenance tasks.

Quick Start

Ask the user which directory should be protected and enable guard mode to enforce the boundary and warn on 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 destructive commands during production debugging?

You can prevent accidental destructive commands during production debugging by enabling guard mode, which emits warnings that prompt before executing dangerous actions and enforces directory-scoped edits to restrict modifications.

Can I restrict file edits to a specific directory path during sensitive operations?

Yes, you can restrict file edits to a specific directory path by enabling directory-bound edit restrictions at runtime, which prevents changes outside the protected path during sensitive operations and maintenance tasks.

How do destructive-command warnings and audit trails work for environment safety?

Destructive-command warnings and audit trails work by intercepting dangerous actions, prompting for confirmation before execution, and logging the constrained operations to maintain audit-ready safeguards for sensitive environments.

Do I need the careful and freeze utilities to enforce directory-bound edit restrictions?

Yes, you need the careful and freeze utilities to enforce directory-bound edit restrictions, as the guard mode depends on them to read user-specified targets and maintain safety boundaries during operations.

What's the best way to safeguard environments from unauthorized modifications during maintenance?

The best way to safeguard environments from unauthorized modifications during maintenance is to combine destructive-command warnings with directory-scoped edit restrictions, enforcing actions to a predefined path for audit-ready safety.

What are the limitations of relying on directory-scoped edits for production safety?

Limitations of relying on directory-scoped edits for production safety include the strict confinement of actions to a predefined path, meaning any necessary modifications outside the protected directory will be blocked during the constrained session.