freeze

Blocks Edit and Write operations outside a user-specified directory boundary.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/LGJ-Jonathan/Jonathan_Global_Claude_Skills --skill freeze-lgj-jonathan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: freeze
Source: https://github.com/LGJ-Jonathan/Jonathan_Global_Claude_Skills/tree/main/gstack/freeze
Command: npx skills add https://github.com/LGJ-Jonathan/Jonathan_Global_Claude_Skills --skill freeze-lgj-jonathan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When debugging or working on one module, AI-assisted edits can accidentally modify unrelated files across the repository. This Skill restricts all Edit and Write operations to a single directory, preventing unintended changes outside the scope you define. ## Core Features & Use Cases - Edit Boundary Enforcement: A PreToolUse hook intercepts every Edit and Write call and denies any operation targeting a file 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: Resolves symlinks, relative paths, and trailing slashes so boundary checks cannot be bypassed by path tricks like /src-old matching /src. - Use Case: While debugging a payment module, freeze edits to src/payments/ so the AI cannot accidentally "fix" unrelated code in other parts of the codebase. ## Quick Start Ask the AI to freeze edits to a specific directory, for example: restrict edits to the src/payments folder so no files outside it can be modified.

Frequently Asked Questions about freeze

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

FAQPage Schema
How do I restrict AI file edits to one directory?

Run the /freeze command and provide the directory path when prompted. The skill saves the absolute path to a state file, and a PreToolUse hook then blocks every Edit or Write operation targeting files outside that directory for the rest of the session.

How do I remove or change the freeze boundary?

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

Does the freeze skill block Bash commands from modifying files?

No. The freeze boundary applies only to the Edit and Write tools. Bash commands such as sed can still modify files outside the boundary, so it prevents accidental edits rather than acting as a security boundary.

Why does the freeze directory need a trailing slash?

The trailing slash ensures prefix matching stays accurate, 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 automatically.

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

The hook fails open: if it cannot extract a file_path from the tool input JSON, it allows the operation rather than blocking it. It tries grep/sed extraction first, then falls back to a Python JSON parser.