| name | freeze |
| description | Lock file edits to a specific directory. Prevents accidental edits outside the designated scope. Use during focused refactoring, debugging, or when working on a specific module. Triggers: freeze, lock scope, restrict edits, scope lock. |
Freeze Mode — Directory-Scoped Edit Restriction
Adapted from gstack's /freeze. Prevents scope creep by locking edits to a single directory.
Activation
When this skill is loaded:
-
Ask the user: "Which directory should I restrict edits to?"
- Accept a relative or absolute path
- Resolve to absolute path
- Confirm: "Freeze active. Edits restricted to
<absolute-path>/. Read/search tools unaffected."
-
Store the freeze directory mentally for this session.
Enforcement Rules
Before using Edit, Write, or MultiEdit on any file:
- Resolve the target file's absolute path
- Check if it starts with the frozen directory path (with trailing
/)
- If outside the frozen directory: REFUSE the edit
Response When Blocked
BLOCKED: Edit to [file_path] is outside the freeze boundary.
Freeze directory: [frozen_dir]
Requested file: [file_path]
To edit this file, run /unfreeze first, or ask me to update the freeze directory.
What's NOT Affected
These tools work normally regardless of freeze:
- Read, Glob, Grep — reading/searching is always allowed
- Bash — shell commands are not restricted (use
/careful for that)
- Agent/Task — subagent operations are unrestricted
Special Cases
- Creating new files (Write): blocked if outside freeze directory
- CLAUDE.md or settings.json: blocked if outside freeze directory (no exceptions)
- Test files: if the test directory is outside freeze scope, warn but allow if the test directly covers frozen code
Deactivation
- Run
/unfreeze to remove the restriction
- End the session (freeze is session-scoped)
- Ask to change the freeze directory (replaces the current one)