Post your build ideas
LocalASO Track App Store keyword ranks in every countryFind your vibe. Find you job which is just for you and your dataDealtab Brand Deal Tracker That Does The Work For YouIs Major Cooked? Free AI risk score + roast for your college majorWiral.Social LinkedIn, Scheduler, Scheduling Tool, Ghostwriter
Solo Era solo activities, solo maxxing, sidequests, challengeCadentiq daily routine, wellbeing, self care, healthy habitsTexeva Your businessKeepsake Project Management, Freelancers, DesignersOrvyx AI You create

Claude Code commands: slash commands and custom commands

Claude Code commands are slash commands you type at the start of a message to control a session: /init creates a CLAUDE.md, /plan enters plan mode, /compact frees context, /clear starts fresh, /model switches models and /code-review checks a diff. Type / to see the list available to you. Custom commands are skills: a file at .claude/commands/deploy.md or .claude/skills/deploy/SKILL.md both create /deploy.

How do Claude Code slash commands work?

Per the official commands reference, commands control Claude Code from inside a session: switching models, managing permissions, clearing context, running a workflow. Type / to see the commands available to you, or type / plus a few letters to filter.

  • A command is only recognized at the start of your message. Text after the name becomes its arguments.
  • Sending one while Claude is responding queues it until the turn finishes. A few run immediately without interrupting, such as /status, /tasks and /usage.
  • Availability varies. Commands depend on your platform, plan and environment. For example, /desktop only shows on macOS and x64 Windows with a Claude subscription, and /upgrade does not show on Enterprise plans. Unavailable commands are left out of the menu.
  • Typos do not run anything. After a typo the menu highlights nothing, and Enter submits your text as typed, which reports an unknown command.
  • A few commands are hidden on purpose, such as /heapdump. Type the full name to run one.
  • Several skills can stack. At the terminal prompt, /skill-a /skill-b do XYZ loads both and passes the trailing text to each. Up to six can be chained.

The table of everything the tool ships with is long and changes between versions. Treat the lists below as a working set for October 2026, and run /help or type / to see what your installed version offers. New to the tool? Start with the Claude Code tutorial.

Which commands manage a session and its context?

Session and context commands
CommandWhat it doesAliases
/initInitialize the project with a CLAUDE.md guide. Set CLAUDE_CODE_NEW_INIT=1 for an interactive flow that also walks through skills, hooks and personal memory files.none listed
/memoryEdit CLAUDE.md files, switch auto memory on or off, and view auto memory entries.none listed
/contextShow current context usage as a colored grid, with optimization suggestions.none listed
/compact [instructions]Summarize the conversation to free space. Optional focus instructions steer the summary.none listed
/clear [name]Start a new conversation with empty context. A name labels the previous one in the /resume picker./reset, /new
/resume [session]Resume a conversation by ID or name, or open the session picker./continue
/rename [name]Rename the current session; without a name, one is generated.none listed
/rewindRoll the conversation and/or code back to an earlier point, or summarize from a selected message./checkpoint, /undo
/branch [name]Branch the conversation at this point to try a different direction; the original stays available via /resume.none listed
/btw [question]Ask a side question without adding it to the conversation.none listed
/export [filename]Export the conversation as plain text.none listed
/add-dir <path>Add a working directory for file access during this session.none listed
/cd <path>Move the session to a new working directory, keeping the conversation.none listed
/exitExit the CLI./quit

The two you will use most are /clear and /compact. The best practices page recommends /clear between unrelated tasks, since every request re-sends the whole conversation, and /compact with a focus, for example /compact keep the API changes and the test commands. Run /context first when you are unsure what is filling the window.

Which commands change the model, mode and settings?

Model, mode and settings commands
CommandWhat it doesAliases
/plan [description]Enter plan mode from the prompt. A description starts the task right away, for example /plan fix the auth bug.none listed
/model [model]Switch the model and save it as your default for new sessions. With no argument it opens a picker; press s on a row to switch for this session only.none listed
/effort [level]Set the effort level from low to xhigh, max, or auto; status prints it.none listed
/fast [on|off]Toggle fast mode.none listed
/permissionsManage allow, ask and deny rules in an interactive dialog; see the permissions guide./allowed-tools
/config [key=value]Open settings, or set a key directly such as /config theme=dark. /config --help lists accepted keys./settings
/sandboxToggle sandbox mode on supported platforms.none listed
/hooksView hook configurations.none listed
/mcpManage MCP connections and OAuth; accepts reconnect, enable and disable.none listed
/statuslineConfigure the status line.none listed
/theme, /output-style, /keybindingsChange the color theme, switch output style, open your shortcuts file.none listed

Cycling permission modes in the middle of a session is a keyboard shortcut, Shift+Tab, and /plan is the one command here that jumps straight to a mode. For the effort levels, the best practices page suggests /effort high when getting it right depends on easy-to-miss cases, and /effort low when you are iterating quickly and reviewing every result anyway.

Which commands review code and help you ship?

Review, test and ship commands
CommandWhat it does
/diffReview the changes in your working tree, including edits Claude has made.
/code-review [level] [--fix] [--comment] [pr#|branch|path]A bundled skill that reviews the current diff, a PR number, a branch or a path for correctness bugs. --fix applies findings; --comment posts them to the PR; ultra runs a deep cloud review. /review is an alias.
/security-reviewAnalyze the changes on your branch for security vulnerabilities such as injection and auth issues. Needs an origin remote.
/simplify [target]A bundled skill. Four review agents run in parallel and apply cleanups. It does not look for correctness bugs; use /code-review for that.
/verifyA bundled skill that builds your app, runs it and observes the result, rather than relying on tests or type checks. It runs only when you invoke it.
/runA bundled skill that launches and drives your app to see a change working.
/debug [description]A bundled skill that turns on debug logging for the session and troubleshoots from the log.
/install-github-appInstall the Claude GitHub App for a repository, with an optional GitHub Actions setup.

The docs flag which entries are skills and which are built into the CLI. A bundled skill works like a skill you write yourself: it is a prompt handed to Claude. That distinction matters in the next section, because it is also how your own commands work.

Which commands run work in parallel or in the background?

Parallel and background work
CommandWhat it does
/tasksView and manage background work in this session, including subagents that have finished. Alias: /bashes.
/subtask <task>Spawn a forked subagent that inherits the whole conversation and reports back; see subagents.
/fork [prompt]Copy the conversation into a new background session and keep working here.
/background [prompt]Detach the current session to run as a background agent and free your terminal. Alias: /bg.
/batch <instruction>A bundled skill. Researches the codebase, splits a large change into 5 to 30 independent units, shows a plan, then spawns one background subagent per unit in its own worktree.
/loop [interval] [prompt]A bundled skill that repeats a prompt while the session stays open, for example /loop 5m check if the deploy finished.
/schedule [description]Create, update, list or run cloud scheduled tasks.
/goal [condition|clear]Set a condition; Claude keeps working across turns until it is met.

Agent teams, the experimental multi-session feature, are not commands: you enable them with an environment variable and describe the team in plain English, as the agent teams guide explains. /list-agents (alias /peers) lists the subagents, teammates and sessions Claude can message.

Which commands help when something is wrong or costly?

Diagnostics, usage and account
CommandWhat it does
/doctorA setup checkup for installation, settings, extension and CLAUDE.md problems; fixes are applied after you confirm. /doctor prompt-audit audits your instructions. Alias: /checkup.
/usageShow session cost, plan usage limits and activity stats. /cost and /stats are aliases.
/statusOpen settings on the Status tab: version, model, account, connectivity.
/fewer-permission-promptsA bundled skill that scans transcripts for common read-only Bash and MCP calls and adds an allowlist to .claude/settings.json.
/insightsGenerate an HTML report analyzing your recent sessions on this machine.
/feedback, /bugSend product feedback or report a bug, after a consent screen.
/login, /logoutSign in to or out of your Anthropic account.
/help, /release-notesShow help and available commands; browse the changelog by version.

Which commands were removed or renamed?

Old tutorials mention commands that no longer behave as described. According to the commands reference as of October 2026:

  • /ultraplan is removed; use plan mode instead.
  • /pr-comments was removed in v2.1.91; ask Claude directly to view pull request comments.
  • /vim was removed in v2.1.92; toggle Vim editing from /config under Editor mode.
  • /agents no longer opens a wizard; it prints a reminder to ask Claude or edit .claude/agents/ directly (the wizard existed through v2.1.197).
  • /review is now an alias of /code-review.
  • /cost and /stats are aliases of /usage.
  • /extra-usage is now /usage-credits.

How do you create custom Claude Code commands?

Custom commands have been merged into skills. The skills documentation states that a file at .claude/commands/deploy.md and a skill at .claude/skills/deploy/SKILL.md both create /deploy and work the same way. Existing .claude/commands/ files keep working. Skills add optional extras: a folder for supporting files, frontmatter that controls whether you or Claude can invoke it, and automatic loading when relevant. For new work the docs prefer a skill; the skills guide covers that format in depth.

Where custom commands live
LocationCommand nameAvailable in
.claude/commands/deploy.md/deployThis project; commit it to share
.claude/commands/frontend/component.md/frontend:componentThis project; the folder becomes a prefix joined by :
.claude/skills/deploy/SKILL.md/deployThis project
~/.claude/skills/deploy/SKILL.md/deployAll your projects on this machine
A plugin's skills/ folder/plugin-name:skill-nameWherever the plugin is enabled

If two things share a name, a skill wins over a file in .claude/commands/. Whatever you type after the command name arrives through the $ARGUMENTS placeholder. Use $ARGUMENTS[0] or the shorthand $0 for individual arguments, with shell-style quoting for multi-word values. If you pass arguments and the file has no placeholder, Claude Code appends them as ARGUMENTS: <value> at the end.

.claude/commands/fix-issue.md
---
description: Fix a GitHub issue by number
argument-hint: [issue-number]
disable-model-invocation: true
---

Fix GitHub issue $ARGUMENTS following our coding standards.

1. Read the issue description
2. Understand the requirements
3. Implement the fix
4. Write tests
5. Create a commit

Run it as /fix-issue 123. The disable-model-invocation: true line stops Claude from starting the command on its own, which the docs recommend for workflows with side effects such as deploying or committing. description tells Claude when to use a command, and argument-hint shows expected arguments during autocomplete.

.claude/commands/new-feature.md (a plan-first command)
---
description: Plan a new feature before any code is written
argument-hint: [one sentence describing the feature]
disable-model-invocation: true
---

Feature request: $ARGUMENTS

Do not edit any files yet. Read the code you need, then give me:
1. The files you expect to change and why.
2. The steps in order, each small enough to review alone.
3. What is out of scope.
4. The exact commands that will prove each step worked.
Ask me questions if the request is ambiguous.
.claude/commands/review-diff.md (read-only review)
---
description: Review uncommitted changes and flag anything risky
allowed-tools: Bash(git diff *) Bash(git status *)
disable-model-invocation: true
---

Review my uncommitted changes. Run git status and git diff, then report:
- bugs or missing edge cases
- anything that touches secrets, auth or data deletion
- tests that should exist but do not
Skip style comments.

Claude Code watches skill folders during a session, but /reload-skills re-scans skill and command directories if something you added does not appear. A command or skill name containing characters such as a zero-width space or < fails to load.

Can MCP servers add commands?

Yes. MCP servers can expose prompts that appear as commands. Claude Code lists each one as /servername:promptname (MCP), and typing /mcp__servername__promptname also runs it, with space-separated arguments such as /mcp__github__pr_review 456. They are discovered dynamically from connected servers. The MCP guide shows how to add servers.

If you want practice choosing which command fits, take any small idea from the board, ask for a /plan, build it, then finish with /code-review and /clear. That loop covers most of the commands above, and the Claude Code best practices guide explains why each step earns its place.

Frequently asked questions

What are the most useful Claude Code commands?

For most people: /init to create a CLAUDE.md, /plan before large changes, /clear between unrelated tasks, /compact when a long session gets heavy, /model to switch models, /context to see what fills the window, /rewind to undo, and /code-review before you ship. Type / to see everything your version offers.

How do I create a custom slash command in Claude Code?

Save a Markdown file at .claude/commands/name.md, or a skill at .claude/skills/name/SKILL.md; both create /name. Use $ARGUMENTS in the body to receive what you type after the command. The docs say custom commands have been merged into skills and prefer the skill format for new work.

What is the difference between a command and a skill?

In current Claude Code they are the same mechanism. A command file and a skill folder both create a slash command. Skills add supporting files, frontmatter to control who can invoke them, and automatic loading by Claude when relevant. Some built-in entries, such as /batch and /code-review, are bundled skills.

How do I list all Claude Code commands?

Type / at the start of the prompt to open the command menu, and type letters to filter it. /help shows help and the available commands. Which ones appear depends on your platform, plan and environment, and the official commands reference lists everything the tool ships with.

What does /compact do compared with /clear?

/compact summarizes the conversation to free space and continues the same session, optionally with focus instructions. /clear starts a new conversation with empty context. Use /clear between unrelated tasks and /compact when one long task needs its history kept in a shorter form.

Can I share custom commands with my team?

Yes. Commit files in .claude/commands/ or skills in .claude/skills/ to your repository and everyone who works there gets them. Personal commands go in ~/.claude/skills/ for all your projects. Plugins and managed settings can distribute them wider, and plugin commands are namespaced as plugin-name:skill-name.

Created with AI assistance and edited for this site. Examples are illustrative and do not represent customer research. About the publisher.