The Complete Guide to Claude Code Slash Commands (2026)

/ Only commands confirmed in official Anthropic docs.

Published: July 31, 2026 at 11:07 AM EDT | Updated: September 4, 2026 at 2:34 AM EDT
Claude code slash commands
Image: Stephanie Smith / TheTweaks, Claude

Quick Verdict: Claude Code slash commands are typing shortcuts which start with / and can control the session changing models, manage the context window, code reviewing or triggering multi-step workflows. There are commands that are Built in that have a fixed logic built into the CLI itself. Other commands are bundled skills – these are included out of the box in Claude Code, and they are more of a workflow that is driven by AI. In addition, you can develop your own slash commands as custom skills. This guide contains all commands referenced in the official Anthropic Claude Code slash commands documentation page and NO information is provided from blog posts only.

If you haven’t installed Claude Code yet, you should first; The rest of this guide is based on it.

Key Takeaways

  • Within Claude Code there are two official slash commands: built in and bundled skills (with the ability to create personalized slash commands and skills).
  • Only the commands officially documented in Anthropic’s guide are included in this guide; commands that are documented in third party guides are listed in the separate section, as unverified.
  • There are three basic commands to learn for the context window: /clear, /compact and /context.
  • /batch, /loop and /code-review are bundled skills, meaning that they are multi step workflows that resemble AI orchestrated processes and thus their output can differ in various sessions of the software.
  • Custom slash commands (.claude/commands/) still work but skills (.claude/skills/) are recommended by Anthropic.
  • Not all commands are available for all plans, versions and organizations. Please check /help first if you can’t find some commands in the list in your console.

A few commands mentioned in blog posts /goal, /btw, /insights, /statusline, /color, /effort and /hooks could not be found anywhere in the official Anthropic documentation. These commands are being covered separately to recommendations below.

What are the Slash Commands in Claude Code?

Claude Code slash commands are typing shortcuts you can input into the terminal starting with / and allow you to control the session flow, clear context, switch models, set permissions, or trigger some workflows. You must use / before a command to access the list of commands; if you wish to narrow the list of commands by adding letters after /. Any command(s) should go at the start of your input message, with everything typed afterward forming the arguments.

There are various slash commands within Claude Code to be aware of:

  • Built in commands – pre-installed in Claude Code & execute – fixed logic coded in the CLI.
  • Bundled skills – are similar in usage to commands, but they can be multi-step AI orchestrated workflows.
  • Custom Commands/Custom Skills – files that can be written by you and placed in .claude/skills/ or .claude/commands/.
.claude/commands/ in claude code
Image: Letty Simone / TheTweaks

That there are these different types is significant in that it impacts the approach to working with them. The Built-in commands operate in the same way every time you trigger them; but the bundled skills resemble small programs that use the tools and chain multiple steps depending on the information found in your repository, that’s why two executions of the same skills may vary.

For the information on how to use Claude Code, please refer to the corresponding guide.

Official vs. Unverified Commands

The table below is the most important of this guide and is most commonly omitted in list articles.

Category What it means
Official Built in Improved the CLI logic, added documentation, and made it always available on a standard installation.
Official bundled skill Prompt based workflow, pre installed and documented as a skill
Custom  Created by you or your team members, not a part of the default installation
Unverified / community only Mentions can be found in many blogs, but not officially in the Anthropic documentation

The commands in the Complete Command Reference Table and Bundled Skills sections are officially documented commands. Unverified commands are covered separately not because they are fake, but because we have not been able to verify them; a technical guide should be clear on that.

The complete Command Reference Table

Command Purpose Type
/clear Provide context; maintain project memory Built in
/compact To summarize messages from the past to free up context. Built in
/context Shows how context window is being used Built in
/resume Go back to an earlier conversation Built in
/branch Break the ongoing discussion up into a branch. Built in
/fork Make a copy of a conversation to a new background session Built in
/rewind Roll back conversation/Code to a checkpoint Built in
/teleport Go into a web session in the terminal: Built in
/remote-control To resume a local session from a different device. Built in
/doctor Detects setup problems Built in (skill-backed)
/debug Detects runtime problems. Built in
/feedback Report Bug, with session context attached Built in
/status Display version and session status.Print the version and session status. Built in
/model Change active model Built in
/permissions Manage tool permissions Built in
/mcp Monitor and manage the connected MCP servers. Built in
/config You can configure Session and toggle the settings at this link. Built in
/init Create CLAUDE.md file Built in
/recap Create a session summary on demand Built in
/review Code review Built in
/security-review Regularly review for security issues Built in
/skills Manage skills Built in
/plugin Install/manage plugins Built in
/reload-plugins Restart plugin calls, MCP servers, agents. Built in
/add-dir Add access to another directory… Built in
/batch Break work down into smaller components Bundled Skill
/loop Prompt re run every in seconds Bundled Skill
/code-review Review a diff for quality, security, tests Bundled Skill
/claude-api Analyze Anthropic API in session Bundled Skill
/run Launch and run your application to check the change Bundled Skill
/verify Build and run your application to confirm behavior Bundled Skill
/run-skill-generator Recording how to launch/build your project Bundled Skill

It’s not the number chosen for a good headline, it’s 31 confirmed commands and skills – you can check. Commands that are not in this table may be a custom skill/command, a plugin provided command, or a prompt provided by MCP.

Built in Commands, By Category

Session and context management

/clear slash command in claude code
Image: Letty Simone / TheTweaks
  • /clear — start a new conversation preserving the project memory. Typical way to switch context between unrelated tasks.
  • /compact — reduce each old message to its summary to free up context space, but keep important portions of the message.
  • /context — demonstrate how the context window is being utilized, so Claude Code doesn’t feel “bloated”.
  • /resume — go back to a previous conversation.
  • /branch — branch the current conversation to attempt alternate direction, keeping the original conversation in place.
  • /fork — create a new background session to develop a new direction in parallel with the current conversation.
  • /rewind — to roll back the code and conversation to an earlier point or to summarize a portion of the conversation from a selected point.
  • /teleport — transfer a session running on the web to the terminal.
  • /remote-control—Continue the local session from another device.

Diagnostics

/doctor claude code command
Image: Letty Simone / TheTweaks
  • /doctor — perform a setup checkup that will identify installation and configuration problems: bloated CLAUDE.md files or context space taken up by skill listings.
  • /debug — troubleshoot runtime problems of the current session.
  • /feedback — report an issue to Anthropic with attached session context.
  • /status — Print version of Claude Code currently in use, and status of the session.
  • /Model — button to specify the model and permissions and the configuration.
  • /from — an active model for a session.
  • /permissions — manage permissions for tools and actions that Claude Code is able to perform without prompts.
  • /mcp — view and manage connected MCP servers.
  • /config — session configuration such as session recaps automatically enabled.
  • /init — creates CLAUDE.md file for a project.
  • /recap — create an instant summary of the session.

Review and security

  • /review — Review the code (directly or through Skill tool).
  • /security-review — Pre-release checks for security vulnerabilities such as injection problems, authentication problems, and exposed credentials.

Skills and plugins

  • /skills — view and manage installed skills including their visibility.
  • /plugin and plugin marketplace — install and handle plugins and plugin marketplace.
  • /reload-plugins — Reload plugin after update provided hooks, MCP servers and agents.
  • /add-dir – Add access to extra directory to the current session.

Bundled Skills

These are built-in with each Claude Code install and available from the outset, but unlike built-in commands, are prompt based, Claude will follow the instructions you give and use its own internal tools, rather than a set of CLI logic. The disableBundledSkills setting can disable all of the bundled skills (except /doctor).

  • /batch — splits up a larger task into smaller tasks for Claude to do. Helpful when making a change in a many files scenario.
  • /loop — loops a prompt on an interval during the current session, which can be useful for polling some process outside of your development session, e.g., deployment or CI process.
  • /code-review — analyzes the diff file using coding style, security vulnerabilities, performance and test coverage.
  • /claude-api —This skill includes a bundle of code that allows you to directly interact with the Anthropic API in the same session.
  • /run — runs your application and launches it to verify that your change is applied successfully; can make inferences on the basis of your current project.
  • /verify — runs and builds your app, checks that your code change is performing as you expect, without needing to have unit tests.
  • /run-skill-generator — Records the details of running and building a specific application that /run and /verify don’t need to figure out each time.

Use Cases – Chaining of Commands in particular Workflows

A simple list is not representative of the usage of these commands. Here are three chains of commands we can attest to, which were built strictly using commands and skills with no /goal, /hooks etc.

Debugging workflow

/context → /compact → /debug

Look at what’s in your terminal, cut back on the context and find out the source of your issues.

Large refactoring workflow

/batch → /code-review → /security-review

Break it down to smaller parts and make sure there is no performance or security problem after the refactoring is applied.

Working solo in development

/resume → /compact → /model

Continue work from previous session and seamlessly change models during the session, as it grows larger.

Claude Code Custom Slash Commands vs Skills

One should be very clear: They are not synonymous, but are two different items altogether: A custom slash command and a skill.

A custom slash command is a simple .claude/commands/your-command.md markdown file. It contains the prompt and when you execute /your-command, Claude Code will execute it as you wrote it, each time you execute it.

A skill is a more powerful form of this concept that is defined in .claude/skills/your-skill/SKILL.md. Skills include YAML frontmatter that allows you to specify the tools the skill has access to, the model that should be used for its execution and whether it is possible for Claude to run the skill automatically on certain triggers in addition to loading the skill only on demand, instead of every single time.

Custom commands still aren’t being deleted—existing files in .claude/commands/ still work perfectly. However, according to Anthropic’s official documentation, custom commands became obsolete and merged into skills as the recommended way of defining them in future releases: skills do everything commands did, plus optionally automating on triggers and tools control. If a skill and a custom command share the same name, the skill’s command will take precedence.

How to Create Custom Slash Commands in Claude Code

  • Make a new folder for your skill: mkdir -p ~/.claude/skills/your-command-name (personal, works anywhere), .claude/skills/your-command-name (works only in this project, shareable via git), or, if you’re using a plugin, in the plugin’s skills/ folder.
  • Place a SKILL.md document in the directory containing the instructions for Claude, as well as the YAML frontmatter (at least a description).
  • Save the file – no build step necessary, no restart!

Or an old format can be used as well: put your instructions into .md files in .claude/commands/your-command.md and your command /your-command is available right away.

How to Add Slash Commands in Claude Code

If a command is built-in there is no need to add anything as they are available from the start of the program when you run / If you wrote the custom command or skill, the command will be immediately available after you save the markdown file to ~/.claude/skills/, to .claude/skills/ (if the file is local and was checked in to the git repository), or under a plugin’s skills/ folder.

It does not need to be restarted, but if a new skills/ directory was created that was not found when the session was started, it may need to be restarted.

As a team it is preferable to keep custom commands in the repo instead of in a personal home directory to ensure that all team members will get the same shortcut when they clone the project. If you’re looking for more details on this subject, you should read our guides for running Claude Code in VS Code and Cursor.

Best Claude Code Slash Commands: Complexity Analysis

Instead of estimating how many hours per week the commands can save a figure that cannot be measured accurately, let’s analyze the best verified commands based on their characteristics.

Command Best For Complexity Automation Team Value
/compact Context management Low None (manual trigger) Medium
/context Diagnosing context bloat Low None Medium
/rewind Undoing bad edits Low None Low
/batch Large, multi file refactors Medium High (skill orchestrated) High
/security-review Pre ship security checks Medium Medium High
/code-review Structured diff review Medium Medium High
/doctor Configuration health checks Low Low Medium
/loop Polling external processes Medium High Medium

What Reddit Actually Says About These Commands

Though the discussions in r/ClaudeAI may not necessarily determine reality for a given unlisted command, they’re still a great resource to learn about how commands are used on a daily basis. Rather, we have found that there are some specific points that reoccur:

  • The most popular command: /compact and /context, mentioned several times as the commands that really helped people to get things done dramatically – not the glamour of automation.
  • Mostly despised change: renaming/mixing commands between releases, without adequate warning, leaving people to re-learn their workflow in the middle of a project.
  • The most frequent error among new users: letting the context get too large, and then pointing to Claude for the “forgetting” of instructions when executing /clear or /compact.
  • The most popular workflow: is to run /batch before a review followed by /code-review or /security-review before committing rather than assuming that it is OK.

Version History

Renamed, merged or moved between built-in and skill status between releases, Claude Code updates fast. Confirmed changes:

Command Status
/doctor Included in current versions as a skill, in earlier versions it was a built-in command.
/verify, /code-review Previously were able to run automatically; in current versions can only be run manually when invoked explicitly

Apart from these two, no official reports of any other additions or deletions from other third parties (such as /vim or /pr-comments in previous versions that were merged into /batch). We can’t confirm these changes ourselves against official Anthropic documentation and so those changes are excluded.

In case the command that you used previously stops working – /doctor is the quickest way to find whether it is a problem with your configuration or the actual change in the command.

Troubleshooting

/help slash command in claude code
Image: Letty Simone / TheTweaks

Why is a command that is listed in this guide not listed in /help? Availability is subject to the version of your Claude Code, your plan, plugin versions and where they are enabled in your organization and the skills in the bundle. Two readers of this guide, even as you read it, might be seeing different menus.

What’s the reason for /batch and/or any other bundled skill not appearing? The skills can be turned off by using the disableBundledSkills setting as a bundled skill. If you’re on a managed plan, review your setting file, or contact the organisation administrator.

Why is the output of /help different from my team mate’s? Custom commands and skills are typically stored in the project folder (usually .claude/skills/ and .claude/commands/) and only show up after they have been opened. Personal skills in the ~/.claude/ directory only exist for you personally, not your teammates, unless they are committed into the repository as well.

Why do the other guides not have a /goal command, or any other commands? They are not certain to be included in Anthropic’s official documentation. Refer to Commands We Could Not Verify below.

Is it possible to add some commands to the MCP servers? Yes, any of the connected MCP servers will expose its prompts and commands.

Why is a command I had last month gone? Commands are renamed or merged between releases. It might have been removed for good but check /doctor or your version’s changelog before taking it personally. If the issue doesn’t seem to be a terminal issue, check out the common Claude Code errors in cmd.

Commands We Could Not Verify

Some commands are referenced in community blog posts and third-party full reference guides but do not show up in Anthropic’s docs on Claude Code slash commands: /goal, /btw, /insights, /statusline, /color, /effort and standalone /hooks command.

Claude Code is not necessarily incorrect, is updated often and may contain some plan or version gated features and flags that have not been documented. As there is no confirmation, we are not recommending them and unlike the former version of this guide have no reference to them elsewhere. If you have seen one of these commands operate in your terminal, the safest way is to launch /help in your session.

Claude Code Pricing and Command Access

The availability of commands depends on your subscription tier, organization’s settings, plugins activated and your version of Claude Code. There is no official confirmation on which particular commands require a specific paid plan, so the safest approach is the following: if a command from this guide does not appear in /help for you run /help in your own session and check details of your plan on Anthropic’s website. To see the complete picture of how Claude Code performs on a daily basis, read our Anthropic Claude Code review (2026).

Real Limitations to Know Before You Rely on Them

  • Commands are renamed, combined or eliminated from version to version. All confirmed changes (see Version History above) are listed, though.
  • /batch and other orchestration commands are real tokens, not automation and add up with large refactors.
  • Some commands are plan-gated; that is, a command on this guide might not be visible for you for that reason.
  • Most custom commands found online on Reddit or GitHub are generally self-made workflows and non-preinstalled; be careful not to rely on every command that is posted.

Who Should Use Which Commands

  • New users: use /clear, /compact, /context and /help to limit your use. Get a handle on the context first – there’s a how to use Claude Code guide to get you there.
  • Solo developers: use /rewind and /resume – they help to avoid babysitting and context resetting.
  • Teams deploying applications: /security-review, /code-review and /doctor are worth becoming a part of your weekly routine.
  • People who do large refactors:  /batch, the most powerful of the skills that are bundled.

Final Verdict

This list is shorter than 50+ hidden commands, but all of the commands in this list are officially documented by Anthropic. It can be reasonable to learn the context management commands first (e.g. /clear, /compact, /context) and adding on /batch and /security-review later, if you like the output. The duration of time these commands can save, however, will vary based on one’s workflow and not on some number from someone else’s session log.

Frequently Asked Questions

Typed shortcuts starting with / that control a Claude Code session — clearing context, switching models, running reviews, or triggering multi-step workflows. Type / to see the menu.
Built-in commands run fixed logic coded into the CLI and always behave the same way. Bundled skills are prompt-based: Claude follows instructions and orchestrates tools itself, so behavior can vary slightly session to session.
Add a markdown file to .claude/skills/your-command/SKILL.md (recommended) or the older .claude/commands/your-command.md format. The command becomes available the moment you save the file.
Most Related