guard

Prevent destructive commands and restrict edits to a defined directory in live environments.

1|Updated Apr 6, 2026
One-click install
npx skills add https://github.com/zhu637882-stack/jiaoyi --skill guard-zhu637882-stack
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: guard
Source: https://github.com/zhu637882-stack/jiaoyi/tree/main/qoder-config-backup/skills/gstack-guard
Command: npx skills add https://github.com/zhu637882-stack/jiaoyi --skill guard-zhu637882-stack

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Full safety mode provides a safety net for high-risk operations by warning before destructive commands and enforcing edits only within a designated directory.

Core Features & Use Cases

  • Destructive command warnings: warns before executing potentially dangerous commands like rm -rf, DROP TABLE, or force-push, helping prevent accidental damage.
  • Directory-based edit boundary: restricts file edits to a user-specified path to avoid unintended changes elsewhere.
  • Unified safety workflow: combines the capabilities of the existing careful and freeze components for a single, cohesive safety layer in live environments.

Quick Start

Provide a directory path to restrict edits to, and activate guard mode with destructive-command warnings enabled.

Frequently Asked Questions about guard

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

FAQPage Schema
How do I prevent destructive commands like rm -rf from executing during live maintenance?

To prevent destructive commands during live maintenance, this safety mode intercepts Bash-based hooks to warn before executing potentially dangerous commands like rm -rf, DROP TABLE, or force-push. It provides a safety net that helps avoid accidental damage in production environments.

Can I restrict file edits to a specific directory during production debugging?

Yes, you can restrict file edits to a specific directory during production debugging by defining a directory-based edit boundary. This enforces that modifications only occur within your user-specified path, preventing unintended changes elsewhere in the system.

What is the best way to enforce a safety layer for high-risk deployments?

The best way to enforce a safety layer for high-risk deployments is to activate a unified safety mode that combines destructive command warnings with directory-based edit restrictions. This creates a cohesive safety boundary during safety-critical operations.

Does this safety mode support Bash hooks for edit boundary enforcement?

Yes, this safety mode supports Bash hooks for edit boundary enforcement. It uses Bash-based hooks to actively warn on destructive commands and strictly enforce the configured directory edit boundary during live operations.

When do I need to activate full safety mode for production environments?

You need to activate full safety mode during live maintenance, debugging, and safety-critical deployments where accidental deletions or edits outside approved paths must be avoided. It provides essential protection against unintended changes in production environments.

What limitations should I consider when restricting edits to a defined directory?

When restricting edits to a defined directory, consider that changes outside the specified path are completely blocked, which may impact workflows requiring broader access. This safety boundary is intentionally rigid to prevent unintended modifications during safety-critical operations.