Research update (September 2026): This guide was expanded using the supplied community discussions and developer guides, then reconciled against the current official Claude Code command and skills documentation. Community sources are used for practical workflow tips; the official docs remain the authority for version-sensitive command behavior.
If you've typed / inside Claude Code, you've seen the problem: dozens of commands scroll past, and it's not obvious which ones you'll actually use. Claude Code ships with 80+ built-in commands and bundled skills, and the list keeps growing with every release.
You don't need all of them. A small set of Claude Code commands covers almost everything you'll do in a normal session โ starting a project, managing context, switching models, reviewing code, and recovering when something goes wrong. This guide covers those, with the exact syntax and what each one is actually for.
Quick answer: the commands worth learning first are /init, /clear, /compact, /model, /permissions, /mcp, /review (or /code-review), /context, /rewind, and /resume. Everything else in this guide builds on those.
A note on accuracy: Claude Code's command list is not static โ commands get renamed, merged, or retired between versions (custom /commands files, for example, have been superseded by the skills system, though old command files still work). Type /help in your own session for the authoritative list of what's available to you right now; this article reflects Claude Code's documented commands as of late 2026.
Claude Code commands at a glance
| Command | What it does |
|---|---|
| /init | Generates a starter CLAUDE.md for the project |
| /clear | Wipes conversation history and starts fresh (aliases: /reset, /new) |
| /compact [instructions] | Summarizes the conversation to free up context space |
| /context [all] | Shows what's consuming the context window |
| /model [name] | Switches the active model |
| /effort [level] | Changes reasoning effort for the task |
| /plan [description] | Plans a change before implementation |
| /permissions | Manages allow/ask/deny rules for tools (alias: /allowed-tools) |
| /mcp | Manages MCP server connections and authentication |
| /agents | Manages subagents |
| /tasks | Lists and manages background work |
| /memory | Edits project memory and CLAUDE.md entries |
| /review / /code-review | Reviews the current diff or a PR |
| /security-review | Checks the current changes for security issues |
| /diff | Shows what's changed in your working tree |
| /simplify | Reviews recent changes for reuse, quality, and efficiency |
| /rewind | Rolls conversation and/or code back to a checkpoint |
| /resume [session] | Reopens a previous session (alias: /continue) |
| /fork [name] | Copies the current session into a background session |
| /btw [question] | Asks a side question without adding it to the main thread |
| /rename [name] | Gives the current session a useful name |
| /usage | Shows plan usage and rate-limit status |
| /stats | Shows usage patterns and session statistics |
| /cost | Shows token usage and cost (availability depends on account/setup) |
| /hooks | Manages deterministic tool-event automation |
| /mcp | Manages MCP servers and OAuth authentication |
| /plugin | Manages Claude Code plugins |
| /chrome | Configures Claude's Chrome integration |
| /remote-control | Lets you continue/control a local session remotely (alias: /rc) |
| /background | Detaches a session so it can keep running in the background |
| /teleport | Moves a web session into the terminal |
| /run / /verify | Launch and verify your app against the running application |
| /batch | Orchestrates large changes across independent units |
| /loop | Repeats a prompt on an interval |
| /deep-research | Runs a cited multi-source research workflow |
| /skills | Lists available skills |
| /help | Lists commands available in your session |
Session and context management commands
This is where most day-to-day command usage happens, because Claude Code's context window is the resource you'll run out of first.

/clear
Wipes the current conversation and starts with empty context, though project memory (CLAUDE.md) still loads. Use it when you're switching to an unrelated task, not when you just want more room in an ongoing one โ for that, use /compact instead. You can pass a name to label the cleared conversation for later: /clear auth-refactor. Aliases are /reset and /new.
/compact [instructions]
Summarizes older messages to free up context space while keeping the thread intact. Compaction also happens automatically as you approach the context limit, but doing it proactively at a natural stopping point โ after finishing a feature, before starting the next โ gives you more control over what survives. You can steer what gets kept:
/compact Preserve the final approach we landed on and any open TODOs
/context [all]
Renders a colored grid showing exactly what's consuming your context window โ system prompt, tools, MCP servers, loaded skills, conversation history. If Claude starts behaving oddly in a long session, this is the first command to run; it will often point straight at the culprit (an oversized CLAUDE.md, a chatty MCP server, or leftover skill content).
/rewind
Rolls the conversation and/or the code back to an earlier checkpoint, since Claude Code snapshots files before every edit. This is your undo button when a change goes sideways or Claude misunderstands a request. Aliases: /checkpoint, /undo.
/resume [session] and /branch [name]
/resume reopens a past conversation by ID or name, or opens a picker if you omit it (alias: /continue). /branch forks the current conversation at this exact point so you can try a different approach without losing the original โ you can always /resume back to it.
Project setup commands
Run these once per project, typically in your first session in a new repository.
/init
Generates a starter CLAUDE.md โ the file Claude Code loads automatically at the start of every session in that project, containing conventions, architecture notes, and anything else Claude should know without being told each time. Run /memory afterward to refine what /init generated; it's a solid first draft, not a finished document.
/permissions
Opens an interactive dialog for managing which tools Claude can use without asking, which it should ask about, and which it should never touch. If you're getting interrupted by permission prompts for commands you trust (like git status or npm test), this is where you add allow rules so Claude stops asking. Alias: /allowed-tools.
/mcp
Manages connections to MCP (Model Context Protocol) servers โ the mechanism that lets Claude Code reach external tools like Google Drive, Slack, or your issue tracker. Run it with no argument for an interactive list, or /mcp enable <server> / /mcp disable <server> to change connection state directly.
/agents
Points you toward creating and managing subagents โ specialized configurations for particular kinds of tasks (a code-reviewer agent, a test-writer agent, and so on). In current versions this mostly directs you to ask Claude to create one, or to edit the .claude/agents/ directory yourself.
Model, effort, and workflow commands
/model [name]
Switches the active model and saves it as your default for new sessions. Run it with no argument to get an interactive picker rather than guessing at exact model strings.
/effort [level]
Sets how much reasoning effort the model applies, from low up through xhigh. Higher effort levels help with genuinely hard problems but cost more time and tokens โ reserve them for cases that actually need it rather than leaving effort maxed out by default.
/plan [description]
Enters plan mode directly, where Claude reads and reasons about a change before touching any files. Useful before a large or ambiguous change, since it lets you review and approve the approach before code starts moving.
/fast [on|off]
Toggles fast mode where supported. This is useful when you want quicker responses for straightforward work and do not need the normal response latency. Because availability and model support can change, check /help in your installed version before relying on it.
/btw [question]
Ask a quick side question without adding it to the main conversation history. This is useful when you are deep into a debugging or implementation task and need a conceptual clarification without polluting the main thread. The official command reference lists /btw as a context-management command.
/rename [name]
Names the current session so it is easier to find later. For long-running projects, names such as auth-refactor, api-migration, or checkout-bug make /resume much more useful than a history full of anonymous sessions.
/tasks and /background
/tasks lets you inspect background work, including delegated tasks and subagents. /background detaches the whole session so it can continue running while you free the terminal. These are especially useful when a task is long-running and does not need your constant attention.
/fork [name]
Creates a copy of the current conversation as a background session so you can explore another direction without abandoning the original. Think of it as a conversational branch for experimentation.
/teleport and /remote-control
These commands help move work between surfaces. /teleport pulls a web session into the terminal, while /remote-control lets you continue controlling a local Claude Code session from another device through supported Claude surfaces. This is useful for long-running work that you want to check without staying at your development machine.
Code review and debugging commands
Claude Code has several review-flavored commands that overlap in name but not in scope โ worth knowing apart before you rely on them.

/review / /code-review
/review is now an alias of /code-review. It reviews the current git diff โ or a PR number, branch, or path you pass it โ for correctness bugs and cleanup opportunities:
/code-review --fix # apply the findings directly /code-review high 1234 # review PR #1234 at high effort
/security-review
A separate command scoped specifically to security issues in the current diff โ authentication, secrets handling, injection risks โ rather than general code quality.
/diff
Shows what's changed in your working tree, including edits Claude has made so far in the session. Run it before /code-review if you just want to eyeball the change yourself.
/debug [description]
Turns on debug logging and helps you investigate a runtime issue by reading the session's debug log, rather than guessing at a fix immediately. Describe the symptom to focus the investigation.
Utility and housekeeping commands
/cost / /usage
Shows your token usage and estimated cost for the session (/cost is now an alias of /usage). Useful for catching an unexpectedly expensive session early, particularly one that's been running a high effort level or a lot of tool calls.
/doctor
Runs a setup checkup: installation health, PATH issues, unparseable settings files, unused skills or MCP servers dragging on context, slow hooks, and available updates. It reports findings and asks before changing anything.
/export [filename]
Exports the current conversation as plain text โ handy for handing off context to a teammate or archiving a decision trail. Without a filename it opens a dialog to copy to clipboard or save.
/help
Prints the commands actually available in your session, which is the only reliable way to know your exact command set โ availability varies by platform, plan, and Claude Code version. The official docs also note that some commands may not appear in the menu until you type their full name.
/usage, /stats, and /cost
These commands answer different monitoring questions. /usage is useful for checking plan usage and rate-limit status. /stats focuses on longer-term usage patterns and session history. /cost provides token/cost information where available.
A practical habit is to check usage during heavy sessions, inspect /context when the conversation becomes large, and then use /compact or switch models if the session is becoming unnecessarily expensive.
/hooks
Hooks are a different kind of automation from slash commands. A hook can run deterministically around tool events, such as before or after a tool call, instead of depending on Claude to remember a prompt instruction. That makes hooks a strong fit for guardrails such as linting, validation, or blocking risky operations. Use skills for how to perform a workflow and hooks for rules that should happen automatically.
/run and /verify
For application work, passing tests is not always enough. The bundled /run skill can launch and drive an application so you can check a change against the running app, while /verify is designed to build/run the application and confirm that a change works. If a project has a non-standard launch process, /run-skill-generator can record a reusable per-project recipe so Claude does not have to rediscover the setup each time.
/deep-research
/deep-research is a bundled workflow for multi-source research: it fans out web searches, fetches and cross-checks sources, and produces a cited synthesis. It is useful when the task requires current external information rather than only repository context.
/batch and /loop
/batch is intended for large, parallelized changes across a codebase. /loop repeats a prompt on a schedule and can be useful for polling or recurring checks. These are more advanced than the everyday commands, so use them when the workflow genuinely benefits from automation rather than simply because they exist.
Custom slash commands vs. skills
If you've seen references to .claude/commands/ โ Markdown files that define your own /command-name โ that's still supported, but the current recommended approach is skills. A SKILL.md file at .claude/skills/<name>/SKILL.md creates the slash command while also supporting richer behavior such as supporting files, invocation controls, and automatic loading when the skill is relevant. Existing .claude/commands/ files keep working, but new reusable workflows are better candidates for skills.
One important optimization from the current skills documentation: skill bodies load when the skill is used, unlike always-loaded CLAUDE.md content. That means a large procedure or reference document can live in a skill instead of consuming the main context on every turn.
For repetitive work, experienced Claude Code users also recommend writing precise, trigger-oriented skill descriptions. The goal is not to create dozens of commands; it is to turn repeated procedures into reusable workflows with clear boundaries. Community discussions also emphasize reviewing third-party skills before installing them, because a skill can contain executable instructions or tool access.
Workflow lessons from experienced Claude Code users
The linked community discussions and developer guides surfaced several habits that complement the command reference:
Use /compact proactively, not only after a warning. Long sessions can accumulate stale discussion and tool output. A focused instruction such as /compact Preserve the final approach, current blockers, and open TODOs can make the summary more useful. Community users also report creating a short HANDOFF.md before starting a fresh session when a task needs a reliable handover. ๎cite๎turn3view1๎turn5search1๎
Use /clear at task boundaries. When moving to an unrelated task in the same project, clearing stale conversation context can be preferable to carrying irrelevant history forward. The official docs describe /clear as starting fresh while keeping project memory available. ๎cite๎turn1view0๎
Name sessions with /rename. This small habit makes /resume much more practical when you work across multiple features or projects. ๎cite๎turn5search1๎
Use /diff as a checkpoint. Review the actual working-tree changes before asking Claude to review or before committing. This is a simple way to catch unintended edits early. ๎cite๎turn5search1๎turn1view0๎
Separate procedural knowledge from permanent project facts. CLAUDE.md is useful for durable project rules and context, while skills are better for larger procedures that only need to load when relevant. ๎cite๎turn6view0๎
Use @ and ! deliberately. Community users report that @ can directly reference a known file and ! can run a shell command when you already know exactly what should execute. These are workflow shortcuts, not substitutes for understanding what Claude is doing. ๎cite๎turn3view2๎
Use hooks for deterministic guardrails. A community pattern is to use skills for procedural workflows and hooks for preventative rules that should fire automatically around tool use. ๎cite๎turn3view3๎turn3view4๎
Treat third-party skills as code. Review the contents and permissions of a skill before installing it, especially if it can execute shell commands or access credentials. This is a community security recommendation, not a claim that third-party skills are inherently unsafe. ๎cite๎turn2view3๎
Use /simplify after a feature works. The official bundled skill is designed to review changed code for reuse, quality, and efficiency; several developer guides recommend it as a post-implementation quality gate. ๎cite๎turn6view0๎turn4view1๎
Commands worth adding to your personal cheat sheet
If you already know the core commands in this article, the next useful layer is:
/usage โ rate limits and plan usage
/stats โ usage patterns
/rename โ easier session discovery
/fork โ experiment without losing the original session
/btw โ side questions without main-thread noise
/tasks โ monitor background work
/background โ let a session continue while detached
/hooks โ deterministic automation and guardrails
/run + /verify โ validate behavior against the running app
/batch โ parallelize large changes
/loop โ repeat checks on an interval
/deep-research โ cited multi-source research
/skills โ inspect the skills available to you
The official command reference remains the authority because command availability and behavior change quickly. ๎cite๎turn1view0๎turn2view0๎turn2view1๎
Common mistakes with Claude Code commands
Using /clear when you meant /compact****. /clear throws away conversation history; /compact keeps it, just summarized. If you're mid-task, you almost always want /compact.
Maxing out /effort by default. Higher effort levels cost more tokens and time for every response, not just the hard ones. Set it per-task instead of leaving it high for the whole session.
Not running /init in a new project. Skipping it means Claude re-discovers your conventions and architecture from scratch every session instead of once.
Assuming a command list you read somewhere is current. Claude Code ships changes constantly; commands get renamed, merged, or retired. Check /help in your actual session and use the official command reference when publishing a guide.
Installing a skill without reviewing it. Treat third-party SKILL.md files like code: inspect what they instruct Claude to run, what tools they request, and whether they access sensitive files or credentials.
Using a skill for everything. Keep durable project facts in CLAUDE.md; move long procedures and specialized workflows into skills so they load when needed rather than bloating every session.
FAQs
/clear deletes conversation history entirely and starts fresh, though project memory in CLAUDE.md still loads. /compact summarizes the history instead of deleting it, so context is freed but the thread of what you were doing is preserved.
Type /help inside a session, or type / alone to open the filterable command menu. This reflects exactly what's available in your version, plan, and platform โ more reliable than any external list, including this one.
Correctness bugs and cleanup opportunities in the current diff, or in a PR/branch/path you specify. It's distinct from /security-review, which is scoped specifically to security issues rather than general code quality.
Yes, either as a legacy Markdown file in .claude/commands/ or, in the current recommended format, as a SKILL.md file under .claude/skills/<name>/. Both are invoked by typing /<name>.
Claude Code's command set changes across versions โ commands get renamed, merged into other commands, or retired. Run /doctor to check your installed version, and /help to see your current command list.
/btw is for a side question that you do not want to add to the main conversation thread. It is useful when you need a quick clarification while keeping the main task focused. ๎cite๎turn1view0๎
A skill is a reusable workflow or body of specialized instructions that Claude can load when relevant or that you can invoke with a slash command. A hook is event-driven automation that can enforce an action around tool use. In practice, skills are a good fit for how to do something, while hooks are useful for what must happen automatically. ๎cite๎turn6view0๎turn3view3๎
No. Keep CLAUDE.md focused on durable project-specific facts, conventions, and rules. Put large procedures or reference material into skills so their bodies load only when the skill is actually used. ๎cite๎turn6view0๎
They help validate a change against the running application, not just static tests or type checks. For projects with unusual launch requirements, /run-skill-generator can capture a reusable project-specific run recipe. ๎cite๎turn6view0๎
It's designed to preserve what matters while summarizing the rest, but on a long or complex session some detail can get lost. Passing focus instructions (/compact Preserve the final approach and any open TODOs) reduces that risk.
/rewind โ it rolls the conversation and/or your code back to a checkpoint, since Claude Code snapshots files before every edit.
Conclusion
Claude Code's full command list is long, version-dependent, and not worth memorizing in its entirety. Start with the commands that solve the problems you face repeatedly: manage context (/clear, /compact, /context), set up and configure the project (/init, /permissions, /mcp), plan and review work (/plan, /diff, /review, /security-review, /simplify), and recover or continue sessions (/rewind, /resume, /fork).
Once those are comfortable, add workflow commands such as /btw, /tasks, /background, /hooks, /run, /verify, /batch, and /loop as your projects require them. Keep /help as your in-session source of truth, because Claude Code changes quickly. For repeatable procedures, prefer skills over growing a huge CLAUDE.md or collection of one-off prompts.