What are Claude Code slash commands?
Claude Code slash commands are short commands you type, each starting with a slash, that tell the session what to do instead of asking the agent to write code. Where a normal prompt says 'fix this bug', a slash command says 'clear the conversation' or 'set up this project' or 'switch the model'. They run the harness, not the model.
I use them in the desktop app the same way I use them in the terminal: type a slash, pick the command, hit enter. Once a few of these become muscle memory, your sessions get faster and your context stays clean. That is the whole point - slash commands are how you stay in control of a long working session.
You do not need to memorize all of them. You need about twelve. Below is the set I actually reach for every day, what each one does, and the moment I reach for it.
The 12 Claude Code slash commands I use every day
Here is the reference table. Each row is a command I use in real sessions, what it does in plain language, and when to reach for it. Save or pin this - it is meant to live next to your editor.
Everyday Claude Code slash commands
| Command | What it does | When to use it |
|---|---|---|
| /help | Lists the available commands and basic usage. | When you forget a command name or are brand new to a session. |
| /clear | Clears the current conversation and starts fresh. | When you switch to a new task and the old context is just noise. |
| /compact | Summarizes the conversation so far to free up context. | When a long session is getting heavy but you still need its history. |
| /init | Sets up a CLAUDE.md memory file for the current project. | On day one in a new repo, so the agent knows your project. |
| /review | Asks Claude to review code or a change. | Before you ship - a second set of eyes on a diff or a file. |
| /agents | Manages subagents you can hand focused work to. | When a task is big enough to split into specialized helpers. |
| /skills | Manages reusable skills the agent can call. | When you want a repeatable capability available across sessions. |
| /mcp | Manages connected MCP servers and tools. | When you want Claude to reach an outside tool or data source. |
| /config | Opens your Claude Code settings. | When you want to change how the session behaves. |
| /model | Switches which Claude model the session uses. | When you want more reasoning power or a faster, lighter pass. |
| /cost | Shows usage for the current session. | When you want to keep an eye on what a long session is using. |
| /resume | Picks up a previous conversation. | When you want to continue work you started earlier. |
Commands evolve as Claude Code does, so type [/help](/blog/claude-code-cheat-sheet) inside your own session to see exactly what is available to you today. The dozen above are the stable core I keep coming back to.
Command hygiene: why /clear and /compact run my day
The two commands that change your results the most are /clear and /compact, because they manage the agent's context. I call the habit of using them often command hygiene, and it is the single fastest way to get sharper output without changing anything else.
/clear wipes the conversation and gives you a clean slate. I use it every time I switch to a new task. A session full of an old, unrelated problem drags the agent off course - clearing it removes that drag. /compact is the gentler move: it summarizes the conversation so far so the important history survives while the bloat goes away. I use it mid-task on a long session that I do not want to lose.
Set up your project once with /init
/init is the command I run on day one in any new project. It creates a CLAUDE.md memory file - a plain document that tells Claude Code what your project is, how it is built, and how you like to work. From then on the agent reads it automatically, so you stop re-explaining the basics every session.
A good CLAUDE.md is the difference between an agent that guesses and an agent that already knows your stack. Run /init to start one, then keep it tight and current. For ready-made starting points, see our [CLAUDE.md templates by project type](/blog/claude-md-templates-by-project-type).
Reusable power: /agents and /skills
/agents and /skills are how you turn one-off work into reusable power. /skills manages skills - packaged capabilities the agent can call again and again. /agents manages subagents - focused helpers you hand a slice of a big job. Both move you from typing the same instructions over and over to triggering them on demand.
- Use /skills when you have a capability you want every session to have - a workflow, a format, a repeatable task.
- Use /agents when a job is big enough to split, so one helper handles a part of it while the main session stays focused.
- Reach for skills first for most everyday work; reach for subagents when the task is genuinely large or parallel.
If you are deciding which to use, start with [the skills to install first](/blog/claude-code-skills-to-install-first) and then read [skills, subagents, MCP, and hooks: when to use each](/blog/claude-code-skills-subagents-mcp-hooks-when-to-use). Those two cover the whole map.
Build your own custom slash command
The best slash command is the one you make yourself. A custom slash command is just a reusable prompt you trigger with a slash. Instead of retyping the same long instruction every time, you save it once and call it whenever you need it. That is the whole idea - turn your best prompt into a one-word command.
Think about what you type again and again - a code review checklist, a commit-message format, a way you like features planned. Any prompt you repeat is a candidate. You write that prompt down as a custom command, give it a name, and from then on the slash plus that name runs it. This is where the dozen built-in commands turn into your own personal toolkit.
For the full set of moves around these commands, keep our [Claude Code cheat sheet](/blog/claude-code-cheat-sheet) open, and to put it all together into a real workflow, read [how to use Claude Code like a pro](/blog/how-to-use-claude-code-like-a-pro).
Make slash commands a daily habit
Slash commands are small, but the habit is what pays off. Practice command hygiene with /clear and /compact, set up every project with /init, build reusable power with /skills and /agents, then capture your repeated prompts as custom commands. Do that and your sessions get faster and cleaner without learning anything new.
Frequently asked questions
What are slash commands in Claude Code?
Slash commands are short commands you type, each starting with a slash, that control the session rather than asking the agent to write code. They handle things like clearing the conversation, setting up a project memory file, switching the model, or managing skills and subagents. Type /help in your session to see the ones available to you.
What is the difference between /clear and /compact?
/clear wipes the conversation and starts fresh, which is what you want when you switch to a new task. /compact summarizes the conversation so far to free up context while keeping the important history, which is what you want mid-task on a long session. Using both often is the habit we call command hygiene.
What does /init do in Claude Code?
/init sets up a CLAUDE.md memory file for your project - a plain document that tells Claude Code what the project is and how you like to work. After that the agent reads it automatically, so you stop re-explaining the basics every session. Run it once on day one in a new repo.
Can I create my own slash command?
Yes. A custom slash command is a reusable prompt you save once and trigger with a slash, instead of retyping the same long instruction. Any prompt you find yourself repeating - a review checklist, a commit format, a planning style - is a good candidate to turn into your own command.
How do I see every available slash command?
Type /help inside your own Claude Code session. Because the command set evolves as Claude Code updates, /help always shows the current list available to you, which is more reliable than memorizing a fixed list.
Do slash commands work in the desktop app?
Yes. The same slash commands work in the desktop app, the terminal, and the IDE. You type a slash, pick the command, and hit enter the same way in each, so the habit carries across wherever you run Claude Code.
Last reviewed by David Iya on June 27, 2026


