guard

Warn on destructive shell commands and restrict file edits to an approved directory.

Updated Mar 30, 2026
One-click install
npx skills add https://github.com/GenEducation/GenedUIProject --skill guard-geneducation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: guard
Source: https://github.com/GenEducation/GenedUIProject/tree/main/.gemini/skills/guard
Command: npx skills add https://github.com/GenEducation/GenedUIProject --skill guard-geneducation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Guard prevents accidental damage during terminal work by warning on destructive commands and blocking edits outside a chosen directory.

Core Features & Use Cases

  • Warns before risky Bash actions like rm -rf, force-push, and destructive database operations.
  • Restricts file edits and writes to a single approved path during debugging or live-system maintenance.
  • Use it when you need maximum safety while operating on production systems, sensitive repos, or scoped troubleshooting tasks.

Quick Start

Use the guard skill to enable destructive-command warnings and ask me which directory edits should be restricted to.

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 production debugging?

You can prevent accidental destructive commands during production debugging by using hook-based enforcement that warns before risky Bash actions like rm -rf, force-push, and destructive database operations execute in your terminal.

How do I restrict file edits to a specific directory boundary during live system maintenance?

To restrict file edits to a specific directory boundary during live system maintenance, you can apply boundary checks that block all file writes and edits attempted outside of a single approved directory path.

What is the best way to add safety warnings for risky shell commands in terminal sessions?

The best way to add safety warnings for risky shell commands is to implement hook-based enforcement for Bash tools that monitors and flags destructive operations before they run in high-risk terminal sessions.

Can I block edits outside an approved path without disabling terminal access entirely?

Yes, you can block edits outside an approved path without disabling terminal access entirely by enforcing directory boundary checks that restrict file modifications while still allowing monitored shell command execution.

When do I need to lock down edits and risky commands in a terminal environment?

You need to lock down edits and risky commands when operating on production systems, sensitive repositories, or scoped troubleshooting tasks where unrestricted file writes and destructive shell actions pose an accident risk.