Claude Code Slash Commands: The Ones Worth Knowing on Day One
Claude Code has dozens of built-in slash commands. The dozen a beginner actually needs — /init, /clear, /compact, /context, /usage, /model, /resume, /rewind, /plan, /diff, /permissions, /help — what each does, when to use it, and how to make your own.
In a Claude Code session, anything you type starting with / is a command rather than a message to Claude. There are many — type / to see the full, searchable list — but a beginner needs about a dozen. These are based on Anthropic's command reference as of September 2026. (New to Claude Code? Start with How to Install Claude Code.)
Setting up a project
/init
Claude Code looks around your project and writes a CLAUDE.md file: a guide to your project that it reads at the start of every future session — how to run it, test it, and the conventions to follow. Run it once per project, then edit the result. (How to Write a CLAUDE.md.)
/memory
Opens your CLAUDE.md files for editing, and manages Claude Code's automatic memory. Use it when you want to add a rule like "always use pnpm, not npm."
Managing the conversation
/clear
Starts a fresh conversation with an empty context. The most underused command. Use it whenever you switch to a new task: a clean context gives better answers and costs less. Your files and CLAUDE.md are untouched; only the chat history is cleared. (What Is a Context Window?.)
/compact
Summarises the conversation so far to free up space, while keeping the gist. Claude Code does this automatically when the context gets full, but doing it yourself at a natural break lets you say what matters:
/compact keep the list of failing tests and the decision to use Stripe Checkout
/context
Shows what's using up the context, as a coloured grid: instructions, files, conversation, tools. Useful when a session starts feeling sluggish or forgetful.
/resume
Returns to an earlier conversation — pick from a list. Handy after closing the terminal by accident. You can also start with claude --continue (the most recent session) or claude --resume. (How to Resume a Claude Code Session.)
/btw
Asks a quick side question without adding it to the main conversation. "btw, what does useEffect do?" — without cluttering the task in progress.
Staying in control
/plan
Enters plan mode: Claude researches and proposes a plan without changing anything, and you approve it before any edits happen. Use it before any large change. You can also press Shift+Tab to cycle modes. (Claude Code Plan Mode.)
/rewind
Rolls code and conversation back to an earlier checkpoint — an undo for when Claude went down the wrong path. Note it tracks Claude's file edits, not everything a shell command did, so Git is still your real safety net. (Claude Code Checkpoints and /rewind.)
/diff
Shows the changes in your working tree — what's been modified since your last commit. Review this before committing. (How to Read a Diff.)
/permissions
Manages allow, ask, and deny rules: which commands Claude may run without asking, and which it may never run. (Claude Code Permission Modes.)
Cost and models
/usage (or /cost)
Shows token usage and costs for your session. Worth a look now and then, especially on an API key. (How to Keep Claude Code Costs Down.)
/model
Switches the AI model. Larger models are more capable and use your allowance faster; smaller ones are quicker and cheaper for simple jobs.
Getting help
/help
Lists available commands.
/doctor
Runs a setup checkup and helps fix installation or configuration problems.
/code-review (or /review)
Reviews the current changes or a pull request for bugs. A good habit before merging AI-written code. (Review AI-Generated Pull Requests.)
A day-one routine
cdinto your project and runclaude.- First time only:
/init, then read and editCLAUDE.md. - For a big change:
/planfirst. - When the task is done:
/diff, review, commit. - Next task:
/clear.
That loop alone will make your sessions sharper and cheaper.
Making your own commands
You can create custom commands for things you do often. Custom commands are now part of skills: a file at .claude/skills/deploy-check/SKILL.md in your project creates /deploy-check. (The older format, .claude/commands/deploy-check.md, still works.) The file contains instructions in plain Markdown:
---
description: Check the app is ready to deploy
---
Run the tests, the type checker, and the production build.
Report anything that fails, and list any TODOs added in this branch.
Commit it, and your whole team gets the command. (Claude Code Skills.)
Commands aren't the only shortcuts
A few keys worth knowing too:
Shift+Tab— cycle permission modes, including plan mode.Esc— interrupt Claude mid-task. Press it twice to jump back to an earlier message.!at the start of a line — run a shell command directly, like!git status.@— mention a file to add it to the conversation:@src/app.ts.
EasySpawn runs Claude Code in a persistent workspace that stays up when you close the tab — so /resume finds yesterday's session, and your project, database, and running app are exactly where you left them. See how it works or join the waitlist.
Related: What Is Claude Code? · How to Install Claude Code · Claude Code Hooks
Keep reading
How to Install Claude Code on Mac, Windows, and Linux
A step-by-step guide to installing Claude Code: the recommended native installer, Homebrew, WinGet, and npm; which account you need; signing in; checking it works with claude doctor; updating; and fixing the install problems beginners hit most often.
How to Write Good Commit Messages (and Why It Matters With AI)
'fix', 'update', and 'wip' tell you nothing six months later. What a commit message is for, the simple format most teams use, examples of good and bad messages, how often to commit when an AI tool is making the changes, and how to get Claude Code to write useful ones.