Claude Code slash commands: reference and custom commands

Slash commands are how you steer a Claude Code session without writing a paragraph. A handful of built-ins carry almost all the value. The custom-command system is still underused, and in 2026 it quietly merged into skills, which changes how you should write new ones.

By the Continuum team. We build a workbench that runs Claude Code, Codex, and their peers, so the model rates quoted here are the ones our own cost analytics ship with.

The short version

Type / at the start of the input to see the live list for your build. The commands that matter day to day are /clear, /compact, /rewind, /context, /model, /effort, /usage, /init, /resume, and /plan. Custom commands are markdown files: .claude/commands/deploy.md and .claude/skills/deploy/SKILL.md both create /deploy. Arguments use $ARGUMENTS, 0-based $0 and $1, or named placeholders declared in frontmatter.

What you need to know
  • Type / at the start of the input to list every command your build actually has. Text after the name becomes arguments.
  • The context trio (/clear, /compact, /rewind) does more for cost and quality than anything else.
  • Custom commands merged into skills. .claude/commands/deploy.md and .claude/skills/deploy/SKILL.md both create /deploy; skills add supporting files and invocation control.
  • Positional placeholders are 0-based: $0 is the first argument, $1 the second.
  • !`command` runs a shell command before Claude sees the prompt and substitutes the output. This is preprocessing, not tool use.
  • Many of the commands in the / menu are bundled skills the model can also invoke on its own.

How the menu works

Type / as the first character of a message and Claude Code lists every command available in your build, filtering as you type. That list is the only authoritative reference, because availability depends on your platform, plan, and environment. Four rules govern the whole system.

  • A command is recognised only at the start of a message. Everything after the command name becomes its arguments.
  • You can stack several at the start of one message: /write-tests /fix-issue 123 loads both and passes 123 to each.
  • A command sent while Claude is responding queues behind the current turn. /status, /tasks, and /usage are exceptions and run immediately.
  • Not every command appears for every user. If something in this guide is missing from your menu, that is expected, not broken.

Session and context

These are the ones you will use every day. Context management is the single highest-leverage habit in Claude Code, because cost, rate-limit consumption, and answer quality all degrade as context fills.

CommandWhat it doesWhen to reach for it
/clear [name]Starts a new conversation with empty context; the name labels the old one in the /resume pickerStarting an unrelated task in the same repo
/compact [instructions]Summarises the conversation so far; optional focus instructionsSame task, but context is getting heavy
/rewind [N]Rolls back code and conversation to a checkpoint, or a specific turnThe agent went down a wrong path
/context [all]Visualises context usage as a colored grid with optimization suggestionsWorking out why turns got expensive
/autocompact [auto|<tokens>]Sets how full the window gets before auto-compaction firesYou want a bigger or smaller working window
/resume [id|pattern]Reopens a previous conversation, or opens a pickerComing back to yesterday's work
/branch [name]Branches the conversation at this pointTrying a different direction without losing this one
/fork [prompt]Copies the conversation into a new background sessionTwo directions at once, independently
/btw [question]Asks a side question without adding it to the conversationA quick aside you do not want in context forever
/export [filename]Exports the conversation as plain textSharing what the agent did, or filing a bug

Model, effort, cost, and configuration

CommandWhat it does
/model [model]Switches model and saves it as the default for new sessions
/effort [level|auto]Sets reasoning effort: low, medium, high, xhigh, max, or ultracode
/usage (alias /cost)Token usage and cost for the session, plus plan usage bars and an attribution breakdown
/usage-creditsBuys usage beyond your plan limit, or requests it from your admin
/statusTask status, model, effort level, session info. Runs without interrupting the response
/config [key=value]Opens settings: theme, model, output style, auto-update channel
/fast [on|off]Toggles fast mode, which trades price for latency on supported models
/doctorBundled skill. Runs a setup checkup and can fix what it finds
/login, /logoutAccount switching
/upgradeInstalls a newer Claude Code on your release channel

Switching model mid-session is more useful than it sounds. Plan an approach on a large model, then drop to a smaller one for the mechanical implementation, all inside the same conversation. /effort is the finer dial: low for subagents and simple edits, high or xhigh for anything you would be annoyed to get wrong.

Project setup and repo knowledge

CommandWhat it does
/initAnalyses the repo and writes a CLAUDE.md
/memoryEdits CLAUDE.md memory files and manages auto-memory entries
/add-dir <path>Gives the session access to another directory
/cd <path>Moves the session to a new working directory, preserving the prompt cache
/permissionsReviews and changes what the agent may do without asking
/hooksViews hook configuration for tool events
/skillsViews, creates, enables, disables, or deletes skills
/agentsPoints you at .claude/agents/ for subagent management
/mcpManages MCP server connections and OAuth
/worktree [list|create|remove|checkout]Manages git worktrees for parallel branches
/import [codex|gemini]Brings instruction files, MCP servers, commands, subagents, and skills over from another agent
/planSwitches into plan mode: Claude outlines the approach and waits for approval

The bundled skills hiding in the menu

A significant share of the / menu is not built-in commands at all. They are bundled skills: prompts Claude can also invoke on its own when relevant. They look identical when you type them and behave differently when you do not.

A selection of bundled skills, August 2026. Your build decides which appear.

CommandWhat it does
/code-review (alias /review)Reviews the current diff, a PR number, branch, or path. --fix applies findings, --comment posts inline PR comments
/security-review [--fix]Reviews code for security vulnerabilities
/simplify [--fix]Suggests code simplifications and can apply them
/debug [description]Enables debug logging and troubleshoots from the session log
/verifyRuns the code and checks it works before you ship
/sandboxRuns code in an isolated environment
/todosExtracts TODOs from code into a task list
/batch <instruction>Orchestrates large-scale changes across a codebase in parallel
/deep-research <question>A workflow: fans out web searches, cross-checks sources, synthesises a cited report
/fewer-permission-promptsScans transcripts and writes a prioritized allowlist into project settings

Writing your own

/rev/reviewReview the current diff like a senior engineer/rewindRestore earlier conversation state/resumeReopen a previous session.claude/commands/review.md---description: Review the current diff---Review the staged andunstaged changes...A markdown file in the repo becomes a command everyone on the team has.
A command is a file. Drop markdown in .claude/commands/ or a directory in .claude/skills/, commit it, and the whole team gets the same workflow.

This is where the real leverage is, and the mechanics changed in 2026: custom commands merged into skills. Both shapes still work and both produce a command you invoke the same way.

Where the file livesCommand nameWhat you get
.claude/commands/deploy.md/deployThe classic form. Still supported, same frontmatter
.claude/skills/deploy/SKILL.md/deployPlus a directory for supporting files, invocation control, and automatic loading
~/.claude/skills/deploy/SKILL.md/deployPersonal, available in every repo

A command that only you can fire

.claude/skills/review/SKILL.md
---
name: review
description: Review the current diff like a senior engineer
disable-model-invocation: true
argument-hint: "[path]"
---

Review the staged and unstaged changes in this repository.

Focus on, in order:
1. Correctness. Does it do what the commit message claims?
2. Failure modes. What happens on empty input, network failure, concurrency?
3. Tests. Is the new behaviour actually covered?
4. Consistency with the patterns already in this codebase.

Do not comment on formatting; the linter handles that.
Report findings most severe first. If you find nothing real, say so
rather than inventing something to justify the review.

disable-model-invocation: true is the important line. It means only you can trigger this, which is what you want for anything with side effects: /deploy, /commit, /send-slack-message. You do not want Claude deciding to deploy because the code looks ready.

Arguments

Four substitution forms, and the indexed one is 0-based, which trips up anyone who learned the old $1-is-first convention.

PlaceholderExpands to
$ARGUMENTSEverything the user typed after the command name
$ARGUMENTS[N]The Nth argument, 0-based
$0, $1Shorthand for the above. $0 is the first argument
$nameA named argument declared in the arguments frontmatter list
.claude/skills/fix-issue/SKILL.md
---
name: fix-issue
description: Fix a GitHub issue end to end
disable-model-invocation: true
arguments: [issue]
allowed-tools: Bash(gh *)
---

Fix GitHub issue #$issue.

1. Run `gh issue view $issue` to read it.
2. Find the relevant code. Do not guess at file locations.
3. Write a failing test that reproduces the issue first.
4. Fix it. Keep the change minimal.
5. Run the full suite.
6. Commit as `fix: <summary> (#$issue)`.
> /fix-issue 482

Indexed placeholders use shell-style quoting, so /my-skill "hello world" second makes $0 expand to hello world. An indexed placeholder with no matching argument stays in the text unchanged; a named one expands to an empty string. To write a literal $1.00 in prose, escape it as \$1.00.

Dynamic context: run a command before Claude sees anything

This is the feature that turns a prompt template into a real tool. The !`command` syntax runs a shell command and substitutes its output into the prompt before the prompt is sent. Claude never sees the command, only the data.

.claude/skills/pr-summary/SKILL.md
---
name: pr-summary
description: Summarize changes in a pull request
context: fork
agent: Explore
allowed-tools: Bash(gh *)
---

## Pull request context
- PR diff: !`gh pr diff`
- PR comments: !`gh pr view --comments`
- Changed files: !`gh pr diff --name-only`

## Your task
Summarize this pull request for a reviewer who has not read the code...
  • The inline form is recognised only when ! starts a line or follows whitespace. KEY=!`cmd` is left as literal text and does not run.
  • Substitution runs once over the original file. Command output is inserted as plain text and never rescanned, so a command cannot emit a placeholder for a later pass.
  • For multi-line commands, open a fenced block with ```! instead of using the inline form.
  • context: fork runs the skill in its own subagent, so a huge diff never lands in your main conversation. It runs in the background by default; set background: false to wait for the result.

The frontmatter worth knowing

The fields you will actually use. All are optional; only description is recommended.

FieldWhat it does
descriptionWhat the skill does and when to use it. Claude reads this to decide whether to load it
argument-hintAutocomplete hint, for example [issue-number]
argumentsNamed positional arguments for $name substitution
disable-model-invocationtrue means only you can invoke it
user-invocablefalse hides it from the / menu; background knowledge only
allowed-toolsTools that skip the permission prompt for the invoking turn only
disallowed-toolsTools removed from the pool while the skill is active
model, effortOverride the model or effort level while this skill is active
context: fork, agent, backgroundRun it in a subagent, optionally a named one, optionally blocking
pathsGlob patterns limiting when Claude auto-loads it

Commands worth writing for your repo

  • Release checklist. The eight steps your team always forgets one of. Mark it disable-model-invocation: true.
  • New module scaffold. Encodes your directory conventions so the agent stops inventing its own.
  • Debug this failure. Points at your actual log locations and test commands, with !`tail -n 200 var/log/app.log` pulling the log in for free.
  • Update the docs. Names the files that must change together when an API changes.

Commands, skills, and hooks

Three overlapping extension points. Now that commands and skills are one file format, the question is not "which file do I write" but "who is allowed to fire it".

Triggered byGood for
Slash command / skill with disable-model-invocationYou typing /nameA workflow you invoke deliberately, especially with side effects
Skill, default settingsYou, or the model deciding it is relevantCapabilities the agent should reach for on its own
HookAn event in the sessionEnforcing something every time, without relying on the model

Questions people ask

Type / at the start of the input in a session. It lists every command available in your build, including bundled skills, custom commands, and plugin commands, and filters as you type. Availability varies by platform, plan, and environment, so that menu is the only authoritative list.

/compact summarises the conversation so far and continues with a shorter context, keeping continuity, and it costs a pass over the whole conversation. /clear discards it entirely and costs nothing. Use compact mid-task, clear between unrelated tasks.

Create a markdown file. Either .claude/commands/deploy.md or .claude/skills/deploy/SKILL.md creates /deploy. Use YAML frontmatter for the description and argument handling. The skill form is recommended for anything new because it also gets a directory for supporting files.

Effectively yes. Custom commands merged into skills: existing .claude/commands/ files keep working and support the same frontmatter, and if a skill and a command share a name the skill takes precedence. Skills add supporting files, invocation control, and automatic loading.

$ARGUMENTS expands to everything typed after the command name. $ARGUMENTS[N] and its shorthand $N are 0-based, so $0 is the first argument. Declare an arguments list in frontmatter to use readable $name placeholders instead.

Yes. Commit .claude/commands/ or .claude/skills/ with the repository and everyone gets them. Personal ones live under ~/.claude/ and follow you across projects. Review a repo's skills before trusting the workspace, since allowed-tools can pre-approve tools.

It rolls back code and conversation to a checkpoint. With no argument it opens the rewind menu; pass a turn number to return to that turn. Double-tapping Escape reaches the same place. It is the real undo for an agent that went too far.

No. You invoke a slash command; a hook fires automatically on a session event. If a behaviour must happen every single time, use a hook, because it is deterministic and a model-invoked skill is not.

Sources

Every figure above was read from these pages on August 2026. Vendors reprice without notice; if you find a stale number, tell us.

  1. Claude Code commands reference the built-in command list and queueing rules
  2. Claude Code: extend Claude with skills the commands-merged-into-skills format, frontmatter, arguments, dynamic context
  3. Claude Code: hooks the deterministic alternative
Try it

Your commands,
on every screen.

Continuum surfaces the same skills and custom commands in its composer on Mac, web, and iPhone, so a workflow you wrote for the terminal works when you are driving a session from the sofa.

free app · your subscriptions · local-first