guard

Warn on destructive commands and enforce a directory-scoped edit boundary.

1|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/apeejay-education/cadencesprout --skill guard-apeejay-education
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: guard
Source: https://github.com/apeejay-education/cadencesprout/tree/main/.agents/skills/gstack-guard
Command: npx skills add https://github.com/apeejay-education/cadencesprout --skill guard-apeejay-education

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents accidental data loss and system disruption by adding warnings for potentially destructive commands and enforcing a directory-scoped edit boundary.

Core Features & Use Cases

  • Destructive command warnings: detects dangerous commands (rm -rf, DROP TABLE, force-push, git reset --hard) and prompts for confirmation before execution.
  • Directory-scoped edits: restricts edits to a user-specified directory to prevent changes outside the safe boundary.
  • Combined safety rails: unifies safeguards with companion scripts to provide comprehensive protection during prod debugging or risky operations.
  • Use Case: A developer runs a risky operation; the skill warns and blocks edits outside the approved folder.

Quick Start

Enable guard mode and specify the protected directory, then confirm before any destructive action is executed.

Frequently Asked Questions about guard

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

FAQPage Schema
How do I prevent accidental data loss from destructive shell commands like rm -rf?

To prevent accidental data loss from destructive shell commands, you can enable guard mode to detect operations like rm -rf, DROP TABLE, and git reset --hard, prompting for confirmation before execution.

Can I restrict file edits to a specific directory boundary?

Yes, you can restrict file edits to a specific directory boundary by specifying a protected directory path when enabling guard mode, which blocks any modifications outside the approved folder.

How do I add safety guardrails for risky operations during production debugging?

To add safety guardrails for risky operations during production debugging, enable guard mode and combine it with companion safety scripts to enforce directory boundaries and provide comprehensive protection.

Does guard mode work with git force-push and git reset --hard?

Yes, guard mode works with git force-push and git reset --hard by detecting these destructive version control commands and requiring explicit user confirmation before the operations are executed.

What are the limitations of directory-scoped edit boundaries for DevOps safety?

The limitation of directory-scoped edit boundaries is that protection only applies within the user-specified directory path, requiring integration with companion safety scripts to achieve comprehensive production guardrails.