Claude Code Field Guide
18 / 35

Slash Commands

Type / and a command name to trigger a repeatable action — /init, /compact, /clear, /help, and any custom one you define.

Still accurate
Currency check: Accurate. /help still lists everything available, and you can still turn your own repeated tasks into custom commands.

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.

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.