freeze
Restrict file edits to a specific directory for the session. Blocks Edit and Write outside the allowed path. Use when debugging to prevent accidentally "fixing" unrelated code, or when you want to scope changes to one module. Use when asked to "freeze", "restrict edits", "only edit this folder", or "lock down edits".
Security Assessment
About freeze
The 'freeze' skill is designed to restrict file editing to a specific directory during an active session. By setting a freeze boundary, it blocks any Edit or Write operation targeting files outside the designated path, effectively preventing accidental changes to unrelated code. This is particularly useful during debugging or focused development, where maintaining control over which parts of a codebase can be modified is critical. The skill ensures that developers can confidently work within a specific module or folder without unintentionally affecting other areas of a project.
Key features of the 'freeze' skill include interactive setup for selecting the target directory, automatic resolution to an absolute path, and persistence of the freeze boundary for the duration of the session. The skill performs safety checks for all Edit and Write operations, denying any attempt to modify files outside the allowed path. It also preserves the directory structure carefully, using a trailing slash to avoid partial matches, and logs skill usage for tracking. While the restriction applies strictly to Edit and Write tools, Read and other operations like Bash or Grep remain unaffected, making it a practical tool for scoped modifications without interrupting other development tasks.
Use cases for this skill include debugging sessions, module-specific development, and scenarios where code review or testing requires isolation of changes. Target users include developers, code reviewers, and technical leads who need to enforce temporary editing boundaries. It is suitable for teams working in shared repositories or complex projects where accidental edits could introduce errors. By clearly defining the edit scope, the skill helps maintain code integrity and reduces the risk of unintended modifications.
FAQ
How do I set up the freeze skill?
You set up the skill by running the /freeze command, after which you are prompted to provide a directory path. The skill resolves it to an absolute path and saves it to a state file to enforce the boundary.
Which operations are restricted by freeze?
Freeze restricts only Edit and Write operations. Other tools such as Read, Bash, Glob, and Grep are not affected.
Can I modify files outside the freeze directory?
No, any attempt to Edit or Write files outside the designated directory will be blocked. However, this does not prevent modification via direct Bash commands or other external tools.
How do I remove or change the freeze boundary?
To change the boundary, run /freeze again and provide a new directory path. To deactivate the freeze, run /unfreeze or end the session.
Does the freeze boundary persist across sessions?
No, the freeze boundary persists only for the current session via a state file and is cleared once the session ends.
Install freeze
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
garrytan/gstack