freeze
Hard-block Edit/Write outside a chosen directory. Use to scope-lock edits during a focused fix or refactor. Pair with /unfreeze to release.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Hard-block Edit/Write outside a chosen directory. Use to scope-lock edits during a focused fix or refactor. Pair with /unfreeze to release.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Author a culture's armor items and swap troop equipment rosters via the generator + validation pipeline. Use when adding/revamping armor. Enforces the canonical-folder + cover-attribute rules.
Give DOTS lords lore-driven skill values and traits via the DOTS SkillSet system. Use when a canonical lord has wrong stats or a culture roster needs a balance pass.
Author or revamp a DOTS culture's armor set, troop tree, and recruitment wiring end-to-end. Use for new cultures or troop-tree revamps. Follows docs/ai-includes/new-culture-authoring.md.
Use when reviewing an external repo or article to adopt practices into DOTS — security-vet first, map novel vs duplicative, port (never install), review, commit your changes.
Structured 4-phase self-debug for failing agent runs (looping, drifting, burning tokens). Capture, diagnose, contained recovery, report. Complements /investigate (which is for code bugs); this skill is for harness/agent failures.
Incrementally fix dotnet build errors with minimal diffs, one error at a time
| name | freeze |
| description | Hard-block Edit/Write outside a chosen directory. Use to scope-lock edits during a focused fix or refactor. Pair with /unfreeze to release. |
| allowed-tools | ["Bash","Read","AskUserQuestion"] |
| hooks | {"PreToolUse":[{"matcher":"Edit","hooks":[{"type":"command","command":"bash ${CLAUDE_PROJECT_DIR}/.claude/skills/freeze/check-freeze.sh"}]},{"matcher":"Write","hooks":[{"type":"command","command":"bash ${CLAUDE_PROJECT_DIR}/.claude/skills/freeze/check-freeze.sh"}]},{"matcher":"NotebookEdit","hooks":[{"type":"command","command":"bash ${CLAUDE_PROJECT_DIR}/.claude/skills/freeze/check-freeze.sh"}]}]} |
Hard-block any Edit, Write, or NotebookEdit to a file outside the chosen directory for the remainder of the session.
Adapted from garrytan/gstack/freeze. Uses the inline-hooks-in-skill-frontmatter pattern: the PreToolUse hooks above only fire while this skill is active — no global settings.json change.
/deep-review or feature-builder and want scope-locked/investigate, which auto-engages this hookUse AskUserQuestion to ask the user which directory to lock to:
Main/Features/<FeatureName>/ — single feature scopeMain/Adapters/ — adapter layer onlyMain/_Module/ModuleData/ — XML data onlyDOTS.Tests/ — tests onlyResolve to absolute path and persist to the state file:
FREEZE_INPUT="<user-provided-path>"
# Resolve relative paths against the project root
if [[ "$FREEZE_INPUT" != /* && "$FREEZE_INPUT" != [A-Za-z]:* ]]; then
FREEZE_DIR="$(cd "$FREEZE_INPUT" 2>/dev/null && pwd)"
else
FREEZE_DIR="$(cd "$FREEZE_INPUT" 2>/dev/null && pwd)"
fi
if [[ -z "$FREEZE_DIR" || ! -d "$FREEZE_DIR" ]]; then
echo "Could not resolve '$FREEZE_INPUT' to a directory."
exit 1
fi
STATE_DIR="${CLAUDE_PROJECT_DIR}/.claude/tmp/freeze"
mkdir -p "$STATE_DIR"
echo "$FREEZE_DIR" > "$STATE_DIR/freeze-dir.txt"
echo "Freeze boundary set: $FREEZE_DIR"
Edits are now locked to
<resolved-path>/. Any Edit, Write, or NotebookEdit outside this directory will be hard-blocked. Run/unfreezeto release.
The PreToolUse hooks declared in this skill's frontmatter activate the moment the skill is invoked. On every Edit/Write/NotebookEdit tool call, check-freeze.sh runs:
.claude/tmp/freeze/freeze-dir.txt)file_path from the tool call's JSON input{"permissionDecision":"deny",...} to block{} to allowThe hook is silent on success and verbose only when blocking, so freeze adds zero noise to normal work.
| Tool | Behavior |
|---|---|
| Edit | Blocked outside boundary |
| Write | Blocked outside boundary |
| NotebookEdit | Blocked outside boundary |
| Read, Glob, Grep | Always allowed (read-only) |
| Bash | Always allowed — sed, tee, > etc. can still bypass freeze. This is not a security boundary. |
MCP server tools (Serena's replace_content, etc.) | Not blocked — these are separate tools. Use Edit/Write for changes you want freeze-protected. |
User: /freeze
Skill: Asks "Which directory?" → user answers "Main/Features/CareerSystem/"
Sets boundary to C:/Users/mikew/source/repos/DOTS/Main/Features/CareerSystem/
User: Edit Main/Features/CareerSystem/Services/CareerService.cs
→ ALLOWED (inside boundary)
User: Edit Main/Adapters/HeroAdapter.cs
→ BLOCKED: "[freeze] Blocked: ... is outside the freeze boundary (.../CareerSystem/)"
User: /unfreeze
→ Boundary cleared
/Main from matching /Main_old.claude/tmp/ (gitignored) — boundary clears if you delete the file or run /unfreezeecho > /etc/passwd) can still touch anything the user has write access to. The point is to catch accidental drift by the agent, not to protect against malicious actions.