guard

Intercept destructive shell commands and restrict file writes to a defined directory.

Updated Jun 5, 2026
One-click install
npx skills add https://github.com/smarmen86/claude-code-kit --skill guard-smarmen86
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: guard
Source: https://github.com/smarmen86/claude-code-kit/tree/main/skills/guard
Command: npx skills add https://github.com/smarmen86/claude-code-kit --skill guard-smarmen86

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill prevents accidental destructive actions and unauthorized file modifications by enforcing strict safety boundaries during sensitive operations.

Core Features & Use Cases

  • Destructive Command Warnings: Intercepts dangerous commands like rm -rf or database drops to prevent accidental data loss.
  • Directory-Scoped Edits: Restricts file system modifications to a specific, user-defined directory to prevent unintended changes to project files.
  • Use Case: When working on a production server, activate this skill to ensure that no files outside your designated working directory can be edited and that any high-risk command triggers a confirmation prompt.

Quick Start

Activate the guard skill and follow the prompt to specify the directory where you want to restrict all future file edits.

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 shell commands from causing data loss on production servers?

To prevent destructive shell commands from causing data loss, you can enforce safety protocols that intercept dangerous commands like rm -rf and trigger confirmation prompts before execution. This mechanism protects production systems from accidental deletion.

Can I restrict file system write operations to a specific directory scope?

Yes, you can restrict file system write operations to a specific directory scope by defining a user-approved working path. The system enforces path-based boundaries to ensure no files outside the designated directory can be modified.

How do I protect live systems from unauthorized configuration changes in multi-agent environments?

To protect live systems from unauthorized configuration changes in multi-agent environments, you can deploy automated safety boundaries that intercept destructive shell commands and restrict file modifications to validated directory scopes.

Does this command interception mechanism require integrating with external validation scripts?

Yes, this command interception mechanism requires integration with careful and freeze utility scripts to validate command execution and enforce strict path-based boundaries for file system modifications.

What is the best way to ensure no files outside my working directory get edited during live system operations?

The best way to ensure no files outside your working directory get edited is to activate directory-scoped restrictions that enforce strict file system write boundaries, preventing unintended modifications to project files during live operations.