Skip to content
Automation
Command

/freeze

[advanced] Restrict file edits to a specific directory boundary

From plugin
octo
4.1k53 skills49 agents53 commands18 hooks
Install
> /plugin marketplace add nyldn/claude-octopus

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/freeze

Context preview

What this command does when you run it.

[advanced] Restrict file edits to a specific directory boundary

Command definition

freeze.md
command: freeze
disable-model-invocation: true
description: "[advanced] Restrict file edits to a specific directory boundary"

Freeze Mode - Edit Boundary Enforcement

Instructions

When the user invokes `/octo:freeze <directory>`, activate freeze mode to restrict Edit and Write operations to the specified directory.

Activation

1. Resolve the directory argument to an absolute path 2. Ensure trailing `/` for safe prefix matching 3. Write the boundary to the state file:

# Resolve to absolute path
freeze_dir="$(cd "$1" 2>/dev/null && pwd)" || freeze_dir="$1"
# Write state
_OCTO_SESSION_ID="${CLAUDE_CODE_SESSION_ID:-${CLAUDE_SESSION_ID:-$$}}"
echo "${freeze_dir}" > "/tmp/octopus-freeze-${_OCTO_SESSION_ID}.txt"

What It Does

Freeze mode adds a PreToolUse safety net on Edit and Write tools. Any file operation targeting a path **outside** the frozen directory is blocked with a deny decision. This prevents accidental edits to unrelated code.

**Blocked:** Edit, Write to files outside the boundary **Unaffected:** Read, Bash, Glob, Grep (investigation stays unrestricted)

Usage

/octo:freeze src/auth
/octo:freeze ./packages/core
/octo:freeze /absolute/path/to/module

After activation, confirm to the user:

๐Ÿ”’ Freeze mode activated. Edits restricted to: <resolved-path>
   Read/search operations remain unrestricted.
   Use /octo:unfreeze to remove this restriction.

Argument Required

If invoked without a directory argument, ask the user which directory to freeze:

Which directory should I restrict edits to? Example: /octo:freeze src/auth

When to Use

  • Debugging a specific module (auto-activated by skill-debug)
  • Code review where you want to ensure no unrelated changes
  • Focused refactoring within a single package
  • Any time you want to guarantee edit boundaries

See Also

  • `/octo:careful` โ€” Warn before destructive commands
  • `/octo:guard` โ€” Activate both careful + freeze together
  • `/octo:unfreeze` โ€” Remove freeze restriction
Read more
Ships withocto

Every AI model has blind spots. Claude Octopus supports twelve external provider integrations โ€” Codex, Antigravity CLI, Copilot, Qwen, Ollama, Perplexity, OpenRouter, OrcaRouter, OpenCode, Cursor CLI, Grok, and Kimi Code โ€” alongside the built-in Claude Code

Get the whole plugin

Other commands on octo.