Skip to Content
MeowKit
Skills

mk:freeze

Restricts the Edit and Write tools to one directory for the current session so edits stay inside the module you are working on.

Source.claude/skills/freeze/SKILL.md
Ownerlifecycle
Runtimeclaude-code
Riskmedium

What it does

mk:freeze stores one directory as the session's edit boundary. A PreToolUse hook, check-freeze.cjs, runs on every Edit and Write and denies any file_path outside that directory. It is an intent guardrail, not a security boundary.

When to use it

Use it when debugging or refactoring one module, working in a monorepo where a change could spill into other packages, or when you say "freeze", "only edit this folder" or "lock down edits". Usage: /mk:freeze [PATH]. Without a path the skill asks for one.

NeedUse instead
Warn before destructive shell commandsmk:careful

The two combine: freeze stops stray edits and careful warns on destructive Bash commands.

What it restricts

ToolRestricted
Edit, WriteYes, denied outside the boundary
Bash (sed, awk, cp, mv)No
Read, Glob, GrepNo

Steps

  1. You run /mk:freeze with a path, or give one when asked.
  2. scripts/set-freeze.cjs resolves the path to an absolute directory with a trailing slash. The slash stops /src from matching /src-old. It refuses a missing path, a file and the filesystem root, and leaves the saved boundary unchanged when it refuses.
  3. The boundary is saved to ${CLAUDE_PLUGIN_DATA:-.meowkit/state}/freeze-dir.txt and read back.
  4. On each Edit or Write the hook compares file_path with the boundary and returns allow or deny, with a message naming the boundary.

Ending a freeze

The boundary lives in a state file and lasts until it is cleared, including across sessions: a later session that loads the skill enforces the old boundary again. Running /mk:freeze with another path replaces it. To clear it, run node .claude/skills/freeze/scripts/set-freeze.cjs --clear.

Gotchas

  • The hook checks the stated path, not a resolved symlink target. Avoid symlinks inside the frozen directory that point outside it.
  • Files outside the boundary, including shared test fixtures, cannot be edited. Move the boundary with /mk:freeze.

The skill's mechanics are in references/freeze-mechanics.md.

On this page