Claude Code Commands Cheat Sheet (2026)

Explore the complete Claude Code commands list with 50+ verified slash commands, syntax, examples, MCP commands, and developer workflows. Updated for 2026.

This cheat sheet covers the Claude Code commands people actually use: session commands, setup commands, review commands, integrations, MCP commands, agent skills, and CLI flags.

It combines the public command set with newer 2026 additions, while also noting hidden or leak-based command names that appear in source references.

If you want one clean reference instead of scattered changelogs and half-complete lists, this is the version to keep open beside your terminal.

Last audited: May 06, 2026

Session and Context Commands

Use these commands to manage conversation state, context size, checkpoints, and session history.

CommandWhat it doesNotes
/branch [name]Branches or forks the current conversation or workflow./fork appears as an alias in some references.
/clearClears the current conversation context.Useful when switching to a different task.
/compact [focus]Compresses the session to save context tokens.Example: /compact keep API decisions only
/contextShows how the context window is being used.Useful before compacting.
/copy [N]Copies the latest response or a selected response.Common for code and generated text.
/costOpens cost information.Merged into /usage in v2.1.118; still works as a shortcut to the relevant Usage tab.
/diffOpens an interactive diff viewer.Useful before review or commit.
/export [filename]Exports the conversation.Commonly used for Markdown exports.
/rename [name]Renames the current session.Useful when juggling multiple tasks.
/resume [session]Reopens an earlier session.Supports named sessions and session titles set via /rename or –name. Resume behavior was improved across recent releases. Press Ctrl+A to show all projects
/rewindRewinds to an earlier checkpoint or state.Useful when the conversation goes off track. Alias: /undo
/statusShows current session and environment status.Good command to run first.
/summaryGenerates a session summary.Seen in leak-based references; may not appear in standard public builds.
/sessionOpens session management UI.Seen in leak-based references; may not appear in standard public builds.
/shareShares a session.Seen in leak-based references; may not appear in standard public builds.

Setup, Config, and Environment Commands

Use these commands to configure Claude Code, manage memory, adjust permissions, and control the local environment.

CommandWhat it doesNotes
/add-dir <path>Adds another directory to the working scope.Useful for monorepos and adjacent projects.
/color [color]Changes the session accent color.Now syncs the accent color to claude.ai/code when Remote Control is connected.
/configOpens Claude Code settings.Editor mode now lives here.
/doctorRuns diagnostics.Useful after install or upgrade issues. You can press f to let Claude fix reported issues.
/effort [low|medium|high|xhigh|max|auto]Controls reasoning effort.xhigh was added for Opus 4.7+. Running /effort without arguments now opens an interactive slider.
/envShows or manages environment settings.Seen in leak-based references; may not appear in standard public builds.
/fast [on|off]Toggles fast mode.Useful for rapid iteration.
/helpShows help and available commands.Good fallback when commands change.
/hooksManages hook scripts and hook events.Hooks can now invoke MCP tools directly with type: "mcp_tool".
/initCreates CLAUDE.md for project instructions.One of the most important setup commands.
/init-verifiersSets up verifier hooks.Seen in leak-based references; may not appear in standard public builds.
/keybindingsCustomizes keyboard shortcuts.Useful for heavy daily use.
/loginSigns in to Claude Code.Supports current auth flows.
/logoutSigns out.Clears the active auth session.
/memoryOpens or edits Claude memory files.Includes CLAUDE.md workflows.
/model [model]Switches the active model.Useful for balancing speed and depth. Gateway /v1/models discovery for the model picker is now opt-in via CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1.
/output-style [style]Changes response formatting style.Useful for concise vs detailed output.
/permissionsManages permission mode and recent denials.Useful when commands are blocked.
/privacy-settingsOpens privacy or data settings.Seen in leak-based references; may not appear in standard public builds.
/sandboxOpens sandbox controls.Public name used in current references.
/sandbox-toggleInternal sandbox toggle name.Leak-based/internal naming.
/team-onboardingGenerates a teammate ramp-up guide from your local Claude Code usage.Added in v2.1.101.
/terminal-setupConfigures terminal integration.Public name.
/terminalSetupInternal camelCase form of /terminal-setup.Leak-based/internal naming.
/themeChanges or creates themes.Supports Auto (match terminal), named custom themes, JSON themes in ~/.claude/themes/, and plugin-shipped themes.
/tuiSwitches the terminal UI mode.Switch terminal UI mode; use /tui fullscreen for flicker-free rendering in the same conversation.
Vim modeEditor mode available through /config./vim slash command was removed in v2.1.92, but Vim mode now supports visual mode (v) and visual-line mode (V).

Skills, Agents, Plugins, and MCP Commands

Use these commands to extend Claude Code with skills, agents, plugins, and connected MCP servers.

CommandWhat it doesNotes
/agentsManages subagents.Public command. Newer versions add clearer running-agent indicators and a better tabbed layout.
/bridgeManages IDE or bridge sessions.Seen in leak-based references; may not appear in standard public builds.
/bridge-kickForce-restarts a bridge connection.Seen in leak-based references; may not appear in standard public builds.
/claude-apiLoads the Claude API or SDK helper workflow.Useful for API-related work. Updated to cover Managed Agents in recent versions.
/less-permission-promptsScans transcripts for common read-only Bash and MCP tool calls and proposes a prioritized allowlist for .claude/settings.json.Added in v2.1.111
/mcpManages MCP servers.Also unlocks dynamic MCP slash commands.
/pluginOpens plugin management.Public command. Newer versions warn when the marketplace could not be refreshed instead of silently showing stale plugin versions. In v2.1.110, the Installed tab also surfaces items needing attention and favorites more clearly.
/reload-pluginsHot-reloads installed plugins.Useful while testing plugins. Newer versions also pick up plugin-provided skills more reliably, and v2.1.110 adds Remote Control support.
/skillsLists available skills.Public command.

MCP Slash Command Pattern

Claude Code can generate commands dynamically from connected MCP servers:

/mcp__[server]__[prompt] [args]

Examples:

  • /mcp__github__list_prs
  • /mcp__github__create_pr
  • /mcp__jira__create_issue
  • /mcp__linear__get_sprint

These commands only appear after the relevant MCP server is connected.

Coding, Review, and Planning Commands

These commands are the ones most people use during real development work.

CommandWhat it doesNotes
/advisorArchitecture or design advice workflow.Seen in leak-based references; may not appear in standard public builds.
/batchApplies one change across many files or worktrees.Good for repetitive project-wide edits.
/briefBrief-output mode toggle.Seen in leak-based references; may not appear in standard public builds.
/btw <question>Asks a side question without pulling in the full task context.Useful for quick clarifications.
/bughunterBug-finding workflow.Seen in leak-based references; may not appear in standard public builds.
/debug [desc]Runs a guided debugging workflow.Good for tracing bugs step by step.
/extra-usageShows extended usage detail.Seen in leak-based references; may not appear in standard public builds.
/feedbackSends feedback.Public command.
/focusToggles Focus view.Focus view is no longer tied to Ctrl+O.
/filesLists files in the current context.Seen in leak-based references; may not appear in standard public builds.
/insightsShows usage or session insights.Public command.
/loop [interval]Runs a recurring or scheduled workflow.Useful for periodic checks and automations. Alias: /proactive.
/passesRuns a multi-pass workflow.Seen in leak-based references; may not appear in standard public builds.
/plan [desc]Switches into plan mode.Useful before larger changes.
/powerupOpens interactive feature lessons.Added in 2026.
/pr-comments [PR]Fetches GitHub PR comments.Public name.
/pr_commentsInternal underscore form of /pr-comments.Leak-based/internal naming.
/rate-limit-optionsOpens rate-limit options.Seen in leak-based references; may not appear in standard public builds.
/release-notesOpens release notes.Public command.
/reviewReviews current code changes.One of the most-used coding commands.
/security-reviewRuns a security-focused review.Useful before merge or release.
/simplifyRuns a multi-agent refactor workflow.Good for structural improvements.
/statsOpens usage statistics.Merged into /usage in v2.1.118; still works as a shortcut to the relevant Usage tab.
/tagLegacy tag command.Removed in v2.1.92.
/tasksManages background tasks.Seen in leak-based references; may not appear in standard public builds.
/ultraplanRuns a more detailed planning workflow.Remote-session flows now auto-create a default cloud environment in newer versions. 
/ultrareview [PR#]Runs a comprehensive cloud code review using parallel multi-agent analysis and critique.Use it with no arguments to review the current branch, or pass a PR number to review a specific GitHub PR.
/usageShows plan limits, quota usage, cost, and statistics./cost and /stats now open the relevant tabs inside /usage.

Git, PR, and Release Commands

These commands are related to branches, commits, pull requests, and release workflows.

CommandWhat it doesNotes
/commitGenerates a commit message and commits changes.Common in community and leak-based command lists.
/commit-push-prCommits, pushes, and opens a PR in one flow.Seen in leak-based references; may not appear in standard public builds.
/fix-pipelineTries to repair a failing CI pipeline.Common custom/community command.
/install-github-appSets up GitHub app integration.Public command.
/issueFiles a GitHub issue.Seen in leak-based references; may not appear in standard public builds.
/lintRuns linting commands.Common custom/community command.
/merge-to-mainHandles merge-to-main workflow.Common custom/community command.
/prCreates a pull request.Common custom/community command.
/pushPushes the current branch.Common custom/community command.
/vitestRuns Vitest-based test workflows.Common custom/community command.

Integration, Remote, and Device Commands

Use these commands when working across IDEs, browsers, desktops, mobile, or remote environments.

CommandWhat it doesNotes
/chromeOpens Chrome integration.Public command, though availability varies.
/desktopHands off to the desktop app.Public command.
/ideOpens or manages IDE integration.Public command.
/mobileHands off to mobile or opens mobile integration.Seen in leak-based references; may not appear in standard public builds.
/oauth-refreshRefreshes OAuth tokens.Seen in leak-based references; may not appear in standard public builds.
/onboardingStarts first-run onboarding.Seen in leak-based references; may not appear in standard public builds.
/rcStarts remote control.Public short form.
/remote-controlFull remote-control command name.Public command. Remote-session features continue to expand in newer versions.
/remote-envConfigures remote environments.Public command. Remote-session planning features can now auto-create a default cloud environment.
/remote-setupSets up a remote session.Seen in leak-based references; may not appear in standard public builds.
/scheduleManages cloud scheduled tasks.Public command.
/teleportTransfers or bridges sessions.Public command.
/voiceEnables push-to-talk voice mode.Public command.

Diagnostics, Internal, and Experimental Commands

These are mostly internal, debug-oriented, experimental, or source-leak command names.

CommandWhat it doesNotes
/ant-traceAnthropic internal tracing.Internal/leak-based.
/autofix-prAuto-fixes PR issues.Internal/leak-based.
/backfill-sessionsBackfills session data.Internal/leak-based.
/break-cacheInvalidates caches.Internal/leak-based.
/ctx_vizDebug context visualization.Internal/leak-based.
/debug-tool-callDebugs a specific tool call.Internal/leak-based.
/good-claudeEaster egg command.Leak-based.
/heapdumpDumps heap for memory analysis.Internal/leak-based.
/mock-limitsMocks rate limits for testing.Internal/leak-based.
/perf-issueReports a performance issue.Internal/leak-based.
/reset-limitsResets rate limits.Internal/leak-based.
/statuslineCustomizes the status line.Leak-based; may not appear in standard public builds.
/stickersEaster egg or promo command.Public but non-essential.
/thinkbackReplays or analyzes thinking.Internal/leak-based.
/thinkback-playAnimated thinking replay.Internal/leak-based.
/upgradeRuns upgrade flow.Seen in leak-based references; may not appear in standard public builds.
/versionShows Claude Code version.Seen in leak-based references; may not appear in standard public builds.
/x402x402 payment-protocol integration.Internal/leak-based.
/buddyTemporary April 1st easter egg.Limited and non-essential.
/exitExits Claude Code.Core command, but included here as a general utility.

Claude Code CLI Commands and Flags

Many users searching for Claude Code commands actually want terminal commands. These are the main ones.

Core CLI Commands

CLI commandWhat it does
claudeStarts interactive Claude Code.
claude "prompt"Starts interactive Claude Code with an initial prompt.
claude -p "prompt"Runs a non-interactive single prompt.
claude -cContinues the last conversation.
claude -r "name"Resumes a named session.
claude updateUpdates Claude Code.
claude mcp listLists configured MCP servers.
claude mcp serveRuns Claude Code as an MCP server.
claude plugin tagCreates release git tags for plugins with version validation.

Important CLI Flags

FlagWhat it does
--modelSets the model.
-w, --worktreeUses a git worktree.
-n, --nameNames the session.
--add-dirAdds a directory to scope.
--agentSelects an agent.
--allowedToolsPre-approves tools.
--output-formatSets machine-readable output such as JSON.
--json-schemaRequests structured output.
--max-turnsLimits agentic turns.
--max-budget-usdCaps spend.
--consoleUses Anthropic Console auth.
--verboseEnables more verbose output.
--bareMinimal headless mode.
--channelsEnables channel or MCP push permission relay.
--remoteStarts a remote or web-backed session.
--effortSets reasoning effort level.
--permission-modeSets permission behavior such as plan.
--dangerously-skip-permissionsSkips permission prompts.
--chromeEnables Chrome integration mode.
--plugin-url <url>Fetches a plugin .zip archive from a URL for the current session.
--transport http|stdio|sseSelects MCP transport.
--remote-control-session-name-prefixPrefixes Remote Control session names.

Useful Environment Variables

VariableWhat it does
CLAUDE_CODE_CERT_STORE=bundledUses bundled CAs only instead of the OS certificate store.
CLAUDE_CODE_PERFORCE_MODE=1Makes Edit/Write/NotebookEdit fail on read-only Perforce files with a p4 edit hint.
CLAUDE_CODE_SCRIPT_CAPSLimits per-session script invocations.
CLAUDE_CODE_USE_MANTLE=1Enables Amazon Bedrock powered by Mantle.
DISABLE_UPDATESCompletely blocks all update paths, including manual claude update. Stricter than DISABLE_AUTOUPDATER.
CLAUDE_CODE_USE_POWERSHELL_TOOLOpts into or out of the PowerShell tool rollout. On Linux and macOS, set it to 1 to enable the PowerShell tool when pwsh is available.
CLAUDE_CODE_FORCE_SYNC_OUTPUT=1Forces synchronized output on terminals where auto-detection misses it, such as Emacs eat.
CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATELets Homebrew or WinGet installations run package-manager upgrades in the background, then prompt for restart.
CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1Enables gateway /v1/models discovery for the /model picker. This is now opt-in.

Real Workflows

Start a New Repository

/init
/status
/model

This initializes CLAUDE.md, checks the environment, and sets the model.

Onboard a New Teammate

/team-onboarding
/init
/memory

This is useful for turning existing local Claude Code usage into a ramp-up guide, then pairing it with the project’s CLAUDE.md and memory files.

Understand an Unfamiliar Codebase

/status
/context
/plan map the project structure and main entry points

This gives a quick environment check, shows loaded context, and builds a plan before editing anything.

Review a Pull Request

/review
/security-review
/pr-comments
/diff

This covers review, security, feedback, and final diff inspection.

Prepare a Safe Refactor

/review
/plan refactor the auth flow without changing behavior
/diff

This is a good sequence before touching critical code paths.

Manage a Long Session

/context
/compact keep decisions only
/cost

This checks context size, compacts it, and shows the cost impact.

Run a Multi-File Refactor

/review
/simplify
/batch rename OldThing NewThing

This is a clean sequence for review, simplification, and broad edits.

Fix a Bug in Stages

/debug trace the failing checkout flow
/review
/diff

This works well when the issue is unclear, and you want to inspect the final change carefully.

Work With PR Feedback

/pr-comments 123
/review
/diff

This is useful when you want to address reviewer comments and re-check the final patch.

Switch Between Tasks

/rename feature-auth
/clear
/resume feature-auth

This keeps sessions separate and makes it easier to return to a task later.

Set Up MCP and Use It Immediately

/mcp
/mcp__github__list_prs
/mcp__jira__create_issue

This goes from the MCP setup to the actual server commands quickly.

Work Across Devices

/remote-control
/remote-env
/teleport

This covers the main remote workflow commands in one place.

Learn What Changed After an Update

/powerup
/help
/release-notes

Use this after an update to check release changes, diagnose environment issues, and review any settings affected by the new version.

Review Usage and Limits

/usage
/cost
/stats

This is the quickest way to check activity, plan limits, and session cost.

Start a Headless One-Off Task

claude -p "review this diff and list risks"

Use this when you want one result and do not need an interactive session.

Run a Deep Cloud Review

/review
/ultrareview
/pr-comments

Use this when a normal review is not enough and you want a deeper cloud-based review pass before merging.

Reduce Repetitive Permission Prompts

/less-permission-prompts
/permissions
/hooks

Use this after a few real sessions to identify safe read-only commands and build a cleaner allowlist for future work.

Check Usage from Remote Control

/extra-usage
/context
/exit

This is useful when checking usage and session state from a Remote Control client without going back to the local terminal.

FAQs:

Q: What is Claude Code?
A: Claude Code is Anthropic’s terminal-based AI coding agent. It runs locally via the CLI (npm install -g @anthropic-ai/claude-code), reads and edits your actual project files, executes shell commands, runs tests, and manages git operations.

Q: What is the difference between a slash command and a prompt in Claude Code?
A: A prompt is what you type to give Claude a coding task: “refactor this function,” “write a test for this endpoint.” A slash command controls the session itself.

Q: What is CLAUDE.md and what goes in it?
A: CLAUDE.md is a Markdown file in your project root that Claude reads at the start of every session in that repository. It acts as a persistent project brief.

Q: What is the difference between /clear and /compact?
A: /clear deletes all conversation history. The context window is empty after running it, but file edits made during the session remain. /compact replaces conversation history with a compressed summary, preserving the thread of what was discussed. Use /compact when you want Claude to remember context from earlier in the session but need to free up token budget. Use /clear when you are switching to a completely different task and do not need any prior context.

Q: What does /plan actually do in Claude Code?
A: /plan toggles plan permission mode. In this mode, Claude proposes each tool action and waits for your approval before executing it. Use it when working in an unfamiliar codebase or before a large refactor you want to review step by step.

Q: How do I create a custom slash command in Claude Code?
A: Create a Markdown file at .claude/commands/[name].md in your project (for team-shared commands) or ~/.claude/commands/[name].md (for personal commands available in all projects). The filename without the .md extension becomes the command name. The file content is the prompt Claude receives when the command runs. Add a YAML-style frontmatter block at the top to specify which tools the command can use, which model to run it with, and a description that appears in /help. Use $ARGUMENTS in the file content to capture whatever text is passed after the command name.

Q: Can Claude Code connect to GitHub?
A: Yes, in two ways. First, /install-github-app sets up the Claude GitHub App, which lets Claude participate in pull request workflows via GitHub Actions. Second, connecting a GitHub MCP server via /mcp exposes GitHub API operations as slash commands directly in your session (e.g., /mcp__github__list_prs, /mcp__github__create_pr).

Q: How do I reduce costs when using Claude Code?
A: Several approaches work well in combination. Switch to Haiku for mechanical tasks (/model haiku) and back to Opus or Sonnet for complex reasoning. Use /effort low for quick iteration tasks where deep reasoning is not necessary. Use /usage as the main usage screen; /cost and /stats now open the relevant tabs inside it. For custom commands that run frequently, add model: haiku to the frontmatter.

Q: What is the difference between /doctor and /status in Claude Code?
A: /doctor actively tests your environment. It reports failures with actionable error messages. /status reads and displays your current configuration, such as the active model, permission mode, connected MCP servers, and tool state. Run /doctor after installation, after upgrading, or when Claude Code behaves unexpectedly. Run /status at the start of a session to confirm settings before starting work.

Q: Can Claude Code be used in a CI/CD pipeline?
A: Yes. Claude Code supports a non-interactive print mode (claude -p "your prompt") that executes a single prompt and exits, making it scriptable in any CI environment. The --output-format json flag structures the output for programmatic parsing. For GitHub specifically, /install-github-app sets up the official Claude GitHub Actions integration. The /hooks command also allows HTTP webhooks on lifecycle events, which can trigger external CI systems when Claude completes a task or uses a specific tool.

Q: What MCP servers work with Claude Code?
A: Any server that implements the Model Context Protocol can be connected. Once connected via /mcp, each server’s prompts appear as slash commands in the /mcp__[server]__[prompt] format.

Q: What is the difference between /focus and Ctrl+O in Claude Code?
A: As of v2.1.110, Ctrl+O only toggles between the normal and verbose transcript. Focus view is now controlled separately with /focus. If you want the cleaner, stripped-down focus view, use /focus. If you want transcript verbosity changes, use Ctrl+O.

Q: What does /effort do in Claude Code now?
A: /effort controls how much reasoning Claude uses for a task. As of v2.1.111, Opus 4.7 also supports xhigh, which sits between high and max. Running /effort without arguments now opens an interactive slider so you can adjust it visually.

Related Resources

Leave a Reply

Your email address will not be published. Required fields are marked *

Get the latest & top AI tools sent directly to your email.

Subscribe now to explore the latest & top AI tools and resources, all in one convenient newsletter. No spam, we promise!