What problem does it solve?
When working on production systems, running AI agents in fully autonomous mode, or performing sensitive operations like database migrations and code deployments, accidental execution of destructive commands (such as rm -rf, git push --force, or DROP TABLE) or unintended file edits can lead to catastrophic data loss, extended system downtime, and security vulnerabilities. This Skill eliminates these risks by providing lightweight, configurable protection layers that integrate directly with agent tool execution.
Core Features & Use Cases
- Careful Mode: Intercepts high-risk destructive commands before execution, explains what the command will do, requests user confirmation, and suggests safer alternatives for common dangerous patterns like rm -rf, git reset --hard, docker system prune, and npm publish.
- Freeze Mode: Locks all file write and edit operations to a specified directory tree, blocking any modifications outside the allowed path to keep autonomous agents focused on a single, designated code area.
- Guard Mode: Combines both Careful and Freeze modes for maximum safety, allowing unrestricted read access while restricting writes to a defined directory and blocking all destructive commands across the entire system.
- Use Case: A DevOps team running autonomous code generation agents for a microservices codebase can enable Guard Mode to ensure the agent only edits files in the src/api/ directory and cannot accidentally delete critical production data or force-push unvetted code to the main branch.
Quick Start
Enable the Safety Guard skill to automatically block high-risk destructive commands and restrict file write operations to your specified project directory for safe autonomous AI agent workflows.