guard

Warn before destructive shell commands and restrict file edits to a directory.

Updated Mar 16, 2026
One-click install
npx skills add https://github.com/DaviRain-Su/sui-zig-rpc-client --skill guard-davirain-su
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: guard
Source: https://github.com/DaviRain-Su/sui-zig-rpc-client/tree/main/.agents/skills/gstack-guard
Command: npx skills add https://github.com/DaviRain-Su/sui-zig-rpc-client --skill guard-davirain-su

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

The guard Skill provides an additional layer of security by offering warnings for potentially destructive commands and restricting edits to a specified directory.

Core Features & Use Cases

  • Destructive Command Warnings: Warns before executing commands that could have severe consequences, like rm -rf, DROP TABLE, and force-push.
  • Directory-Scope Edits: Prevents file edits outside a designated directory to protect system integrity.
  • Use Case: When performing maintenance on a production server, you might want to activate the guard Skill to minimize the risk of accidental data loss or system corruption.

Quick Start

Use the guard skill to restrict edits to the /home/user/data directory.

Frequently Asked Questions about guard

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

FAQPage Schema
How do I prevent accidental data loss from destructive shell commands during server maintenance?

To prevent accidental data loss from destructive shell commands, you can enforce warnings for operations like `rm -rf` and `DROP TABLE` before execution. This provides an additional security layer by intercepting potentially severe actions during system maintenance.

How can I restrict file edits to a specific directory to protect system integrity?

You can restrict file edits to a specific directory by defining a protection scope through user input and hook scripts. This ensures only authorized operations are performed within that designated directory, preventing any modifications outside of it and maintaining system integrity.

What is the best way to add warnings for risky commands like force-push and rm -rf?

The best way to add warnings for risky commands like force-push and rm -rf is to implement a safety enforcement layer that monitors shell commands. It alerts you before executing commands that could have severe consequences, minimizing the risk of accidental corruption.

Do I need hook scripts to enforce directory-scoped edit restrictions?

Yes, you need proper hook scripts to enforce directory-scoped edit restrictions. These scripts work alongside user input to define the protection scope, ensuring that file edits are actively prevented outside the designated directory.

Does this command safety mechanism work for protecting sensitive production server directories?

Yes, this command safety mechanism works for protecting sensitive production server directories. By activating the guard scope during maintenance, it minimizes the risk of accidental data loss or system corruption by restricting edits and warning against destructive operations.