freeze

Restricts Edit and Write operations to a user-specified directory via PreToolUse hooks.

2|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/westkite1201/garden-engine --skill freeze-westkite1201
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: freeze
Source: https://github.com/westkite1201/garden-engine/tree/main/.claude/skills/gstack/freeze
Command: npx skills add https://github.com/westkite1201/garden-engine --skill freeze-westkite1201

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When debugging or working in a large codebase, it is easy to accidentally modify unrelated files while trying to fix one module. This Skill enforces a hard boundary so that any Edit or Write outside a chosen directory is blocked, preventing unintended changes during focused work. ## Core Features & Use Cases - Edit Boundary Enforcement: A PreToolUse hook intercepts every Edit and Write call and denies operations targeting files outside the frozen directory. - Session-Persistent State: The freeze boundary is stored in a state file and persists for the entire session until removed with /unfreeze or session end. - Path Normalization: Handles relative paths, trailing slashes, and prefix collisions (e.g., /src vs /src-old) so the boundary is applied correctly. - Use Case: While debugging a failing module in src/payments, freeze edits to that directory so the assistant cannot accidentally "fix" unrelated code elsewhere in the repository. ## Quick Start Ask the assistant to freeze edits to a specific directory, for example: restrict all edits to the src/payments folder for this session.

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 one directory in a coding session?

Run the freeze command and provide the target directory when prompted. The skill resolves it to an absolute path, saves it to a state file, and a PreToolUse hook then blocks any Edit or Write outside that path for the rest of the session.

How do I remove or change the edit freeze boundary?

Run /freeze again to set a new boundary directory, or run /unfreeze to remove the restriction entirely. Ending the conversation also clears the freeze since the boundary is session-scoped.

Does the freeze hook block Bash commands that modify files?

No. The hook only intercepts Edit and Write tool calls. Bash commands such as sed can still modify files outside the boundary, so freeze is a guardrail against accidental edits, not a security boundary.

Why does the freeze directory need a trailing slash?

The trailing slash prevents prefix collisions, so a freeze on /src does not accidentally match a sibling directory like /src-old. The setup step normalizes the path and appends the slash before saving it.

What happens if the freeze hook cannot parse the file path?

The script fails open: if the file_path cannot be extracted from the tool input JSON, it returns an empty allow decision rather than blocking. It tries grep/sed first and falls back to Python JSON parsing.