freeze

Restrict AI Edit and Write operations to files within a chosen directory.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Prevents an AI coding agent from accidentally editing the wrong part of a codebase when you need to focus changes to a single module or directory.

Core Features & Use Cases

  • Manual trigger: Runs only when the user explicitly invokes /freeze.
  • Edit/Write boundary enforcement: Blocks any Edit or Write operation targeting files outside the allowed directory.
  • Session-scoped persistence: Stores and re-reads the freeze boundary from a state file on each Edit/Write attempt.

Quick Start

Ask your AI to invoke /freeze, then provide the directory path you want to allow edits within.

Frequently Asked Questions about freeze

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

FAQPage Schema
How do I restrict AI edits to a specific directory during refactoring?

Preventing accidental code changes during AI debugging involves setting an edit boundary. By invoking a command like /freeze, you define a single allowed directory, and PreToolUse hooks block any write operations targeting files outside that path.

How does an edit boundary prevent accidental changes to unrelated code?

An edit boundary prevents accidental changes by validating the file_path of every Edit or Write attempt against a persisted allowed directory. If the target path does not start with the frozen directory, the operation is automatically denied.

Can I use tool hooks to block AI write permissions for a specific module?

Yes, you can block AI write permissions for a specific module using PreToolUse tool hooks. The freeze feature intercepts write operations and denies permission if the target file_path falls outside your chosen directory scope.

Does the directory scoped edit restriction persist across multiple operations?

Yes, the directory scoped edit restriction persists across operations within the session. The allowed boundary is stored in a state file and re-read on each Edit or Write attempt to continuously enforce the safety zone.

When should I apply a directory boundary for safe refactoring?

You should apply a directory boundary for safe refactoring when debugging or modifying a specific module. This prevents the AI agent from accidentally editing unrelated parts of the codebase outside your chosen directory scope.