guard

Warn on destructive commands and restrict file edits to a specified directory.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ensures operational safety by warning about destructive commands and enforcing edits only within a user-defined directory, reducing the risk of data loss during maintenance or debugging on production systems.

Core Features & Use Cases

  • Destructive command warnings: detects risky commands (rm -rf, DROP TABLE, force-push, git reset --hard, etc.) and prompts for confirmation before execution.
  • Directory-scoped edits: blocks edits outside the defined boundary to protect critical paths, preventing accidental changes.
  • Integrated guardrails: combines /careful and /freeze tooling to provide a unified safety posture during sensitive operations and audits.

Quick Start

Initialize guard mode and specify the restricted directory; then invoke /guard to enable protections for the session.

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 maintenance?

To prevent accidental destructive commands during production maintenance, you need a safety guardrail that detects risky actions like rm -rf or force-push and prompts for confirmation before execution. This Skill provides that warning mechanism.

How can I enforce edit boundaries to restrict file changes to a specific directory?

To enforce edit boundaries and restrict file changes to a specific directory, you apply a guard mode that blocks edits outside your defined path. This protects critical directories from accidental modifications during debugging.

What is the best way to warn against risky shell commands like git reset --hard?

The best way to warn against risky shell commands like git reset --hard is to integrate a validation layer that checks commands before execution. This mechanism intercepts dangerous operations and requires explicit confirmation.

Can I lock file edits within a designated path while debugging prod systems?

Yes, you can lock file edits within a designated path while debugging prod systems by initializing guard mode. This enforces a strict boundary, ensuring no unintended changes occur outside the scoped directory.

Does this command safety approach work without external dependencies?

Yes, this command safety approach works without external dependencies because it integrates tooling like careful and freeze scripts natively. It provides a unified safety posture directly within your session.

When should I not use directory-scoped edit boundaries?

You should not use directory-scoped edit boundaries when your workflow requires modifying files across multiple unrestricted paths. The enforcement locks edits within a specific directory, which will block necessary changes outside that boundary.