Skip to content
Automation
Command

/careful

[advanced] Activate destructive command warnings for the session

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/careful

Context preview

What this command does when you run it.

[advanced] Activate destructive command warnings for the session

Command definition

careful.md
command: careful
disable-model-invocation: true
description: "[advanced] Activate destructive command warnings for the session"

Careful Mode - Destructive Command Warnings

Instructions

When the user invokes `/octo:careful`, activate careful mode for the current session.

Activation

Write the activation state file:

_OCTO_SESSION_ID="${CLAUDE_CODE_SESSION_ID:-${CLAUDE_SESSION_ID:-$$}}"
echo "active" > "/tmp/octopus-careful-${_OCTO_SESSION_ID}.txt"

What It Does

Careful mode adds a PreToolUse safety net on Bash commands. Before any destructive command executes, you will be prompted to confirm. This catches accidental damage without blocking normal work.

**Detected patterns:**

  • `rm -rf` (except safe targets: node_modules, dist, .next, __pycache__, build, coverage, .turbo)
  • `DROP TABLE`, `DROP DATABASE`, `TRUNCATE`
  • `git push --force`, `git push -f`
  • `git reset --hard`
  • `git checkout .`, `git restore .`
  • `kubectl delete`
  • `docker rm -f`, `docker system prune`

Deactivation

Remove the state file to deactivate:

_OCTO_SESSION_ID="${CLAUDE_CODE_SESSION_ID:-${CLAUDE_SESSION_ID:-$$}}"
rm -f "/tmp/octopus-careful-${_OCTO_SESSION_ID}.txt"

Usage

/octo:careful

After activation, confirm to the user:

⚠️ Careful mode activated. Destructive commands will now require confirmation before executing.

When to Use

  • Working in production environments
  • Unfamiliar codebases where accidental deletion is risky
  • Pair programming sessions where extra safety is desired
  • Any time you want a safety net against destructive commands

See Also

  • `/octo:freeze` — Restrict edits to a specific directory
  • `/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.