freeze

Restrict Edit and Write operations to a designated directory.

Updated Feb 27, 2026
One-click install
npx skills add https://github.com/zhifengzhang-sz/divine-book --skill freeze-zhifengzhang-sz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: freeze
Source: https://github.com/zhifengzhang-sz/divine-book/tree/main/.claude/skills/gstack/freeze
Command: npx skills add https://github.com/zhifengzhang-sz/divine-book --skill freeze-zhifengzhang-sz

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Restrict edits to a specific directory for the duration of the session, preventing edits outside the allowed path and helping avoid accidental changes.

Core Features & Use Cases

  • Lock edits to a specific directory for the session.
  • Prevent Edit and Write outside the allowed path.
  • Use during debugging to scope changes to a module and avoid accidental project-wide edits.

Quick Start

Ask the user to specify a directory, then set the freeze boundary so that only edits inside that directory are allowed.

Frequently Asked Questions about freeze

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

FAQPage Schema
How do I restrict file edits to a specific directory during an active coding session?

To restrict file edits to a specific directory, you can lock a designated path boundary using a pre-tool hook that enforces Edit and Write operations, preventing unintended project-wide changes during debugging.

What is the best way to prevent accidental edits outside a module while debugging?

Preventing accidental edits outside a module while debugging is achieved by setting a persistent directory boundary in a state file, which scopes changes and blocks any Write or Edit operations outside that allowed path.

How does a pre-tool hook enforce directory boundaries for file modifications?

A pre-tool hook enforces directory boundaries by intercepting Edit and Write operations and checking them against a persistent boundary stored in a state file, rejecting any modifications that fall outside the allowed directory.

Can I lock edits to a directory for the entire session to isolate changes to a module?

Yes, you can lock edits to a directory for the entire session to isolate changes to a module, ensuring the restriction persists and prevents any unintended modifications to the rest of the project.

Do I need to specify a directory before freezing edits to prevent project-wide changes?

Yes, you need to specify a target directory before freezing edits, which establishes the allowed path boundary and ensures all subsequent Write and Edit operations are restricted to that location.

What happens to Write operations outside the allowed path when a directory is frozen?

When a directory is frozen, Write operations outside the allowed path are automatically blocked by the pre-tool hook, preventing unintended changes and keeping edits strictly within the designated boundary.