freeze

Deny Edit and Write operations outside a specified directory.

Updated Mar 15, 2026
One-click install
npx skills add https://github.com/Jaykaijack/openclaw-backup --skill freeze-jaykaijack
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: freeze
Source: https://github.com/Jaykaijack/openclaw-backup/tree/main/skills/gstack/freeze
Command: npx skills add https://github.com/Jaykaijack/openclaw-backup --skill freeze-jaykaijack

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents accidental or out-of-scope modifications by blocking Edit and Write operations that target files outside a user-specified directory during the session. This is useful when debugging, working on a single module, or when you want to limit the AI's editable surface to a focused area.

Core Features & Use Cases

  • Session-scoped edit restriction: Asks the user for a directory and enforces that subsequent Edit and Write tool actions only affect files under that path.
  • PreTool hooks: Runs a hook script before Edit/Write to examine the tool input and return a permissionDecision deny for disallowed paths.
  • Persistent boundary state: Stores the resolved absolute freeze path in a state file so the boundary is checked for the duration of the session.
  • Use Case: When debugging a bug in a single package, freeze to that package directory to ensure automated edits or fixes do not touch other parts of the repository.

Quick Start

Freeze edits to the directory /src so that any Edit or Write outside /src will be blocked.

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 interactive session?

You can restrict file edits by setting a freeze boundary that blocks Edit and Write operations targeting paths outside your specified directory. This prevents accidental modifications across the broader repository.

How does a pretool hook prevent out-of-scope file modifications?

A pretool hook runs before Edit or Write actions to examine the tool input's file path. If the path falls outside the allowed directory boundary, the hook returns a deny decision to block the operation.

When do I need to lock edits to a single module in a repository?

You need to lock edits when debugging a bug in a single package or modifying a specific module. Restricting the editable surface ensures automated fixes do not touch other parts of the repository.

Can I persist the edit restriction boundary across my entire session?

Yes, you can persist the edit restriction boundary across your session. The resolved absolute freeze path is stored in a state file, ensuring the boundary is checked continuously for the duration of the session.

What happens if an automated edit targets a file outside the allowed directory?

If an automated edit targets a file outside the allowed directory, the pretool hook checks the file path against the persisted freeze boundary and returns a permission decision to deny the action.

Does the edit restriction feature require any external dependencies to work?

No, the edit restriction feature requires no external dependencies. It operates independently by reading the freeze boundary from a state file and validating file paths on every Edit and Write hook.