Slash Commands
Type / and a command name to trigger a repeatable action — /init, /compact, /clear, /help, and any custom one you define.
Slash commands are shortcuts for repeatable actions: /init sets up a new project (and generates a starting CLAUDE.md), /compact shrinks the conversation to save context space, /clear wipes the conversation for a fresh start. /help lists everything available if you forget a name.
You can turn any task you do regularly into your own slash command — the technical mechanism for this has actually converged with Skills (next topic): a custom command placed in the right folder becomes invocable with a slash, and can accept arguments.
Real-life use cases
A custom /deploy command
A team defines a /deploy command that runs tests, builds, and pushes to staging in one step — turning a five-step manual checklist into a single typed command that's identical every time it's run.
Rediscovering a forgotten command
Unsure how to check current token spend, a user types /help instead of guessing, finds /usage, and avoids reinventing a workaround for something that already exists.
Source
- Source video: “Claude Code Explained” — 27 concepts in 27 minutes (YouTube)https://www.youtube.com/watch?v=ZlDnsf_DOzg
- Commandshttps://code.claude.com/docs/en/commands