Claude Code Commands Cheat Sheet

Sidebar

AI · Claude Code Commands Cheat Sheet

Claude Code's own official reference documents well over 70 built-in slash commands — this is a curated set of the ones actually reached for day to day, not the full list. Every command name links out: where Claude Code's own docs give a feature its own dedicated page (MCP, permissions, memory, worktrees, etc.), the link goes there directly; everything else links to the shared Commands reference, since that single page is the actual source for it. For the underlying concepts behind several of these — subagents, orchestration, background work — see Claude Code Agents: Fundamentals and Claude Code Agents: Advanced Orchestration.

Session Basics

/helpShow help & available commands
/clearStart a new conversation, empty context
/initInitialize project with a CLAUDE.md guide
/exitExit the CLI

Context & Memory

/compactSummarize conversation to free up context
/contextVisualize context usage as a colored grid
/memoryEdit CLAUDE.md files, manage auto-memory
/autocompactSet how full context gets before auto-compacting

Model & Output

/modelSwitch model, save as default for new sessions
/configOpen Settings — theme, model, output style, etc.
/output-styleConfigure response format (prose / code-focused / concise)
/fastToggle fast mode on/off

Permissions & Hooks

/permissionsSet approval rules for file/tool access
/hooksView hook configurations for tool events
/mcpManage MCP server connections & OAuth
/doctorRun a setup checkup, can auto-fix issues

Agents & Background Work

/agentsReminder to manage subagents via .claude/agents/
/backgroundDetach session to run as a background agent
/loopRun a prompt repeatedly while session stays open
/tasksList background work, including finished subagents

Git & Review

/code-reviewReview current diff for bugs & cleanup
/security-reviewReview current diff for security vulnerabilities
/pull-requestCreate or manage pull requests
/worktreeManage git worktrees for parallel work

Conversation Control

/rewindRoll back code/conversation to a checkpoint
/branchBranch the conversation to try a different direction
/forkCopy conversation into a new background session
/diffOpen interactive diff viewer for uncommitted changes

Utilities

/usageToken usage & API costs (alias: /cost)
/statusShow session status & resource usage
/planEnter plan mode to outline a large change first
/bugReport a bug or share your conversation
Availability varies
Not every command shown here exists in every Claude Code build — availability depends on your version, plan, and platform. Type / on its own inside a session to see the actual list your own install currently exposes, rather than assuming this page is exhaustive or perfectly current.