Claude Code Commands: 14 Essentials to Learn First
Claude Code has dozens of built-in commands, but a few handle most daily work. Here are 14 essential slash commands to learn first, straight from official docs.

Last updated December 1, 2026
Claude Code is Anthropic’s coding assistant that works in your terminal and other tools. It can read your project, edit files and run commands with your approval.
Slash commands make it faster to use. You type a forward slash and a short word to set up projects, switch models, manage context or undo mistakes.
This guide explains 14 essential commands and when to use each one. We checked them against the current Claude Code release and its official documentation.
Key Takeaways
- Type a forward slash in Claude Code to see available commands.
- /init and /memory set up project instructions Claude follows every session.
- /plan, /model and /effort control how Claude approaches a task.
- /context, /compact and /clear help manage long conversations.
- /rewind and /doctor help you recover from mistakes and fix setup problems.
Getting Started
If you are new, the quickstart guide walks you through installing Claude Code and opening your first project. The overview page explains what the tool can do.
Once it is running, type a forward slash to see a list of commands. Start typing a name to filter the list.
Commands and their details can change between versions. Check the official commands page if something looks different on your screen.
Which Claude Code Commands Should You Learn First?
Start with the commands that match each stage of a coding session. The table groups all 14 by when you reach for them, so you can learn them in order.
| Stage | Command | What it does |
|---|---|---|
| Set up | /init, /memory | Create and edit your project instructions |
| Think | /plan, /model, /effort | Plan first, pick a model, set thinking depth |
| Watch space | /context, /compact, /clear | See, shrink or reset what Claude remembers |
| Explore | /resume, /branch | Return to a past chat or try a new direction |
| Check work | /diff, /code-review, /rewind | Review edits, catch bugs, undo mistakes |
| Fix setup | /doctor | Run a checkup on your installation |
Source: Digieh grouping based on the official Claude Code commands reference, checked December 1, 2026.
1. What Does /init Do?
Run /init when you start working in a new project. It helps create a project instructions file, often called CLAUDE.md, with key facts about your code.
That file can include build steps, testing commands and style rules. Claude reads it at the start of each session, so you do not repeat yourself.
Review the file after it is created. Remove anything wrong and add details only you know.
2. What Does /memory Do?
The /memory command lets you edit your project instruction files and memory settings. Use it when your preferences change.
For example, you might add a rule to always run tests before suggesting a commit. Short, clear rules work better than long essays.
Which command do you use most?
- /init
- /compact
- /rewind
- Not sure
3. What Does /plan Do?
/plan puts Claude Code into plan mode straight from the prompt. You can add a task too, for example /plan fix the login bug. Claude then researches and suggests steps before it changes any files.
This is useful for bigger tasks, such as adding a feature or refactoring code. You can review the plan and adjust it before any edits happen.
New models arrive often. See what changed in Claude Fable 5.2 and Mythos 5.2, including the new fast mode in Claude Code.
4. How Does /model Switch Models?
/model sets which model Claude Code uses. Different models balance speed, cost and depth of reasoning.
Use a faster model for quick edits and a more capable one for complex debugging. You can switch anytime during a session.
5. What Does /effort Change?
/effort sets the effort level for model usage. Higher effort means more careful thinking, while lower effort is faster.
Raise effort for tricky bugs or architecture questions. Lower it for simple formatting or small changes.
6. What Does /context Show?
Every model can only consider a certain amount of text at once. The /context command shows how much of that space your current session uses.
It displays a colored grid so you can see what is taking room. This helps you decide when to clean up.
7. How Does /compact Free Up Space?
/compact summarizes the conversation so far to free up context. The key points stay, while long details get condensed.
Use it during long sessions when Claude starts to lose track of earlier details. You can keep working without starting over.
8. When Should You Use /clear?
/clear starts a new session with an empty context. The previous session stays saved, so you can return to it later.
Use it when you switch to an unrelated task. A clean start often leads to more focused answers.
- Run /init in each new project
- Use /plan for bigger tasks
- Check /context in long sessions
- Run /compact when space fills
- Review with /diff before committing
- Use /rewind to undo bad edits
9. How Does /resume Work?
/resume lets you pick up a previous conversation. This is handy after closing your terminal or using /clear.
You can continue a task right where you left off. Saved context saves time explaining the project again.
10. What Does /branch Do?
/branch creates a branch of the current conversation at that point. Think of it as saving your place before trying a new idea.
If the new approach fails, your original path is still there. It encourages safe experimenting.
11. Why Use /diff Before Committing?
/diff helps you look at the code changes in your project. Reviewing changes before committing catches surprises early.
Always read what changed, even when you trust the assistant. Your review is the final safety check.
12. What Does /code-review Check?
The documentation lists /code-review as a bundled review skill, with /review as a shortcut name. It looks over your changes for bugs and issues.
Use it before opening a pull request. Treat its findings as suggestions and confirm each one yourself.
13. Can /rewind Undo Mistakes?
/rewind restores files Claude edited during the conversation. The current release also accepts the names checkpoint and undo.
If an edit goes wrong, you can roll back instead of fixing it by hand. This makes bold experiments less risky.
14. When Should You Run /doctor?
/doctor runs a setup checkup and can fix common problems, according to the documentation. The current release also accepts checkup as a name.
Run it when something feels broken, such as missing tools or permission errors. It is usually the fastest first step.
Which command frees up space by summarizing the conversation?
- /clear
- /compact
- /doctor
/compact summarizes the conversation so far, while /clear starts a fresh session.
Which Extra Commands Are Worth Knowing?
A few more commands are worth knowing. /usage shows session cost, plan usage and activity stats.
/permissions manages which tools Claude may use without asking. /export saves the current conversation to a file or clipboard.
/status shows your version, model, account and connection details. It is useful when you need help troubleshooting.
How Do You Write a Good Instructions File?
Your instructions file is one of the most powerful tools in Claude Code. A clear file saves time in every session.
Include how to install, build and test the project. Add naming rules, folder structure and any commands Claude should avoid.
Keep it short and current. Outdated instructions can confuse Claude more than having none at all.
How Do You Use Plan Mode Well?
Plan mode works best when you describe the goal clearly. Explain what should change, what should stay the same and how you will test it.
Read the plan carefully before approving it. Ask questions if a step seems risky or unclear.
Small, focused plans are easier to review than giant ones. Break big projects into several smaller tasks.
Free updates
Join the Digieh list
Be the first to know when our weekly brief launches.
No spam. Unsubscribe anytime. Read our Privacy Policy.
How Do You Manage Long Sessions?
Long sessions can slowly fill the context. Claude may then forget early details or repeat work.
Check /context every so often during big tasks. Compact before the space runs out, not after.
When a task is done, start fresh with /clear. Use /resume later if you need the old conversation again.
A Simple Daily Workflow
Start a session in your project and check that your instructions file is current. Use /plan for any task bigger than a quick fix.
Watch /context during long sessions and run /compact when it fills up. Use /clear when you switch to a new task.
Before committing, review changes with /diff and run /code-review. Use /rewind if anything goes wrong.
Which command restores files Claude edited?
- /model
- /memory
- /rewind
/rewind rolls back file edits Claude made during the conversation.
Choosing the Right Model and Effort
Picking a model and effort level is a balance. Faster settings save time and cost, while deeper settings handle harder problems.
A good habit is to start with a balanced setting. Switch up with /model or /effort only when Claude struggles.
Switch back down for routine work like renaming files or fixing typos. This keeps sessions quick and affordable.
How Do You Keep Track of Costs?
The /usage command shows session cost, plan usage and activity stats. It also accepts the shorter names cost and stats.
Check it regularly if you pay per use or have plan limits. Spotting heavy sessions early helps you adjust habits.
Compacting long conversations and choosing lighter models for simple tasks can reduce usage.
Saving and Sharing Conversations
Sometimes a session contains a useful explanation or decision. The /export command saves the conversation to a file or clipboard.
Share exports with teammates who need context. Remove any private details before sharing.
Safety Tips
Claude Code can edit files and run commands, so stay in control. Review permission requests before you approve them.
Keep secrets, such as passwords and keys, out of your instructions files. Use version control so you can always roll back.
Our guide on how to set up a password manager explains safe ways to store sensitive keys.
Commands for Teams
Teams can share one instructions file in their code repository. That keeps everyone’s sessions consistent.
Agree on rules for permissions, such as which commands Claude may run without asking. The /permissions command helps manage these rules.
Encourage teammates to run /code-review before opening pull requests. Human reviewers can then focus on bigger design questions.
What Should You Do When Something Goes Wrong?
Even good tools hit problems. Stay calm and work through a few simple steps.
First, run /doctor to check your setup. Then check /status to confirm your version, model and connection.
If an edit broke your code, use /rewind or your version control to roll back. Then try again with a clearer request.
Common Mistakes
Many beginners skip /init and repeat the same instructions every session. A good instructions file saves time.
Others let sessions grow huge without compacting. That can make answers less accurate.
Some accept every change without reading it. Always review, test and understand code before you ship it.
Who Should Use These Commands
Beginners benefit most from /init, /plan and /rewind. These commands add structure and a safety net while you learn.
Experienced developers often rely on /branch, /compact and /code-review. They speed up complex work without losing control.
Learning More
The best way to learn is to try one new command each day. Start with /init, /plan and /compact.
Our guide to artificial intelligence agents versus chatbots explains why coding assistants act more like agents.
For other helpful tools, see our list of free artificial intelligence tools that save hours weekly.
Frequently Asked Questions
How do I see all Claude Code commands?
Type a forward slash in Claude Code to open the command list. The official commands page also lists them.
What does /init do?
It helps create a project instructions file that Claude reads at the start of each session.
What is the difference between /compact and /clear?
/compact summarizes the current conversation to save space, while /clear starts a fresh session.
Can I undo changes Claude made?
Yes, /rewind restores files Claude edited during the conversation.
What should I do if Claude Code is not working right?
Run /doctor for a setup checkup, then check /status for version and connection details.
Conclusion
These 14 commands cover setup, planning, context management, review and recovery. Learning them makes Claude Code faster and safer to use.
Start with /init and /plan, keep sessions tidy with /compact and /clear, and review every change before you commit.
Commands can change between versions, so check the official documentation when in doubt.
Found this useful?
Editor’s Note
This article is accurate as of December 1, 2026. Commands were checked against Claude Code version 2.1.319 and the official documentation. Commands and names may change in future releases. On December 1 we checked every command against the official reference again and added a quick table.
Spot an error in this article? Please contact us at support@digieh.com or read our Corrections Policy.
Keep exploring
Your next read is waiting
1HealthWarts and Verrucas: Causes, Treatment and Prevention Tips7 min read
2MedicinesIs Sugar an Electrolyte? The Simple Science Answer7 min read
3Pets & AnimalsKennel Cough in Dogs: Signs, Treatment and Recovery7 min read
4SportsKnicks vs Spurs Christmas: Time, TV, Finals Rematch5 min read
5Parenting & FamilyMagnetic Toy Recalls 2026: Full List and Checker7 min read
6Food & LifestyleHow to Cook Pasta: Boil Times by Shape11 min read











