Operations and Safety Commands
Commands for permission control, MCP, plugins, cleanup, sandboxing, and troubleshooting.
Permission and Sandbox
| Command | Use it for | Watch out for |
|---|---|---|
/permissions | Manage allow, ask, and deny rules. | Rules should be scoped by tool and path where possible. |
/fewer-permission-prompts | Suggest allowlists for repeated safe read-only calls. | Review proposed rules before committing them. |
/sandbox | Toggle sandbox mode on supported platforms. | Do not use it as the only security boundary. |
/security-review | Review pending branch changes for security vulnerabilities. | It complements tests and human review; it does not replace them. |
MCP and Plugins
| Command | Use it for | Recent note |
|---|---|---|
/mcp | Manage MCP connections, OAuth, and visible tools. | Recent versions show tool counts and duplicate connector hints. |
/plugin | Install, enable, validate, tag, prune, and manage plugins. | themes and monitors should be under experimental in manifests. |
/reload-plugins | Apply plugin changes without restarting. | Init plugin_errors include --plugin-dir load failures. |
/hooks | Inspect hook configurations for tool events. | Hooks can be powerful; keep failure behavior explicit. |
Cleanup
Use claude project purge when you need to remove local Claude Code state for a project:
claude project purge ~/work/repo --dry-run
claude project purge ~/work/repo -yIt can remove transcripts, tasks, debug logs, file-edit history, prompt history, and the project
entry in ~/.claude.json. Always start with --dry-run unless you are in a disposable environment.
Troubleshooting Sequence
/status
/doctor
/mcp
/plugin
/usageIf the issue is command behavior rather than environment state, add:
/debug describe the failure and include the last command that behaved unexpectedlyFor large, stale sessions, prefer summarize-and-resume behavior over repeatedly loading a corrupted or oversized transcript.