guard

Enforce dual guardrails for careful and freeze modes via PreToolUse hooks.

11|Updated Feb 18, 2026
One-click install
npx skills add https://github.com/pillip/claude-dev-kit --skill guard-pillip
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: guard
Source: https://github.com/pillip/claude-dev-kit/tree/main/skills/guard
Command: npx skills add https://github.com/pillip/claude-dev-kit --skill guard-pillip

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Guard mode prevents accidental destructive changes by enforcing dual guardrails that warn on dangerous commands and restrict edits to a specified boundary.

Core Features & Use Cases

  • Careful mode: Warns on potentially destructive Bash commands (rm -rf, git reset --hard, etc.)
  • Freeze mode: Blocks edits outside the allowed directory boundary (edits restricted to the specified path)
  • Activation/deactivation workflow is triggered automatically via PreToolUse hooks for safe operation

Quick Start

Activate guard mode by specifying the directory path to enforce editable boundaries.

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 bash commands in my CLI workflow?

Preventing accidental destructive bash commands is achieved by enabling careful mode, which automatically warns on dangerous commands like rm -rf or git reset --hard before execution.

What is the best way to restrict file edits to a specific directory boundary?

Restricting file edits to a specific directory boundary is done by activating freeze mode, which blocks any edits outside the allowed path to prevent accidental changes to surrounding files.

How does boundary resolution work when restricting edits to a directory?

Boundary resolution works by enforcing the specified directory path during PreToolUse hooks, ensuring freeze mode blocks edit operations targeting files outside that defined absolute boundary.

Can I activate and deactivate guardrails automatically during CLI work?

Activating and deactivating guardrails automatically is supported through a straightforward workflow triggered by PreToolUse hooks, handling activation messaging and boundary enforcement without manual intervention.

Do I need any dependencies to enable dual guardrails for safe editing?

No dependencies are needed to enable dual guardrails for safe editing, as careful and freeze modes operate directly through PreToolUse hooks without requiring external packages.

When should I not use freeze mode for restricting directory edits?

Freeze mode for restricting directory edits should not be used when your workflow requires modifying files outside the specified boundary, as it strictly blocks all external path modifications without exception.