# Claude Code Slash Command

> A word that starts with /, like /clear, that steers Claude Code.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** Slash command, Command menu, Built-in command

## Think of it like

It is like a magic word. You say it first, and the helper does that one job.

## Definition

A slash command is a word that starts with / and that you type at the start of a message, such as /clear or /model. It steers Claude Code itself, not the task you are working on. Type / to open the menu, then type letters to filter it. Any text after the name goes to the command. Many commands are built in. Skills and plugins add more of their own.

## Example

Lucy's chat has grown long and slow. She types /co, sees /compact in the list, picks it, and the chat is squeezed into a short summary.

## Example code

```console
/help
```

List the commands you can use.

## Why it matters

Most things you change in a session, from the model to the rules, take one slash command.

## Common mistake

Typing a command in the middle of a message. It only counts at the very start, so later in the line it is just text.

## Three principles

- **Starts with /.** At the start of a message.
- **Steers Claude Code.** Not the task itself.
- **Type to filter.** The menu narrows.

## Related terms

- [Claude Code](https://learn.benibix.com/term/ai/claude-code)
- [Claude Code Skill](https://learn.benibix.com/term/ai/claude-code-skill)
- [Claude Code Plugin](https://learn.benibix.com/term/ai/claude-code-plugin)
- [Bundled Skills](https://learn.benibix.com/term/ai/bundled-skills)

## Told apart from

- [Claude Code CLI Command vs Slash Command](https://learn.benibix.com/compare/claude-code-cli-command-vs-claude-code-slash-command): People think claude doctor and /doctor are the same command typed two ways. They are not. A CLI command is typed in your shell after claude, runs, prints and stops, with no chat. Scripts and CI jobs can run it. A slash command is typed inside a running session and acts on that chat. So claude doctor only reads your install, even when Claude Code will not start, while /doctor runs inside a chat and offers fixes.

## Taught in

- [Slash Commands and the CLI](https://learn.benibix.com/learn/ai-claude-code-commands/slash-commands-and-the-cli): Claude Code Commands, 1/17

![The prompt box with /co typed in it. A list below shows the commands that match: /compact, /config, /context and /copy.](https://learn.benibix.com/diagrams/cmd-menu.svg)

---

Source: https://learn.benibix.com/term/ai/claude-code-slash-command
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
