freeze

Restrict Edit and Write operations to a user-specified directory for a session.

Updated Apr 13, 2026
One-click install
npx skills add https://github.com/mgher668/surf-ai --skill freeze-mgher668
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: freeze
Source: https://github.com/mgher668/surf-ai/tree/main/.agents/skills/gstack/freeze
Command: npx skills add https://github.com/mgher668/surf-ai --skill freeze-mgher668

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Restrict edits to a single, user-defined directory for the session to prevent accidental changes outside the intended module.

Core Features & Use Cases

  • Enforces a session-scoped edit boundary by blocking Edit and Write operations outside the configured directory.
  • Uses an interactive AskUserQuestion prompt to gather the boundary and persists it across the session for consistent behavior.
  • Provides a lightweight Bash-based pretool hook and script check to enforce the boundary at runtime.

Quick Start

Ask the user which directory to restrict edits to, and apply the boundary for the current 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 a specific directory during a coding session?

You can restrict file edits to a specific directory by applying a session-scoped edit boundary. A Bash pretool hook intercepts Edit and Write operations, blocking file modifications outside the configured directory boundary.

Can I lock write operations to a single folder to prevent accidental changes?

Yes, you can lock write operations to a single folder by enforcing a session-scoped directory boundary. This mechanism applies checks to Edit and Write operations, ensuring no accidental file modifications happen outside your intended target folder.

How does a pretool hook enforce a directory boundary for file modifications?

A pretool hook enforces a directory boundary by running a Bash script check before Edit or Write operations execute. It validates the target file path against a persisted state store and blocks the action if it falls outside the allowed directory.

Does the edit boundary persist across the entire session or do I need to reset it?

The edit boundary persists across the entire session. Once the target directory is configured, the boundary state is saved in a state store, ensuring consistent runtime enforcement for all subsequent file modifications without requiring a reset.

What is the best way to prevent accidental file edits outside a project module?

The best way to prevent accidental file edits outside a project module is to set a session-scoped edit boundary. By locking Edit and Write operations to a user-specified directory, you isolate changes and protect the rest of your codebase.