freeze

Restrict Edit and Write operations to a specified directory during a session.

Updated Mar 28, 2026
One-click install
npx skills add https://github.com/24601/gastack-pre-fork --skill freeze-24601
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: freeze
Source: https://github.com/24601/gastack-pre-fork/tree/main/freeze
Command: npx skills add https://github.com/24601/gastack-pre-fork --skill freeze-24601

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires python3.

What problem does it solve?

Prevents accidental or out-of-scope file modifications by blocking Edit and Write operations that target files outside a user-specified directory during a session. This helps maintain focus on a single module or folder while debugging or making scoped changes.

Core Features & Use Cases

  • Session-scoped freeze boundary: Stores an absolute freeze directory and enforces it for the session so only files within that path can be edited.
  • PreToolUse hook enforcement: Runs a hook on Edit and Write operations that checks the tool input's file_path and returns permissionDecision: "deny" for out-of-bound edits.
  • Use Case: When working on a payments/ module, freeze edits to payments/ to ensure changes do not accidentally modify shared code in other directories.

Quick Start

Ask the assistant to freeze edits to /path/to/dir to restrict all Edit and Write operations to that directory.

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 a debugging session?▼

Restricting file edits to a specific directory prevents accidental modifications to out-of-scope files. A PreToolUse hook inspects the file_path in Edit and Write tool inputs and denies permission for any paths outside your defined freeze boundary.

Can I lock Write and Edit operations to a single module to protect shared code?▼

Locking Write and Edit operations to a single module prevents accidental changes to shared code. By freezing edits to a target directory like a payments/ folder, the session blocks any tool invocations targeting files outside that path.

How does a PreToolUse hook validate file paths before an edit is applied?▼

A PreToolUse hook validates file paths by inspecting the tool input before execution. It checks the file_path argument against an stored absolute freeze directory and returns a deny permission decision if the target falls outside the boundary.

Do I need python3 installed to enforce path validation for file safety?▼

Python3 is required to enforce path validation because the hook relies on it for JSON fallback parsing. The system also needs a writable state file in your plugin data directory or home config folder to store the active freeze path.

What happens if I try to modify a file outside the frozen directory boundary?▼

Attempting to modify a file outside the frozen directory boundary triggers an immediate block. The PreToolUse hook returns a deny decision for that Edit or Write operation, stopping the accidental change before it can be applied to the file system.

What are the limitations of using a session-scoped freeze boundary for edit control?▼

A session-scoped freeze boundary limits edit control to the active session and requires a writable state file to function. It does not restrict file deletions or moves, and it relies on python3 being available in the environment to handle JSON fallback.