guard

Block unsafe operations with destructive command warnings and directory-based edit boundaries.

1|2|Updated Jan 4, 2024
One-click install
npx skills add https://github.com/NaKMiers/Port4lio --skill guard-nakmiers
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: guard
Source: https://github.com/NaKMiers/Port4lio/tree/main/.agents/skills/guard
Command: npx skills add https://github.com/NaKMiers/Port4lio --skill guard-nakmiers

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Activates both destructive command warnings and directory-scoped edit restrictions. This combined safety layer helps prevent accidental data loss and unauthorized edits in production or live debugging environments.

Core Features & Use Cases

  • Destructive command warnings: prompts before executing dangerous operations like rm -rf, DROP TABLE, or force-push, giving you a chance to cancel.
  • Edit boundary enforcement: uses a configurable freeze boundary to restrict edits to a specific directory, reducing the risk of global filesystem changes.
  • Dependency note: relies on hook scripts from sibling /careful and /freeze skills to implement the safeguards.

Quick Start

Ask the user which directory should edits be restricted to and configure the freeze boundary accordingly.

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 commands during live debugging?

To prevent accidental data loss, guardrails intercept destructive commands like rm -rf or DROP TABLE and prompt for cancellation before execution. This safety layer blocks dangerous operations during live debugging to avoid unauthorized filesystem changes.

How do I restrict AI edits to a specific directory boundary?

To restrict edits to a specific directory, configure a freeze boundary that blocks all modifications outside the given path. This enforcement contains edits within the approved scope, reducing the risk of global filesystem changes.

What is a freeze boundary and how does it protect production environments?

A freeze boundary is a configurable directory-scoped edit restriction that protects production environments by blocking modifications outside a specified path. It combines with destructive command warnings to prevent unsafe operations and unauthorized edits during live development.

Do I need any other skills installed to enforce edit restrictions and destructive command warnings?

Enforcing edit restrictions and destructive command warnings requires integration with sibling /careful and /freeze skill scripts. These dependencies provide the hook scripts necessary to implement the combined safety layer for blocking unauthorized operations.

Can I configure the edit restriction boundary to apply only to a specific project path?

You can configure the edit restriction boundary to apply to a specific project path by setting the freeze boundary accordingly. The system prompts you to specify which directory should be restricted, then blocks all edits outside that configured boundary.

What are the limitations of relying on directory-scoped edit restrictions for DevOps safety?

Directory-scoped edit restrictions depend on sibling /careful and /freeze scripts to function, meaning the safety layer breaks if those integrations are missing. Additionally, it only enforces path-based boundaries and may not catch destructive commands outside its configured scope.