Claude Code Commands Cheat Sheet (2026)

Browse a complete Claude Code commands list with 70+ slash commands, A-Z index, CLI flags, MCP commands, environment variables, and workflows.

Claude Code includes slash commands for project setup, context management, permissions, MCP servers, plugins, agents, code review, remote sessions, and CLI automation.

This reference organizes the full command set by real coding tasks first, then provides a complete A-Z command index for quick lookup.

Public commands are separated from internal, leak-based, removed, and community commands so each entry is easier to evaluate before using it in a current Claude Code installation.

Last audited: June 8, 2026

Quick Navigation

The task sections group commands by setup, context management, code review, MCP, plugins, agents, remote work, and diagnostics. The A-Z index lists every slash command name in one table. The CLI and environment variable sections cover automation, background sessions, enterprise settings, and terminal behavior.

Command Entry Points

These entry points cover the most common command families. The full command tables and A-Z index remain below for complete lookup.

NeedStart with
First project setup/init, /status, /model
Session and context control/context, /compact, /clear, /cd, /resume
Code review/review, /security-review, /code-review, /diff
Debugging/debug, /plan, /diff
MCP setup/mcp, /mcp__[server]__[prompt]
Plugins and skills/plugin, /skills, /reload-skills, /reload-plugins
Agents and background work/agents, /workflows, claude agents, claude --bg --exec
GitHub workflows/install-github-app, /pr-comments, /ultrareview
Usage and costs/usage, /cost, /stats, /usage-credits
Troubleshooting/doctor, /permissions, /terminal-setup, /release-notes

Start and Configure Claude Code

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 and ultracode keyword trigger settings live 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 is now the default high-effort option for hard Opus 4.8 tasks. Running /effort without arguments opens an interactive slider and confirms when your choice will become the default for new sessions.
/envShows or manages environment settings.Seen in leak-based references; may not appear in standard public builds.
/fast [on|off]Toggles fast mode.Fast mode is available for supported Opus models. The old CLAUDE_CODE_OPUS_4_6_FAST_MODE_OVERRIDE path is now a no-op.
/helpShows help and available commands.Good fallback when commands change.
/hooksManages hook scripts and hook events.SessionStart hooks can reload skills or set the session title, and MessageDisplay hooks can transform or hide displayed assistant text.
/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.Rename any custom modelPicker:setAsDefault binding to modelPicker:thisSessionOnly after the 2.1.153 shortcut change.
/loginSigns in to Claude Code.Supports current auth flows.
/logoutSigns out.Now signs out from the main app instead of being sent to a background session.
/memoryOpens or edits Claude memory files.Includes CLAUDE.md workflows.
/model [model]Switches the active model.The model picker now saves the selection as the default for new sessions. Press s to switch only the current session. Gateway model discovery remains 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.Sandbox status still appears in /status and when a command is blocked.
/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.Can disable GPU acceleration in VS Code, Cursor, and Devin Desktop integrated terminals to prevent garbled text.
/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.
/scroll-speedTunes mouse wheel scroll speed.Includes a live preview. Useful in VS Code, Cursor, and terminal environments where scroll speed feels off.
/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 was removed in v2.1.92. Vim mode supports visual modes, and / in NORMAL mode opens reverse history search.

Manage Context and Sessions

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.
/cd <path>Moves the current session to a new working directory.Useful when you need to change folders without breaking the prompt cache mid-session.
/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
/goalSets a completion condition and lets Claude keep working across turns until it is met.Works in interactive mode, -p, and Remote Control. Shows elapsed time, turns, and tokens in an overlay panel.
/contextShows how the context window is being used.Useful before compacting. Newer versions show model-aware per-skill token estimates and plugin names for plugin-sourced skills.
/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.The detail view now supports keyboard scrolling with arrows, j/k, Page Up/Page Down, Space, Home, and End.
/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 and background sessions. 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.

Use MCP, Plugins, Skills, and Agents

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

CommandWhat it doesNotes
/agentsManages subagents.Use claude agents for the new agent view, which lists running, blocked, and completed Claude Code sessions.
/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 for Opus 4.8 migration guidance 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. Reconnect picks up .mcp.json edits without a restart.
/pluginOpens plugin management.Plugin details show component inventory, hook event names, MCP server names, LSP servers, and projected per-session token cost. Plugins in .claude/skills directories now load automatically.
/plugin listLists installed plugins.Supports --enabled and --disabled filters.
/reload-pluginsHot-reloads installed plugins.Useful while testing plugins and available from Remote Control clients.
/reload-skillsRe-scans skill directories without restarting Claude Code.Useful after adding or changing skills during a session.
/skillsLists available skills.Public command. Newer versions add type-to-filter search and show plugin-sourced skill context more clearly.

Skills and custom slash commands can use disallowed-tools in frontmatter to remove tools while that workflow is active.

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.

Review, Debug, and Change Code

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.Press c to copy the raw Markdown answer while preserving formatting for later paste.
/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.
/usage-creditsShows usage credits information.Replaces /extra-usage; the older name remains an alias.
/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 cleanup-only review and applies simplification, reuse, efficiency, and structure fixes.Use /code-review --fix when you want bug-hunting fixes instead.
/code-review [effort]Reviews code for correctness issues.Use --fix to apply findings to the working tree or --comment to post inline GitHub PR comments.
/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.Shows category details for skills, subagents, plugins, MCP servers, and large session files; /cost and /stats open its relevant tabs.
/workflowsOpens dynamic workflow runs.Use it to view larger background workflows created from workflow-style prompts.

Use GitHub, PR, and Release Workflows

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.

Work Remotely or Across Devices

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.

A-Z Slash Command Index

This index is for fast lookup. It includes public, generated, internal, leak-based, removed, and community command names so older references and current workflows can be checked in one place.

CommandShort meaningType
/add-dir <path>Add another directory to scope.Public
/advisorArchitecture or design advice.Leak-based
/agentsManage subagents.Public
/ant-traceInternal tracing.Internal
/autofix-prAuto-fix PR issues.Internal/leak-based
/backfill-sessionsBackfill session data.Internal/leak-based
/batchApply one change across many files.Public/workflow
/branch [name]Branch or fork the conversation.Public
/break-cacheInvalidate caches.Internal/leak-based
/bridgeManage IDE or bridge sessions.Leak-based
/bridge-kickForce-restart a bridge connection.Leak-based
/briefBrief output mode.Leak-based
/btw <question>Ask a side question with minimal context.Public
/buddyTemporary April 1st command.Limited/non-essential
/bughunterBug-finding workflow.Leak-based
/cd <path>Move the session to a new working directory.Public
/chromeOpen Chrome integration.Public
/claude-apiLoad Claude API or SDK helper workflow.Built-in skill
/clearClear conversation context.Public
/code-review [effort]Review correctness issues.Public
/color [color]Change session accent color.Public
/commitGenerate a commit message and commit changes.Community
/commit-push-prCommit, push, and create a PR.Leak-based/community
/compact [focus]Compact context with optional focus.Public
/configOpen settings.Public
/contextShow context usage.Public
/copy [N]Copy latest or selected response.Public
/costOpen cost information inside /usage.Public shortcut
/ctx_vizDebug context visualization.Internal/leak-based
/debug [desc]Run a debugging workflow.Public
/debug-tool-callDebug a tool call.Internal/leak-based
/desktopHand off to desktop app.Public
/diffOpen diff viewer.Public
/doctorRun diagnostics.Public
/effort [low|medium|high|xhigh|max|auto]Set reasoning effort.Public
/envInspect environment settings.Leak-based
/exitExit Claude Code.Public
/export [filename]Export conversation.Public
/fast [on|off]Toggle fast mode.Public
/feedbackSend feedback.Public
/filesList files in context.Leak-based
/fix-pipelineRepair failing CI pipelines.Community
/focusToggle Focus view.Public
/goalSet a completion condition.Public
/good-claudeEaster egg command.Leak-based
/heapdumpDump heap for memory analysis.Internal/leak-based
/helpShow help and commands.Public
/hooksManage hook scripts and events.Public
/ideOpen or manage IDE integration.Public
/initCreate CLAUDE.md.Public
/init-verifiersSet up verifier hooks.Leak-based
/installInstall or update flow.Internal/leak-based
/install-github-appSet up GitHub App integration.Public
/insightsShow usage or session insights.Public
/issueFile a GitHub issue.Leak-based
/keybindingsEdit keyboard shortcuts.Public
/less-permission-promptsPropose safe read-only allowlist entries.Built-in skill
/lintRun linting commands.Community
/loginSign in.Public
/logoutSign out.Public
/loop [interval]Run a recurring workflow.Public/workflow
/mcpManage MCP servers.Public
/mcp__[server]__[prompt] [args]Dynamic MCP prompt command.MCP-generated
/memoryOpen memory files.Public
/merge-to-mainMerge to main.Community
/mobileMobile integration or handoff.Leak-based
/mock-limitsMock rate limits.Internal/leak-based
/model [model]Switch active model.Public
/oauth-refreshRefresh OAuth tokens.Leak-based
/onboardingFirst-run onboarding.Leak-based
/output-style [style]Change response style.Public
/passesMulti-pass workflow.Leak-based
/perf-issueReport performance issue.Internal/leak-based
/permissionsManage permission rules.Public
/plan [desc]Enter plan mode.Public
/pluginManage plugins.Public
/plugin listList installed plugins.Public
/powerupOpen interactive lessons.Public
/prCreate a pull request.Community
/pr-comments [PR]Fetch PR review comments.Public
/pr_commentsInternal form of /pr-comments.Internal
/privacy-settingsOpen privacy settings.Leak-based
/pushPush current branch.Community
/rate-limit-optionsOpen rate-limit options.Leak-based
/rcStart Remote Control.Public
/release-notesView release notes.Public
/reload-pluginsReload plugins.Public
/reload-skillsRe-scan skill directories.Public
/remote-controlStart or manage Remote Control.Public
/remote-envConfigure remote environments.Public
/remote-setupSet up remote session.Leak-based
/rename [name]Rename current session.Public
/reset-limitsReset rate limits.Internal/leak-based
/resume [session]Resume previous session.Public
/reviewReview current code changes.Public
/rewindRewind to an earlier checkpoint.Public
/sandboxOpen sandbox controls.Public
/sandbox-toggleInternal sandbox toggle.Internal
/scheduleManage scheduled tasks.Public
/scroll-speedTune mouse wheel scroll speed.Public
/security-reviewRun security-focused review.Public
/sessionSession management UI.Leak-based
/shareShare a session.Leak-based
/simplifyRun cleanup-only review and apply fixes.Public
/skillsList skills.Public
/statsOpen stats tab inside /usage.Public shortcut
/statusShow session status.Public
/statuslineCustomize status line.Leak-based
/stickersEaster egg or promo command.Public/non-essential
/summaryGenerate session summary.Leak-based
/tagLegacy tag command.Removed
/tasksManage background tasks.Leak-based
/team-onboardingGenerate teammate onboarding guide.Public
/teleportBridge or transfer sessions.Public
/terminal-setupConfigure terminal integration.Public
/terminalSetupInternal form of /terminal-setup.Internal
/themeChange or create themes.Public
/thinkbackReplay or analyze thinking.Internal/leak-based
/thinkback-playAnimated thinking replay.Internal/leak-based
/tuiSwitch terminal UI mode.Public
/ultraplanDetailed planning workflow.Leak-based
/ultrareview [PR#]Comprehensive cloud code review.Public/workflow
/upgradeUpgrade flow.Leak-based
/usageShow limits, usage, and costs.Public
/usage-creditsShow usage credits.Public
/versionShow version.Leak-based
/vimOld Vim-mode command.Removed
/vitestRun Vitest workflows.Community
/voiceEnable push-to-talk voice mode.Public
/workflowsView dynamic workflow runs.Public
/x402x402 integration.Internal/leak-based

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 agentsOpens agent view: a single list of running, blocked, and completed Claude Code sessions.
claude agents --jsonLists active Claude Code sessions as JSON, including blocked and just-dispatched sessions, with id and state fields.
claude agents --json --allIncludes completed sessions in the JSON agent list.
claude agents then ! <command>Starts a shell command as a background session you can attach to or detach from.
claude "prompt"Starts interactive Claude Code with an initial prompt.
claude -p "prompt"Runs a non-interactive single prompt.
claude --bg --exec '<command>'Runs a shell command as a background Claude session.
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 init <name>Scaffolds a new plugin in .claude/skills.
claude plugin tagCreates release git tags for plugins with version validation.
claude plugin details <name>Shows a plugin’s details, including the LSP servers it provides.
claude plugin marketplace remove <name> --scope user|project|localRemoves a marketplace from a selected configuration scope.

Important CLI Flags

FlagWhat it does
--modelSets the model.
--fallback-modelContinues the session with a configured fallback when the primary model is unavailable.
-w, --worktreeUses a git worktree.
-n, --nameNames the session.
--add-dirAdds a directory to scope.
--settingsLoads settings for dispatched background sessions.
--mcp-configUses a specific MCP config for dispatched background sessions.
--plugin-dirUses a plugin directory for dispatched background sessions.
--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.
--toolsExplicitly allows tools; Grep and Glob now map to the dedicated native search tools on builds with embedded search.
--transport http|stdio|sseSelects MCP transport.
--remote-control-session-name-prefixPrefixes Remote Control session names.
--safe-modeStarts Claude Code with customizations disabled for troubleshooting.

Useful Environment Variables

VariableWhat it does
CLAUDE_CODE_CERT_STORE=bundledUses bundled CAs only instead of the OS certificate store.
CLAUDE_CODE_DISABLE_BUNDLED_SKILLSHides bundled skills, workflows, and built-in slash commands from the model.
CLAUDE_CODE_ENABLE_AUTO_MODE=1Enables Auto mode on Bedrock, Vertex, and Foundry for supported Opus 4.7 and Opus 4.8 setups.
CLAUDE_CODE_ENABLE_FEEDBACK_SURVEY_FOR_OTELRe-enables the session quality survey for enterprises capturing responses through OpenTelemetry.
CLAUDE_CODE_PERFORCE_MODE=1Makes Edit/Write/NotebookEdit fail on read-only Perforce files with a p4 edit hint.
CLAUDE_CODE_SAFE_MODEStarts Claude Code with customizations disabled for troubleshooting.
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_SESSION_IDSession ID.
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_DISABLE_ALTERNATE_SCREEN=1Opts out of the fullscreen alternate-screen renderer and keeps the conversation in the terminal’s native scrollback.
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.
OTEL_LOG_TOOL_DETAILS=1Adds tool parameters such as Bash commands and MCP or skill names to tool decision telemetry events.
OTEL_RESOURCE_ATTRIBUTESAdds custom labels to OpenTelemetry metric datapoints, such as team or repository labels.

Note: Remote Control, /schedule, Claude.ai MCP connectors, and notification preferences are disabled when ANTHROPIC_API_KEY, apiKeyHelper, or ANTHROPIC_AUTH_TOKEN is set. Unset the API key to use those Claude.ai-connected features.

For managed deployments, requiredMinimumVersion and requiredMaximumVersion can keep Claude Code inside an approved version range. The disableBundledSkills setting can hide bundled skills, workflows, and built-in slash commands from the model.

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
/code-review --fix
/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.

View Dynamic Workflows

/workflows
/context
/usage

Use this when Claude creates a larger background workflow and you want to inspect the run, check loaded context, and review usage impact.

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

/usage-credits
/context
/exit

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

Work Toward a Clear Goal

/goal fix the failing checkout test and stop after tests pass
/context
/review

Use this when the task has a clear completion condition and you want Claude to keep working across turns until it is met.

Inspect Plugin Cost and Components

claude plugin details plugin-name
/plugin
/context

Use this before enabling a large plugin or debugging plugin-sourced skills and MCP tools.

Internal, Experimental, and Compatibility 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.

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 set the model, description, allowed tools, or disallowed-tools. 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. Current builds support xhigh for hard Opus tasks, including Opus 4.8. Running /effort without arguments opens an interactive slider and confirms when your chosen level will persist as the default for new sessions.

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!