guard

Blocks destructive shell commands and restricts file edits to a chosen directory.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When working on production systems or live environments, a single destructive command (rm -rf, DROP TABLE, force-push) or an edit to the wrong file can cause serious damage. This Skill activates a combined safety mode that warns before dangerous commands and blocks edits outside a directory you specify. ## Core Features & Use Cases - Destructive Command Warnings: PreToolUse hooks intercept Bash commands matching dangerous patterns (rm -rf, DROP TABLE, force-push) and warn before execution, with the option to override. - Directory-Scoped Edit Boundary: Edit and Write operations are restricted to a user-specified directory; changes outside the freeze boundary are blocked. - Use Case: While debugging a live production service, you tell the agent to lock edits to /srv/app/config. Any attempt to modify files elsewhere is blocked, and risky shell commands trigger a confirmation warning first. ## Quick Start Ask the agent to activate guard mode and restrict edits to your target directory, for example: enable full safety mode and only allow edits under /srv/app/config.

Frequently Asked Questions about guard

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

FAQPage Schema
How do I block file edits outside a specific directory?▼

Activate guard mode and provide the target directory path when prompted. The skill resolves it to an absolute path, saves it to a freeze state file, and PreToolUse hooks then block Edit and Write operations outside that boundary.

How do I get warnings before running destructive shell commands?▼

Guard mode registers a PreToolUse hook on Bash that checks commands against destructive patterns such as rm -rf, DROP TABLE, and force-push. Matching commands trigger a warning before execution, and you can choose to override.

Does guard mode work without the careful and freeze skills installed?▼

No. Guard depends on hook scripts from the sibling careful and freeze skill directories under gstack. Both must be installed, which the gstack setup script handles automatically.

How do I turn off the edit boundary after enabling guard mode?▼

Run the /unfreeze command to remove the directory edit restriction. To deactivate all protections entirely, end the current session, since the hooks are session-scoped.

Can I override a destructive command warning in guard mode?▼

Yes. Destructive command checks produce warnings rather than hard blocks, so you can confirm and proceed. Only the directory edit boundary is strictly enforced as a block.