safety-guard

Intercept and validate system commands and file operations against safety patterns.

Updated Jul 8, 2026
One-click install
npx skills add https://github.com/ZESCODE/Zes-Orchestration-System --skill safety-guard-zescode
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: safety-guard
Source: https://github.com/ZESCODE/Zes-Orchestration-System/tree/main/.agents/skills/safety-guard
Command: npx skills add https://github.com/ZESCODE/Zes-Orchestration-System --skill safety-guard-zescode

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill prevents accidental or malicious destructive operations, such as file deletion or unauthorized system changes, when agents are operating in production or autonomous environments.

Core Features & Use Cases

  • Careful Mode: Intercepts and warns against dangerous commands like rm -rf, git push --force, or sudo rm before they execute.
  • Freeze Mode: Restricts agent file edits to a specific directory tree, ensuring the AI stays within the intended project scope.
  • Guard Mode: Combines both protections for maximum safety during autonomous agent sessions.

Quick Start

Activate the safety guard in guard mode to restrict all write operations to the src/api directory while maintaining read access to the entire project.

Frequently Asked Questions about safety-guard

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

FAQPage Schema
How do I prevent autonomous agents from executing destructive shell commands?

You can prevent destructive file operations by activating Freeze Mode, which restricts agent file edits to a specific directory tree. This ensures the AI stays within the intended project scope while maintaining read access to the broader environment.

How do I restrict agent file system write requests to a specific directory?

You can restrict file system write requests by activating Freeze Mode, which locks agent scope to a specific directory tree. This ensures the AI stays within the intended project scope while maintaining read access to the broader environment.

How do I monitor and log blocked shell commands for observability?

Guard Mode combines Careful Mode and Freeze Mode to provide maximum safety during autonomous agent sessions. It intercepts dangerous commands and restricts file edits to a specific directory tree simultaneously, ensuring comprehensive protection for production environments.

What is the best way to lock agent scope to a specific directory tree?

The best way to lock agent scope is using Freeze Mode, which restricts all file edit operations to a predefined directory tree. This prevents the AI from modifying files outside the intended project scope during autonomous execution.

Do I need PreToolUse hooks to enforce security policies for autonomous agents?

This safety guard validates system commands and file operations against predefined safety patterns and directory constraints. It monitors shell commands and file system write requests to prevent destructive actions during autonomous agent execution in production environments.

Can I combine command interception and directory restrictions for maximum safety?

Yes, you can combine both protections by activating Guard Mode. Guard Mode merges Careful Mode's command interception with Freeze Mode's directory restrictions, providing maximum safety during autonomous agent sessions in production environments.