Skip to content

Latest commit

 

History

History
142 lines (119 loc) · 11.9 KB

File metadata and controls

142 lines (119 loc) · 11.9 KB

Command reference

Every command and flag the course covers, and where it's taught. Use this when you know what you want to do but not what it's called.

Module numbers link to the module that explains the command properly.


Session and context

Command Does Module
/clear Reset context between unrelated tasks 2
/compact [instructions] Replace history with a summary, optionally focused 4
/context Show what's currently filling the context window, including loaded memory files 4
/rewind Restore or summarize code and conversation from an earlier point 6
/branch [name] Copy the conversation and switch into the copy 6
/resume [name] Switch to another conversation 6
/rename <name> Name the current session so you can resume it by name 6
/btw Ask a side question whose answer never enters conversation history 2
/export Copy or save the conversation as readable text 6
/copy [N] Copy the last response — or the Nth-latest — to the clipboard. Press w in the code-block picker to write to a file instead Troubleshooting

Configuration and diagnostics

Command Does Module
/init Generate a starter CLAUDE.md from your codebase 2
/memory Browse and edit memory files; toggle auto memory 5
/config Settings, including output style and auto-update channel 3
/doctor (alias /checkup) Full setup checkup; proposes CLAUDE.md trims 5
/hooks Show what hooks are registered 7
/mcp Inspect and authenticate MCP servers 9
/status Which credential is active 3
/usage What's driving your plan limits, by skill, subagent, plugin, MCP server 12
/theme Theme picker 3
/login · /logout Authenticate or sign out 3
/skills Available skills from project, user, and plugin sources Troubleshooting
/debug [issue] Turn on debug logging mid-session and have Claude diagnose from the log Troubleshooting
/heapdump Heap snapshot + memory breakdown to ~/Desktop. Doesn't appear in the menu — type it in full Troubleshooting
/terminal-setup Fix garbled text in an integrated terminal by disabling GPU acceleration Troubleshooting
/feedback Report a problem to Anthropic from inside Claude Code Troubleshooting

Permissions and sandboxing

Command Does Module
Shift+Tab Cycle permission modes 5
/permissions Manage permission rules (CLI only — not in Desktop) 5
/sandbox Sandbox panel: Mode, Overrides, Dependencies 4

Planning and review

Command Does Module
/plan Prefix a single prompt with plan mode 6
/code-review [level] [target] Review a diff. --fix applies, --comment posts to a PR 12
/code-review ultra Escalate to the deeper cloud review 12
/review Alias of /code-review 12
/simplify Cleanup-only review — applies fixes without hunting bugs 12
/security-review One security pass over the current branch 12
/goal [condition|clear] Keep Claude working across turns until a condition holds. No argument shows the current goal 2

Orchestration

Command Does Module
claude agents Agent view — every session on one screen 10
/agents Prints a reminder to edit .claude/agents/ (no longer a wizard) 10
/workflows Watch, pause, stop, or save a dynamic workflow run 10
/deep-research <question> The bundled research workflow 10
/effort <level> low · medium · high · xhigh · max · ultracode 10
/model Switch model 10

Extensions

Command Does Module
/plugin Plugin panel: Discover, Installed, Marketplaces, Errors 8
/plugin marketplace add <source> Register a catalog 8
/plugin install <name>@<marketplace> Install a plugin 8
/reload-plugins Apply plugin changes without restarting 8
/claude-security Scan codebase, scan changes, suggest patches 8
claude mcp add --transport http|sse|stdio Add an MCP server 9
claude mcp login · logout · list Authenticate and inspect MCP servers 9

Surfaces and remote

Command Does Module
/ide Connect an external terminal session to your running VS Code or JetBrains IDE 11
/chrome Chrome integration status, permissions, browser choice 11
claude remote-control Drive this session from a phone or browser 11
/schedule (alias /routines) Create and manage cloud routines 11
/install-github-app Set up GitHub Actions in one command 12
Ctrl+] Reopen the most recent artifact 15

CLI flags worth knowing

Flag Does Module
-p "<prompt>" (--print) Non-interactive run. Exits 0 on success, non-zero on failure 12
--bare Skip auto-discovery of hooks, skills, plugins, MCP, auto memory, and CLAUDE.md. Use this in CI 12
--output-format text|json|stream-json Response shape. json adds result, session_id, and cost 12
--json-schema '<schema>' With --output-format json, validate the result into structured_output 12
--include-partial-messages With stream-json and --verbose, stream tokens as they're generated 12
--allowedTools "Bash,Read,Edit" Pre-approve tools. Uses permission rule syntax — Bash(git diff *), space before * 12
--append-system-prompt "<text>" Add instructions while keeping default behaviour 12
--safe-mode Start with every customisation disabled. The first debugging step Troubleshooting
--debug · --debug=mcp Log hook evaluation or MCP stderr to ~/.claude/debug/<session-id>.txt Troubleshooting
--continue · --resume [name] Resume the last or a named session 6
--from-pr <number> Find the session that created a PR 6
--fork-session Branch a session from the command line 6
-n <name> Name a session at startup 6
--permission-mode <mode> Start in a specific permission mode 5
--chrome Enable Chrome integration for the session 11
--channels plugin:<name>@<marketplace> Enable a channel 9
--add-dir <path> Grant access to another directory 6
--worktree Start in a new git worktree 10
--teammate-mode <mode> Agent team display mode 10
claude setup-token One-year OAuth token for CI 3
claude doctor · claude --version Diagnostics without starting a session 3
claude gateway --config <file> Run the Claude apps gateway 13

Environment variables

Variable Does Module
BASH_MAX_OUTPUT_LENGTH Bash read-back window — 30,000 default, 150,000 ceiling 4
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 Enable agent teams 10
CLAUDE_CODE_DISABLE_AUTO_MEMORY=1 Turn off auto memory 5
CLAUDE_CODE_USE_BEDROCK · _VERTEX · _FOUNDRY Route through a cloud provider 3
CLAUDE_CODE_ENABLE_TELEMETRY=1 + OTEL_* OpenTelemetry export 13
CLAUDE_CONFIG_DIR Move config off ~/.claude — also the way to get a clean session for debugging 14, Troubleshooting
USE_BUILTIN_RIPGREP=0 Use your system ripgrep when the bundled binary won't run Troubleshooting
CLAUDE_CODE_PRINT_BG_WAIT_CEILING_MS Cap how long claude -p waits on background subagents (10 min default; 0 = no limit) 12
ENABLE_TOOL_SEARCH=auto Threshold-based MCP tool loading 9
DISABLE_AUTOUPDATER=1 Stop background updates 3

Commands change. If one here doesn't exist, check what's new — and see Module 16 for why /fork became /branch.