guard

Enforce directory boundaries and warn before destructive commands.

46|13|Updated Jul 30, 2025
One-click install
npx skills add https://github.com/aimasteracc/tree-sitter-analyzer --skill guard-aimasteracc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: guard
Source: https://github.com/aimasteracc/tree-sitter-analyzer/tree/main/.claude/skills/guard
Command: npx skills add https://github.com/aimasteracc/tree-sitter-analyzer --skill guard-aimasteracc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Full safety mode blocking dangerous actions by warning before destructive commands and by constraining edits to a designated directory.

Core Features & Use Cases

  • Destructive command warnings: blocks rm -rf, DROP TABLE, and other dangerous operations unless overridden.
  • Directory-bound edits: enforces an edit boundary so changes outside the chosen path are blocked.
  • Hooks and integration: relies on sibling /careful and /freeze components to perform pre-use checks before tool invocation.

Quick Start

Activate guard mode by specifying a target directory to restrict edits and enable destructive-command warnings.

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 commands like rm -rf during development?

To prevent accidental destructive commands like rm -rf, you can activate a full safety mode that intercepts and warns before dangerous operations execute. This safety mechanism blocks risky commands unless explicitly overridden.

How do I restrict code edits to a specific directory boundary?

You can restrict code edits to a specific directory boundary by enforcing an edit constraint during maintenance or debugging sessions. This ensures changes attempted outside the chosen target path are automatically blocked.

Do I need pre-use hooks to enforce safety boundaries in production environments?

Yes, enforcing safety boundaries in production environments requires pre-use hooks to validate tool invocations before they run. These hooks perform pre-use checks to unify destructive-command warnings with code-edit restrictions.

What is the best way to block dangerous SQL operations like DROP TABLE during maintenance?

The best way to block dangerous SQL operations like DROP TABLE during maintenance is to enable a unified safety mode. It enforces warnings on destructive commands and constrains edits to a designated directory path.

When should I not use a full safety mode for debugging?

You should not use full safety mode for debugging when you need to execute rapid unrestricted edits across multiple directories. The enforced directory boundaries and destructive-command warnings will block changes outside the chosen path.