gstack-guard

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

Updated Jun 24, 2026
One-click install
npx skills add https://github.com/tayiorbeii/paperclip-factory-kit-hermes --skill gstack-guard-tayiorbeii
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gstack-guard
Source: https://github.com/tayiorbeii/paperclip-factory-kit-hermes/tree/main/skills/paperclip/gstack-guard
Command: npx skills add https://github.com/tayiorbeii/paperclip-factory-kit-hermes --skill gstack-guard-tayiorbeii

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When working on production systems or debugging live environments, a single destructive command (like rm -rf or DROP TABLE) or an edit to the wrong file can cause serious damage. This Skill combines two safety layers so risky operations are caught before they execute. ## 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 an option to override. - Directory-Scoped Edit Boundary: Edit and Write operations are blocked outside a user-specified directory, enforced via a freeze state file. - Use Case: While hotfixing a live service, activate guard mode and restrict edits to the service's source directory. Any accidental force-push or edit to unrelated config files is flagged or blocked automatically. ## Quick Start Ask the AI to activate guard mode and restrict all edits to your project directory while warning about destructive commands.

Frequently Asked Questions about gstack-guard

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

FAQPage Schema
How do I block destructive commands like rm -rf in Claude Code?▼

Activate guard mode, which installs 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.

How to restrict AI file edits to a specific directory?▼

Guard mode asks which directory to restrict edits to, resolves it to an absolute path, and saves it to a freeze state file. PreToolUse hooks on Edit and Write then block any file modification outside that boundary.

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

No. Guard mode references hook scripts from the sibling careful and freeze skill directories, so both must be installed. They are installed together by the gstack setup script.

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

Run the /unfreeze command to remove the directory edit boundary. Destructive command warnings remain active for the session; ending the session deactivates everything.

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

Yes. The destructive command check warns before executing rather than hard-blocking, so you can confirm and proceed. The edit boundary, by contrast, blocks out-of-scope edits until removed with /unfreeze.