← Blog
explainx / blog

Claude Code Commands: Complete Slash Command Reference (2026)

Every Claude Code slash command—/init, /goal, /loop, /batch, /code-review, and 90+ more. Workflow guide plus full reference table from official docs.

17 min readYash Thakker
Claude CodeSlash CommandsAI CodingDeveloper ToolsAnthropic

MDX restores the committed source plus an HTML comment attribution; plain text bundles the rendered markdown body with the explainx.ai attribution footer.

Claude Code Commands: Complete Slash Command Reference (2026)

Claude Code is Anthropic's agentic CLI for reading, editing, and running code in your repo. Beyond natural-language prompts, it exposes 90+ slash commands—typed at the start of a message—that switch models, manage permissions, spawn subagents, review diffs, compact context, and orchestrate long-running work.

This article is a complete command reference, organized the way Anthropic documents them in the Commands reference. It is not a replacement for upstream docs: command availability, version gates, and plan restrictions change frequently. Use this as a map of the surface area and a workflow guide; verify behavior against code.claude.com/docs before you ship team runbooks.

Sister guides: Codex slash commands · Gemini CLI slash commands · OpenCode slash commands · Cursor CLI slash commands

TL;DR

QuestionAnswer
How do I see all commands?Type / in Claude Code, or / + letters to filter.
Where must commands appear?At the start of your message only.
First session in a repo?/init/memory/mcp/agents/permissions.
Long conversation?/context to inspect usage; /compact to summarize and free window.
Parallel work?/agents, /tasks, /background, /batch, /fork.
Before merge?/diff/code-review/security-review/review.
Custom commands?Author skills; MCP servers can expose /mcp__<server>__<prompt>.
Sister guides?Codex · Gemini CLI · OpenCode · Cursor CLI

How slash commands fit a typical workflow

Anthropic groups commands by where they appear in a session lifecycle. The pattern below is the fastest way to learn the table—not alphabetical order.

flowchart LR
  A[Setup /init /memory /mcp] --> B[Work /plan /model /compact]
  B --> C[Parallel /agents /batch /background]
  C --> D[Ship /diff /code-review /review]
  D --> E[Between sessions /clear /resume /rewind]

First session in a repo

StepCommandWhat it does
1/initGenerate a starter CLAUDE.md for the project
2/memoryEdit memory files, toggle auto-memory, view entries
3/mcpConnect MCP servers
4/agentsConfigure subagents
5/permissionsSet allow, ask, and deny rules for tools

Set CLAUDE_CODE_NEW_INIT=1 for an interactive /init that also walks through skills, hooks, and personal memory files.

During a task

CommandPurpose
/plan [description]Enter plan mode before a large change
/model [model]Switch model; save as default or session-only
/effort [level|auto]Adjust reasoning depth (low through max, ultracode)
/context [all]Visualize context usage as a colored grid
/compact [instructions]Summarize conversation to free context window
/btw <question>Side question that does not bloat history

Running work in parallel

CommandPurpose
/agentsManage agent configurations
/tasksList background work (alias: /bashes)
/background [prompt]Detach session as background agent (alias: /bg)
/batch <instruction>Decompose large changes into parallel worktree subagents
/fork <directive>Background subagent inherits full conversation (v2.1.161+)
/branch [name]Fork your conversation to try another direction

See our loop engineering guide for /loop and dynamic workflows for /workflows and /deep-research.

Before you ship

CommandPurpose
/diffInteractive viewer for uncommitted and per-turn diffs
/code-review [--fix] [--comment] [target]Local diff review; --fix applies fixes; ultra runs cloud review
/simplify [target]Cleanup-only review (no bug hunt, v2.1.154+)
/security-reviewRead-only security pass on branch diff
/review [PR]Review a pull request locally

For cloud multi-agent review, prefer /code-review ultra (alias: /ultrareview). See our ultrareview deep dive.

Between sessions and when things go wrong

CommandPurpose
/clear [name]New conversation; previous saved in /resume (aliases: /reset, /new)
/resume [session]Resume by ID or name (alias: /continue)
/branch [name]Fork conversation at current point
/rewindRoll back code and/or conversation to checkpoint (aliases: /checkpoint, /undo)
/doctorDiagnose installation; press f to auto-fix
/debug [description]Enable mid-session debug logging
Live Bootcamp6 weeks

Complete AI Builder Bootcamp

Claude, Python automation & full-stack — 12 live sessions with Yash Thakker.

View bootcamp

The Complete AI Builder Bootcamp is the best AI development course for learning Claude AI, prompt engineering, Python automation, and full-stack web development. This intensive 6-week live bootcamp teaches you how to build AI-powered applications using Claude Projects, Claude Artifacts, Claude Code, and the complete Claude ecosystem. You'll master prompt engineering techniques, learn to create custom Claude connectors and MCP integrations, build Python automation workflows, develop full-stack websites with AI assistance, and create AI marketing agents.

The bootcamp includes 12 live Zoom sessions with Yash Thakker, founder of AISOLO Technologies and instructor to 350,000+ students. You'll build 8+ portfolio projects including AI playbooks, full-stack note-taking applications, Python automation scripts, marketing agents, and personal portfolio websites. The curriculum covers AI fundamentals, Claude Projects and Artifacts, Claude Co-work, Claude plugins and skills, Claude Code for Python development, full-stack development, AI marketing, and capstone projects.

Students receive 1-year access to all recordings, permanent Discord community access, a certificate of completion, and personalized career guidance. All enrollments include a 7-day money-back guarantee. This is the most comprehensive Claude AI bootcamp available, taking students from zero AI knowledge to expert AI builder in 6 weeks.


Command types: built-in, skill, and workflow

Not every entry in the table is coded into the CLI binary.

TypeMeaningExamples
Built-inCore CLI behavior/model, /clear, /permissions
SkillBundled prompt Claude can also invoke automatically/batch, /loop, /code-review, /run, /verify
WorkflowMulti-subagent background orchestration/deep-research
MCP promptDiscovered from connected servers/mcp__<server>__<prompt>
Removed / gatedVersion or environment specific/vim (removed v2.1.92), /pr-comments (removed v2.1.91)

Run /skills to list bundled and project skills. Run /reload-skills (v2.1.152+) after adding skills on disk without restarting.


Setup, project, and directory commands

CommandPurpose
/initInitialize project with CLAUDE.md; set CLAUDE_CODE_NEW_INIT=1 for interactive flow
/memoryEdit CLAUDE.md files, auto-memory, view auto-memory entries
/add-dir <path>Add working directory for file access (config mostly stays in primary project)
/cd <path>Move session to new working directory; preserves prompt cache (v2.1.169+)
/hooksView hook configurations for tool events
/permissionsManage allow, ask, deny rules (alias: /allowed-tools)
/fewer-permission-promptsScan transcripts and add prioritized allowlist to .claude/settings.json
/sandboxToggle sandbox mode (supported platforms only)
/install-github-appSet up Claude GitHub Actions for a repository
/install-slack-appInstall Claude Slack app via OAuth
/web-setupConnect GitHub to Claude Code on the web via local gh CLI
/team-onboardingGenerate team onboarding guide from 30-day usage history
/run-skill-generatorWrite project skill so /run and /verify know how to launch your app (v2.1.145+)

/cd vs /add-dir: /cd relocates the session (resume finds it from the new directory). /add-dir grants access without moving—useful for monorepos and cross-repo work. Restrict /cd targets with Cd permission rules.


Session, context, and conversation commands

CommandPurpose
/clear [name]Empty context; label previous session for /resume (aliases: /reset, /new)
/compact [instructions]Summarize conversation; optional focus instructions
/context [all]Context usage grid; pass all to expand per-item breakdown
/btw <question>Quick aside without adding to conversation history
/copy [N]Copy last (or Nth-latest) assistant response; interactive code-block picker
/export [filename]Export conversation as plain text
/recapOne-line session summary on demand
/rename [name]Rename current session (shown on prompt bar)
/resume [session]Resume by ID, name, or picker; background sessions marked bg (alias: /continue)
/branch [name]Branch conversation at this point; return to original via /resume
/fork <directive>Background subagent with full conversation inheritance (v2.1.161+)
/rewindRewind code and/or conversation to checkpoint (aliases: /checkpoint, /undo)
/goal [condition|clear]Work until condition met; clear stops early (/goal guide)
/stopStop attached background session (keeps transcript and worktree)
/exitExit CLI; in background attach, detaches without stopping (alias: /quit)

/branch vs /fork: /branch is you exploring a forked copy. /fork is Claude working in the background while you continue. Before v2.1.161, /fork was an alias for /branch.


Model, effort, and performance commands

CommandPurpose
/model [model]Switch model; picker supports session-only switch with s
/effort [level|auto]Set effort: low, medium, high, xhigh, max, ultracode, or auto
/advisor [model|off]Enable/disable advisor tool (second model consults at key moments, v2.1.98+)
/fast [on|off]Toggle fast mode
/usageSession cost, plan limits, activity stats (aliases: /cost, /stats)
/usage-creditsConfigure extra usage when limits hit (formerly /extra-usage)
/heapdumpWrite JS heap snapshot to Desktop for memory diagnosis

/effort levels: max and ultracode are session-only. ultracode combines xhigh reasoning with automatic workflow orchestration. Changes apply immediately without waiting for the current response to finish.

For Fable 5 and model selection context, see Is Fable 5 available on Claude Code?.


Parallel agents, loops, and orchestration

CommandPurpose
/agentsManage subagent configurations
/tasksView and manage background tasks (alias: /bashes)
/background [prompt]Detach as background agent; monitor with claude agents (alias: /bg)
/batch <instruction>Research, decompose into 5–30 units, spawn worktree subagents + PRs
/loop [interval] [prompt]Repeat prompt while session open; omit prompt for maintenance check (alias: /proactive)
/schedule [description]Create/update/list/run cloud routines (alias: /routines)
/workflowsWatch, pause, resume, or save running workflows
/deep-research <question>Workflow: parallel web search, fetch, cross-check, cited report
/ultraplan <prompt>Draft plan in ultraplan session; review in browser; execute remotely
/autofix-pr [prompt]Cloud session watches current branch PR; fixes CI and review comments
/remote-envDefault environment for cloud agents

/loop examples (from scheduled tasks docs):

/loop 5m check if the deploy finished
/loop babysit all my PRs
/loop 30m /your-skill-name

Pair /loop with /goal for self-correction loops that run until a validator passes.


Review, diff, and shipping commands

CommandPurpose
/diffInteractive diff viewer: git diff and per-turn diffs
/code-review [effort] [--fix] [--comment] [target]Bug + cleanup review; effort levels lowmax; ultra for cloud
/simplify [target]Cleanup-only parallel review (v2.1.154+); no correctness bug hunt
/security-reviewSecurity-focused read-only diff analysis
/review [PR]Local PR review; cloud depth via /code-review ultra
/ultrareview [PR]Alias for /code-review ultra (research preview)

Effort and flags:

/code-review medium
/code-review --fix
/code-review --comment
/code-review ultra
/simplify src/auth/

From v2.1.154, /simplify is the cleanup path; /code-review owns bug finding. On earlier versions, /simplify was equivalent to /code-review --fix.


Memory, skills, plugins, and API commands

CommandPurpose
/skillsList skills; t sorts by token count; Space hides from menu
/reload-skillsRe-scan skill directories mid-session (v2.1.152+)
/plugin [subcommand]Manage plugins: list, install, enable, disable, or interactive menu
/reload-plugins [--force]Reload plugins; --force when MCP tool set changes
/claude-api [migrate|managed-agents-onboard]Load API reference; migrate model IDs; onboard Managed Agents
/runLaunch and drive your app to verify changes (v2.1.145+)
/verifyBuild, run, and observe—not just tests (v2.1.145+)
/plan [description]Enter plan mode with optional task description

Custom slash commands are skills. The gstack factory is an extreme example of encoding team workflows as slash-invokable bundles.


MCP, IDE, and integration commands

CommandPurpose
/mcp [reconnect <server>|enable|disable [<server>|all]]Manage MCP connections and OAuth
/mcp__<server>__<prompt>MCP-exposed prompts (dynamic per connected server)
/ideManage IDE integrations and status
/chromeConfigure Claude in Chrome
/desktopContinue session in Desktop app (macOS/Windows + subscription, alias: /app)
/teleportPull web session into terminal (alias: /tp; requires claude.ai subscription)
/remote-controlEnable remote control from claude.ai (alias: /rc)
/mobileQR code for mobile app (aliases: /ios, /android)
/voice [hold|tap|off]Voice dictation mode

For MCP fundamentals, see What is MCP?.


Settings, UI, and account commands

CommandPurpose
/configSettings interface: theme, model, output style (alias: /settings)
/statusSettings Status tab: version, model, account, connectivity
/themeColor theme including auto, daltonized, ANSI, custom from ~/.claude/themes/
/tui [default|fullscreen]Terminal UI renderer; fullscreen enables alt-screen mode
/focusFocus view: last prompt, tool summary, final response (fullscreen only)
/scroll-speedAdjust mouse wheel scroll speed (fullscreen only)
/color [color|default]Prompt bar color; syncs with Remote Control when connected
/statuslineConfigure status line from description or auto-detect shell prompt
/keybindingsOpen keyboard shortcuts file
/terminal-setupShift+Enter and terminal shortcuts (VS Code, Cursor, etc.)
/loginSign in to Anthropic account
/logoutSign out
/upgradeOpen upgrade page (Pro/Max plans)
/privacy-settingsPrivacy settings (Pro/Max subscribers)
/passesShare free week of Claude Code (eligible accounts)
/helpHelp and available commands
/release-notesInteractive changelog version picker
/insightsReport on session patterns and friction points
/powerupInteractive feature lessons with demos
/radioOpen Claude FM lo-fi radio
/stickersOrder Claude Code stickers

Diagnostics and cloud-provider setup

CommandPurpose
/doctorVerify installation and settings; f to fix issues
/debug [description]Enable debug logging mid-session; analyze debug log
/setup-bedrockAmazon Bedrock wizard (when CLAUDE_CODE_USE_BEDROCK=1)
/setup-vertexGoogle Vertex AI wizard (when CLAUDE_CODE_USE_VERTEX=1)

Bedrock, Vertex, and Foundry deployments may exclude specific features—for example, /ultrareview is documented as unavailable on those paths.


Complete command reference table

Every command from the official Commands page as of June 2026. <arg> = required; [arg] = optional. Skill and Workflow markers match upstream docs.

CommandTypePurpose
/add-dir <path>Built-inAdd working directory for file access
/advisor [model|off]Built-inEnable advisor tool (v2.1.98+; fable v2.1.170+)
/agentsBuilt-inManage subagent configurations
/autofix-pr [prompt]Built-inCloud session auto-fixes PR CI and review comments
/background [prompt]Built-inDetach as background agent (/bg)
/batch <instruction>SkillParallel worktree orchestration for large changes
/branch [name]Built-inBranch conversation at current point
/btw <question>Built-inSide question without bloating history
/cd <path>Built-inMove session to new directory (v2.1.169+)
/chromeBuilt-inClaude in Chrome settings
/claude-api [migrate|managed-agents-onboard]SkillAPI reference, migration, Managed Agents onboarding
/clear [name]Built-inNew conversation (/reset, /new)
/code-review [effort] [--fix] [--comment] [target]SkillDiff review; ultra for cloud
/color [color|default]Built-inPrompt bar color
/compact [instructions]Built-inSummarize conversation to free context
/configBuilt-inSettings UI (/settings)
/context [all]Built-inContext usage visualization
/copy [N]Built-inCopy assistant response to clipboard
/costBuilt-inAlias for /usage
/debug [description]SkillMid-session debug logging
/deep-research <question>WorkflowMulti-agent cited research report
/desktopBuilt-inContinue in Desktop app (/app)
/diffBuilt-inInteractive diff viewer
/doctorBuilt-inInstallation diagnostics
/effort [level|auto]Built-inModel effort level
/exitBuilt-inExit CLI (/quit)
/export [filename]Built-inExport conversation as text
/fast [on|off]Built-inToggle fast mode
/feedback [report]Built-inSubmit feedback (/bug, /share)
/fewer-permission-promptsSkillAuto-generate permission allowlist
/focusBuilt-inToggle focus view (fullscreen)
/fork <directive>Built-inBackground forked subagent (v2.1.161+)
/goal [condition|clear]Built-inWork until goal met or clear goal
/heapdumpBuilt-inJS heap snapshot for memory debugging
/helpBuilt-inShow help
/hooksBuilt-inView hook configurations
/ideBuilt-inIDE integration management
/initBuilt-inGenerate starter CLAUDE.md
/insightsBuilt-inSession analysis report
/install-github-appBuilt-inClaude GitHub Actions setup
/install-slack-appBuilt-inSlack app OAuth install
/keybindingsBuilt-inKeyboard shortcuts file
/loginBuilt-inSign in
/logoutBuilt-inSign out
/loop [interval] [prompt]SkillScheduled in-session prompts (/proactive)
/mcp [...]Built-inMCP server management
/memoryBuilt-inEdit memory and auto-memory
/mobileBuilt-inMobile app QR (/ios, /android)
/model [model]Built-inSwitch AI model
/passesBuilt-inReferral passes (eligible accounts)
/permissionsBuilt-inTool permission rules (/allowed-tools)
/plan [description]Built-inEnter plan mode
/plugin [subcommand]Built-inPlugin management
/powerupBuilt-inInteractive feature tutorials
/pr-comments [PR]RemovedRemoved v2.1.91; ask Claude to view PR comments
/privacy-settingsBuilt-inPrivacy settings (Pro/Max)
/radioBuilt-inClaude FM stream
/recapBuilt-inOne-line session summary
/release-notesBuilt-inVersion changelog picker
/reload-plugins [--force]Built-inReload plugins
/reload-skillsBuilt-inRe-scan skills (v2.1.152+)
/remote-controlBuilt-inRemote control from claude.ai (/rc)
/remote-envBuilt-inCloud agent default environment
/rename [name]Built-inRename session
/resume [session]Built-inResume conversation (/continue)
/review [PR]Built-inLocal PR review
/rewindBuilt-inCheckpoint rollback (/checkpoint, /undo)
/runSkillLaunch app to verify change (v2.1.145+)
/run-skill-generatorSkillGenerate /run//verify project skill
/sandboxBuilt-inToggle sandbox mode
/schedule [description]Built-inCloud routines (/routines)
/scroll-speedBuilt-inMouse scroll speed (fullscreen)
/security-reviewBuilt-inSecurity diff analysis
/setup-bedrockBuilt-inBedrock configuration wizard
/setup-vertexBuilt-inVertex AI configuration wizard
/simplify [target]SkillCleanup-only review (v2.1.154+)
/skillsBuilt-inList and manage skill visibility
/statsBuilt-inAlias for /usage (Stats tab)
/statusBuilt-inStatus tab in Settings
/statuslineBuilt-inConfigure status line
/stickersBuilt-inOrder stickers
/stopBuilt-inStop attached background session
/tasksBuilt-inBackground task manager (/bashes)
/team-onboardingBuilt-inGenerate team onboarding guide
/teleportBuilt-inWeb session → terminal (/tp)
/terminal-setupBuilt-inTerminal keybinding setup
/themeBuilt-inColor theme picker
/tui [default|fullscreen]Built-inTerminal UI renderer
/ultraplan <prompt>Built-inBrowser-reviewed plan + remote execute
/ultrareview [PR]Built-inAlias for /code-review ultra
/upgradeBuilt-inPlan upgrade page
/usageBuilt-inUsage and cost (/cost, /stats)
/usage-creditsBuilt-inExtra usage configuration
/verifySkillObserve running app behavior (v2.1.145+)
/vimRemovedRemoved v2.1.92; use /config → Editor mode
/voice [hold|tap|off]Built-inVoice dictation
/web-setupBuilt-inConnect GitHub for Claude Code on the web
/workflowsBuilt-inWorkflow progress view
/mcp__<server>__<prompt>MCPDynamic prompts from connected MCP servers

Commands worth memorizing first

If you are new to Claude Code, start with this minimum viable slash stack:

/init                    # project memory
/permissions             # trust boundaries
/plan fix the auth bug   # think before large edits
/goal tests pass         # autonomous multi-turn work
/loop 5m check CI        # scheduled in-session checks
/compact                 # free context mid-session
/code-review --fix       # ship cleaner diffs
/resume                  # pick up yesterday's thread

For token and model discipline outside slash commands, see Top 10 tips for working with Claude efficiently.


Related ExplainX guides

Primary source: Commands — Claude Code Docs · Documentation index


Summary

Claude Code's slash commands are the control plane for agentic development: they set trust (/permissions), memory (/memory), model and effort (/model, /effort), parallelism (/batch, /fork, /background), and quality gates (/code-review, /security-review) without leaving the terminal.

Type / to discover what your build exposes—availability varies by version, plan, and platform. Treat the official Commands page as source of truth; use this reference as a workflow map and complete index you can bookmark.


Command names, version gates, and plan availability reflect Anthropic's documentation as of June 11, 2026. Re-check code.claude.com/docs/en/commands and /release-notes before documenting internal runbooks—Anthropic ships CLI updates frequently.

Related posts