guard

Warn before destructive commands and restrict edits to a target directory.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Grants dual safety during risky operations by combining destructive-command warnings with strict directory-based edit boundaries, reducing accidental data loss in production and debugging environments.

Core Features & Use Cases

  • Destructive-command warnings trigger before rm -rf, DROP TABLE, force-push, and other dangerous actions.
  • Directory-bound edits restrict file changes to a user-specified path, preventing edits outside the boundary.
  • Useful in production debugging, risk assessments, and any workflow where you need enforceable guardrails around destructive actions.

Quick Start

Execute guard mode to enable destructive-command warnings and a directory edit boundary for a chosen 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 destructive commands like rm -rf during local development?

To prevent accidental destructive commands, you can enable guard mode to trigger warnings before actions like rm -rf or force-push. This pairs shell warnings with directory-bound restrictions to reduce data loss during risky operations.

Can I restrict file edits to a specific directory boundary in bash?

Yes, you can restrict file edits to a specific directory boundary by prompting for a target path. The boundary persists across sessions to enforce ongoing protection and prevent any file changes outside the chosen directory.

Does guard mode work for production debugging and deployment workflows?

Guard mode works directly in production debugging and deployment workflows to provide dual safety. It applies enforceable guardrails around destructive actions and restricts directory edits during risk assessments and safe changes.

What is the best way to lock down file edits and shell actions across sessions?

The best way to lock down edits and shell actions is enabling boundary-locked edits that persist protection during sessions. It relies on sibling careful and freeze skills to maintain directory restrictions and destructive warnings.

Do I need sibling skills to enforce directory restrictions and destructive warnings?

Yes, you need sibling careful and freeze skills to enforce directory restrictions and destructive warnings. Guard mode relies on these sibling skills to pair shell action warnings with strict path boundaries during local development.