Slash Commands, Bang and Backslash
The prompt box takes more than requests for Claude. A slash talks to Claude Code itself, an exclamation mark talks to your shell, and a backslash lets you keep typing on a new line. Knowing which one you need saves turns and tokens.
The rule
Slash talks to the tool, bang talks to the shell, words talk to Claude.
Slash commands control the session instead of asking the model anything. Type / to see the full list. Everyday ones:
| Command | Use it to |
|---|---|
/help |
See the commands and help |
/clear |
Start a fresh conversation |
/compact |
Summarise the conversation to free space |
/context |
See what is filling the context window |
/model |
Switch model |
/status |
Check version, account, model and settings |
/cost or /usage |
Check spending or plan usage |
/export |
Save the conversation to a file or the clipboard |
/doctor |
Check the installation for problems |
/exit |
Leave the session |
The same menu also lists custom commands added by your project, your skills or your plugins.
Bang runs a shell command directly. ! pytest -q runs the tests in your shell straight away, without asking Claude to do anything, and the output lands in the conversation so Claude can see it too. It is the fastest way to show Claude real output. Because you typed the command yourself, you own it; Claude is not the one running it.
A backslash, then Enter, starts a new line without sending, for multi-line prompts. Pasting multi-line text works too, and some terminals support other key combinations.
> ! git status
> ! pytest -q
> The failing test above is in the pause feature.\
Fix it in orders.py only, then run pytest again.
> /context
> /clear