Skip to content
Automation
Command

/guard

[advanced] Activate both careful mode and freeze mode together

From plugin
octo
4.4k55 skills49 agents55 commands18 hooks
> /plugin marketplace add nyldn/claude-octopus

Command definition

guard.md
command: guard
disable-model-invocation: true
description: "[advanced] Activate both careful mode and freeze mode together"

Guard Mode - Full Safety Activation

Instructions

When the user invokes `/octo:guard <directory>`, activate both careful mode and freeze mode in a single command.

Activation

Resolve the active installation and use its session-state helper. Replace `<directory>` with the supplied directory as one quoted argument. For `guard-on`, omit that argument when only careful mode was requested.

OCTO_ROOT="${CLAUDE_PLUGIN_ROOT:-${CODEX_PLUGIN_ROOT:-${HOME}/.claude-octopus/plugin}}"
bash "$OCTO_ROOT/scripts/helpers/guard-state.sh" guard-on "<directory>"

A nonzero result means protection was not activated or changed. Do not announce success. The helper requires a stable host session ID; a shell PID is not a session identity. A missing directory fails before activation changes.

What It Does

Guard mode combines both safety primitives:

  • **Careful mode**: Warns before destructive Bash commands (rm -rf, DROP TABLE, git push --force, etc.)
  • **Freeze mode**: Blocks Edit/Write operations outside the specified directory

This is the recommended safety configuration for focused work in sensitive codebases.

Usage

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

After activation, confirm to the user:

🛡️ Guard mode activated:
   ⚠️ Careful: Destructive commands require confirmation
   🔒 Freeze: Edits restricted to <resolved-path>
   Use /octo:unfreeze to remove edit restriction.

Argument Required

If invoked without a directory argument, activate only careful mode and ask about freeze:

⚠️ Careful mode activated (destructive command warnings).
Which directory should I restrict edits to? Example: /octo:guard src/auth

When to Use

  • Starting work in a production-adjacent codebase
  • Debugging with maximum safety
  • When you want both protections without two separate commands

See Also

  • `/octo:careful` — Activate only destructive command warnings
  • `/octo:freeze` — Activate only edit boundary enforcement
  • `/octo:unfreeze` — Remove freeze restriction
Read more
@nyldn
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

4.4k71 skills49 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
4.4k
Star history of nyldn/claude-octopus on GitHub, a chart by star-history.com

Other commands on octo.

auto

auto

Command

Smart router - Single entry point with natural language intent detection

@nyldn@nyldnInstall Command
brainstorm

brainstorm

Command

Start a creative thought partner brainstorming session

@nyldn@nyldnInstall Command
budget-mode

budget-mode

Command

Switch Octopus model routing to the configured budget tier

@nyldn@nyldnInstall Command
careful

careful

Command

[advanced] Activate destructive command warnings for the session

@nyldn@nyldnInstall Command
costs

costs

Command

[advanced] Compatibility view of the deterministic Octopus usage report

@nyldn@nyldnInstall Command
council

council

Command

Multi-LLM council for advice, decision support, implementation plans, and gated implementation

@nyldn@nyldnInstall Command

More commands from other plugins.

plan

plan

Command

Plan n8n Linear ticket implementation

n8n12d209k
@n8n-io@n8n-ioInstall Command
setup

setup

Command

One-time setup after installing ARIS as a Claude Code plugin — registers the Codex reviewer MCP server from the plugin directory…

aris13d18k
@wanshuiyin@wanshuiyinInstall Command
agent
Auto-invoked

agent

Command

name: sc:agent description: SC Agent — session controller that orchestrates investigation, implementation, and review category:…

@galaxy-dawn@galaxy-dawnInstall Command