guard

Warn before destructive commands and restrict file edits to a specified directory.

Updated Feb 24, 2026
One-click install
npx skills add https://github.com/Jia-Hong-Peng/jolike.com --skill guard-jia-hong-peng
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: guard
Source: https://github.com/Jia-Hong-Peng/jolike.com/tree/main/.claude/skills/gstack/guard
Command: npx skills add https://github.com/Jia-Hong-Peng/jolike.com --skill guard-jia-hong-peng

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

When working on production systems, critical codebases, or live debugging environments, accidental execution of destructive commands (like rm -rf, DROP TABLE, or force-push) or unintended edits to files outside your target directory can cause irreversible data loss, system outages, or costly hard-to-reverse mistakes.

Core Features & Use Cases

  • Destructive command warnings: Alerts you before running high-risk commands, with the option to override if the action is intentional, preventing accidental system or data damage.
  • Directory-scoped edit restrictions: Blocks all file write and edit operations outside a user-specified directory, limiting the blast radius of any changes to only the intended scope.
  • Use Case: Ideal for performing maintenance on a single production module, debugging a live system without risking unrelated components, or working on sensitive code where you need to ensure no unintended changes are made outside your target area.

Quick Start

Ask the AI to activate guard mode and provide the directory you want to restrict edits to, and it will enable both destructive command warnings and block all edits outside that specified path.

Frequently Asked Questions about guard

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

FAQPage Schema
How do I prevent accidental execution of destructive commands like rm -rf in production?

Preventing destructive command execution in production requires a safety guardrail that intercepts high-risk patterns like rm -rf or DROP TABLE and triggers a pre-execution warning. This allows you to verify or override the action if intentional.

What is directory-scoped edit restriction for safe codebase modifications?

Directory-scoped edit restriction is a safety mechanism that blocks all file write and edit operations outside a user-specified directory path. This limits the operational blast radius to only your intended target area during critical codebase modifications.

How do I restrict file write operations to a specific directory during live debugging?

You can restrict file write operations during live debugging by activating guard mode and providing a target directory path. This enforces directory-scoped restrictions, automatically blocking any unintended edits to files outside that specific scope.

Can I use command safety guardrails for production system maintenance without blocking all overrides?

Yes, command safety guardrails for production system maintenance issue pre-execution warnings for high-risk commands rather than hard blocks. You receive an alert and retain the option to intentionally override the warning to proceed with the action.

When do I need to apply operational blast radius limits for live environment debugging?

You need operational blast radius limits for live environment debugging when working on sensitive code or critical modules to ensure no unintended changes are made. This prevents irreversible data loss by isolating write operations to a specific directory.