Type / in a Claude Code session and a menu opens: every command available to you, narrowing as you keep typing. A command is only recognized at the start of a message, and whatever follows its name becomes its arguments. Commands are how you steer the session itself, instead of asking Claude to do something.
Two kinds behind one menu
Built-in commands are coded into Claude Code and act on the session directly. /clear starts a new conversation, /compact summarizes the current one, /context shows what’s filling your context, /model switches models, /memory opens your memory files, and /usage (alias /cost) shows session cost and plan limits. /help lists what’s available.
Prompt-based commands hand a prompt to Claude instead. Some ship with Claude Code as bundled skills, like /code-review and /doctor. The rest come from your setup: skills you write, skills from plugins (namespaced as /plugin-name:skill-name), and prompts exposed by MCP servers, which appear in the menu as /servername:promptname (MCP).
Writing your own
Custom commands have been merged into skills. A file at .claude/commands/deploy.md and a skill at .claude/skills/deploy/SKILL.md both create /deploy; the older commands/ folder still works, but the docs recommend skills for new work. Put a skill under ~/.claude/skills/ to have it in every project.
The markdown body is the prompt. $ARGUMENTS is replaced with everything you typed after the name, and $0, $1 pick out single arguments. So /deploy staging sends Claude the file’s steps with staging filled in. A good command is prompt engineering you only have to do once.
The catch
By default, Claude can also invoke a skill on its own when it looks relevant. For anything with side effects, like deploying or committing, add disable-model-invocation: true to its frontmatter: then only you can trigger it, and its description stays out of context until you do. And the / menu depends on your platform, plan and setup, so not every command in the reference will appear for you.