guard

Warn on destructive commands and block edits outside a chosen directory.

Updated Apr 3, 2026
One-click install
npx skills add https://github.com/Intension-us/attention-diagnostic --skill guard-intension-us
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: guard
Source: https://github.com/Intension-us/attention-diagnostic/tree/main/.claude/skills/gstack/guard
Command: npx skills add https://github.com/Intension-us/attention-diagnostic --skill guard-intension-us

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Keeps development and production work safe by warning on destructive commands and preventing edits outside a defined directory.

Core Features & Use Cases

  • Destructive-command warnings: surfaces potential dangerous actions before they run.
  • Directory-boundary enforcement: blocks edits outside the chosen path to protect critical areas.
  • Quick deployment in gstack: combines careful and freeze tools to provide a single safety layer for prod or debugging sessions.

Quick Start

Specify the directory to protect and activate guard mode.

Frequently Asked Questions about guard

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

FAQPage Schema
How do I prevent accidental file edits outside of a specific project directory?

Preventing accidental file edits outside a specific directory requires enforcing an edit boundary that blocks modifications beyond a chosen path. This approach confines changes to a defined scope, protecting critical areas from unintended modifications during development.

What are destructive command warnings and how do they protect production environments?

Destructive command warnings are pre-execution alerts that surface potentially dangerous actions before they run. They protect production environments by prompting user confirmation, preventing irreversible damage to critical systems during active debugging or deployment sessions.

How do I set up a directory boundary to protect critical production files?

Setting up a directory boundary involves specifying a target directory to protect, which activates enforcement mechanisms. This blocks edit operations attempted outside the chosen path, safeguarding critical production files from unintended modifications during active sessions.

Can I audit and log file modification attempts within a protected directory?

You can audit and log file modification attempts within a protected directory. Pre-tool hooks log activity for auditing, recording actions that trigger destructive warnings or hit the enforced edit boundary for later security review.

Does guard mode work for both production safety and active debugging sessions?

Guard mode works for both production safety and active debugging sessions. It combines destructive-command warnings with edit-boundary enforcement to provide a single safety layer suitable for protecting critical systems during various development and operations.

What happens when a destructive command is triggered inside a protected directory boundary?

When a destructive command is triggered inside a protected directory boundary, the system surfaces a warning before execution. The edit boundary logs the activity for auditing while alerting the user to the potentially dangerous action, preventing irreversible damage.