Direct answer
The phrase Claude Code commands refers to instructions that start Claude Code or control an active session. Shell commands such as `claude`, `claude -c`, and `claude -p` run in your terminal. Session commands such as `/plan`, `/context`, `/compact`, `/diff`, and `/permissions` run after Claude Code starts. Type `/` in an empty prompt to see the commands available in your version and configuration. Learn the commands around one safe workflow instead of memorizing an unstable master list.
Claude Code commands summary
- Start
- run `claude` in a project directory, or add an initial request after the command.
- Resume
- use `claude -c` for the latest conversation in the directory or `claude -r` to choose a named session.
- Inspect
- use `/status`, `/context`, and `/memory` to understand the session, loaded context, and project instructions.
- Control
- use `/plan` before broad work and `/permissions` to review allow, ask, and deny rules.
- Protect context
- use `/btw` for a side question, `/compact` to summarize, and `/clear` only when starting a new task.
- Review
- use `/diff` to inspect changes and `/review` or `/code-review` for a separate review pass.
- Recover
- use `/rewind` to return code, conversation, or both to an earlier checkpoint.
- Troubleshoot
- use `/doctor` for setup checks, `/debug` for runtime diagnosis, and `/help` for discovery.
Know which command surface you are using
Many references call every action a Claude Code command. That hides where the action runs and when it takes effect. Use these four groups to avoid pasting the right syntax into the wrong place.
- Shell commands run before or outside the interactive session. Examples include `claude`, `claude update`, and `claude mcp`.
- CLI flags configure launch or non-interactive behavior. Examples include `--model`, `--add-dir`, `--output-format`, and `--max-turns`.
- Session commands start with `/` inside Claude Code. They manage context, permissions, models, sessions, reviews, and product features.
- Keyboard shortcuts affect the interface directly. For example, Escape can interrupt work, while Shift+Tab cycles supported permission modes.
Use shell commands to start, resume, and automate
- `claude` starts an interactive session in the current directory.
- `claude "explain this project"` starts interactively with an initial request.
- `claude -c` continues the most recent conversation for the current directory.
- `claude -r "session-name" "finish the tests"` resumes a session by name or identifier with a request.
- `claude -p "explain this function"` runs a non-interactive query and exits.
- `claude update` updates supported native installations to a current version.
- `claude mcp` opens the CLI route for configuring Model Context Protocol servers.
Treat non-interactive use as automation, not a permission shortcut. Set a narrow working directory, explicit tools, predictable output, bounded turns, and a failure path. Avoid piping untrusted secrets or production data into a request without an approved data-handling rule.
Discover the commands in your installation
Type `/` on an empty prompt to list the commands available now. Add letters to filter the list. Use `/help` for general help and `/release-notes` to inspect product changes. This live inventory is safer than copying a fixed count from an article because commands can be added, renamed, gated, or removed.
A command must begin the message. Text after its name becomes arguments. The list can also include bundled skills, your own skills, plugin contributions, and prompts exposed by connected MCP servers. Availability may therefore differ between two people on the same Claude Code version.
Use the official commands page as the current full reference.
Follow a safe command workflow
The most useful commands form a control loop. Start with the repository boundary, inspect context and rules, plan the change, supervise the work, review evidence, and recover when needed.
1. Start and inspect
- Run `claude` from the smallest correct project directory.
- Use `/status` to inspect the session, model, working directory, and account details shown by your version.
- Use `/memory` to view or edit the `CLAUDE.md` files and memory sources in scope.
- Use `/context` to see what consumes the current context window.
- Run `/init` only when the repository needs a starter `CLAUDE.md`, then review the generated instructions.
2. Set the control boundary
- Use `/permissions` to inspect and change allow, ask, and deny rules.
- Enter `/plan` before a broad or risky change so Claude can investigate without editing.
- Use `/model` when the task needs a different model, and confirm whether the change applies now or becomes a default.
- Use `/effort` when supported to match reasoning depth to task risk and ambiguity.
- Use `/add-dir` only when the task genuinely needs another directory, then remove unnecessary access later.
3. Work without losing the thread
- Ask a focused request in plain language. Normal prompts are often better than a special command for implementation work.
- Use `/btw` for a quick side question that should not enter the main conversation history.
- Use `/context` before context pressure becomes a problem.
- Use `/compact` with optional focus instructions when you need to continue the same task with a shorter history.
- Reserve `/clear` for a separate task that needs empty conversation context. Project memory remains available.
4. Manage background or parallel work
- Use `/tasks` to inspect background work and completed subagents in the current session.
- Use `/background` when the whole session should continue without occupying the terminal.
- Use `/batch` for a large change that can be divided into independent worktree tasks.
- Use `/branch` to explore another direction without replacing the current conversation.
- Use `/resume` to return to an earlier conversation and `/rename` to give important sessions a useful label.
5. Review and verify
- Use `/diff` to inspect the files changed during the session.
- Use `/review` or `/code-review` for a focused correctness and cleanup pass.
- Use `/security-review` when the current diff needs a security-focused check.
- Use `/verify` when supported to run the application and observe behavior beyond static checks.
- Run the repository's own tests, type checks, lint, build, and manual scenarios. A command name is not evidence that the result is correct.
6. Recover or diagnose
- Use `/rewind` to choose an earlier checkpoint and restore code, conversation, or both.
- Use `/doctor` to diagnose installation and configuration problems.
- Use `/debug` to begin or inspect runtime troubleshooting with a focused description.
- Use `/feedback` when the evidence points to a product issue that should be reported.
- Confirm file state with version control and your normal backup process before any irreversible manual action.
Understand built-ins, skills, plugins, and MCP prompts
Not every slash entry is a built-in session control. Current Claude Code treats reusable custom workflows as skills. A skill can load automatically when relevant or be invoked with `/skill-name`. The legacy `.claude/commands/` path still works, but new reusable workflows should follow the current skills documentation.
- Built-in commands control Claude Code itself, such as `/compact`, `/model`, and `/permissions`.
- Bundled skills provide maintained workflows, such as review or verification features available in your installation.
- Custom skills package your team's instructions and supporting resources for a repeated task.
- Plugins can add skills, agents, hooks, MCP servers, and other capabilities.
- MCP servers can expose prompts with names shaped like `/mcp__server__prompt`.
Review the current skill model before creating a custom command.
Choose commands by problem
- The answer is off-track
- restate the goal first. When this is a new task, choose `/clear`.
- The session is crowded
- inspect `/context`, then use a focused `/compact` when appropriate.
- The change is risky
- switch to `/plan`, inspect `/permissions`, and reduce the scope.
- You need to see changed code
- use `/diff`, then run repository checks.
- You need independent scrutiny
- use `/review` and verify each finding against the code.
- You made a bad turn
- stop the action, inspect state, and use `/rewind` if the checkpoint matches your recovery goal.
- You repeat the same prompt
- create a reviewed skill only after the workflow is stable and reusable.
Build these controls into a project-based Claude Code course.
Learn how sessions and project memory carry context over time.
Avoid common command mistakes
- Do not paste session commands into the shell or launch flags into the active prompt.
- Avoid trusting a fixed command count. Check `/` and the current official reference.
- Keep `/clear` and `/compact` distinct. One starts fresh; the other summarizes and continues.
- Avoid changing permissions merely to bypass understanding why an action needs access.
- Check before assuming a plugin skill or MCP prompt exists for every teammate.
- Treat review output as a lead, not verification. Inspect evidence and run relevant checks.
Frequently asked questions
Type `/` on an empty prompt inside Claude Code. Add letters to filter. The result reflects built-ins plus commands contributed by the skills, plugins, and MCP servers available to you.
A slash command controls an active Claude Code session. A CLI flag configures how Claude Code starts or runs from the shell. For example, `/model` acts inside a session, while `claude --model ...` sets the launch choice.
Use `/compact` to summarize a long conversation and continue the same task. Choose `/clear` for a different task that needs empty conversation context. Project memory can still remain in scope.
Yes. Current documentation describes custom commands through skills, while the legacy commands directory still works. Use the current skill format for new reusable workflows unless your team has a reviewed compatibility reason.
The command may require a newer version, supported platform, eligible plan, active feature, plugin, skill, MCP connection, or administrator permission. Check your version, `/release-notes`, `/doctor`, and the command's current requirements.
Begin with `claude`, `/help`, `/plan`, `/permissions`, `/context`, `/compact`, `/diff`, `/rewind`, and `/clear`. Learn when to use each command inside one small repository before adding automation or extensions.
