careful
The `/octo:careful` slash command activates a safety mode that intercepts destructive commands in the current session and requires confirmation before execution. Use this when working in production environments, unfamiliar codebases, or any situation where accidental data loss poses significant risk. It detects and flags patterns like `rm -rf`, SQL DROP commands, force git operations, and kubectl delete actions, while allowing safe deletions to node_modules and similar build directories without interruption.
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/nyldn/claude-octopus/HEAD/commands/careful.md -o ~/.claude/commands/careful.mdcareful.md
# 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:
```bash
_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:
```bash
_OCTO_SESSION_ID="${CLAUDE_CODE_SESSION_ID:-${CLAUDE_SESSION_ID:-$$}}"
rm -f "/tmp/octopus-careful-${_OCTO_SESSION_ID}.txt"
```
### Usage
```text
/octo:careful
```
After activation, confirm to the user:
```text
⚠️ 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 restrictionSmart router - Single entry point with natural language intent detection
Backend architect. Delegate only when the user explicitly starts an Octopus workflow.
Start a creative thought partner brainstorming session
Switch Octopus model routing to the configured budget tier
[advanced] OpenClaw instance administration — manage hosts across macOS, Ubuntu/Debian, Docker, OCI, and Proxmox
Cloud architect. Delegate only when the user explicitly starts an Octopus workflow.
Code reviewer. Delegate only when the user explicitly starts an Octopus workflow.
[advanced] Compatibility view of the deterministic Octopus usage report