Legal noticePrivacy
Gaëtan Wittebolle.
UmamiContactFR
FR
← Guides
Claude Code, the guide
Chapter 8 / 22
  • 07Specialized agents
  • 08Slash commands and keyboard shortcuts
  • 09Permissions

Part 3 · Advanced tools

Slash commands and keyboard shortcuts

Chapter 8 · 8 min reading

/commit isn't a built-in command, despite what plenty of tutorials suggest. Here are the ones that ship with Claude Code in October 2026, the ones that come from elsewhere, and how to write your own in 30 seconds.

What's a slash command?

A shortcut that triggers a specific behavior. You type /name, Claude runs it without you having to write a long prompt. Type / on its own in Claude Code to see the list of what's available on your setup.

There are four families, and a lot of tutorials mix them up:

FamilyWhere it comes fromExamples
Built-inPart of the Claude Code program itself/clear, /model, /usage, /rewind
Bundled skillsSkills (packaged prompts) that ship with Claude Code. They use up one Claude turn/code-review, /simplify, /loop, /doctor
PluginsInstalled from a marketplace with /plugin/commit (commit-commands plugin)
CustomA markdown file you wroteYour /front, your /deploy-check

For the user, they're all typed the same way. The difference matters when a command "disappears": a plugin command only exists if the plugin is installed, a custom command only if the file is there.

A special case since October 2026: a command added by a mod, a plugin that contains code. It runs that code right away, with no Claude turn, so it spends no tokens on the answer. Chapter 20 shows one, /conso.

Session and context

Context is everything Claude holds in working memory for the current conversation. These commands control it.

CommandWhat it doesWhen to use it
/clearStarts over with an empty conversation (aliases /new, /reset). Free, resets the /usage counter to zeroYou're switching topics (bug fix to new feature)
/compact [instructions]Summarizes the conversation to free up contextEnd of a work phase, or when Claude starts forgetting rules
/autocompactSets the auto-compaction threshold for the current model (auto or a size, for example 500k)You want to compact earlier than the default (around 967K tokens on a 1M model)
/contextShows what's filling your context, with suggestionsYou want to know where your tokens are going
/recapSummarizes the session in one line, without breaking the cacheYou're back from a break and lost the thread
/btw [question]Asks a side question without adding it to the conversationA quick question that isn't worth polluting the context
/renameNames the sessionBefore a /clear, so you can find it in /resume
/resumePicks up a previous session (alias /continue)You're resuming a task interrupted the day before
/rewind (or Esc Esc)Goes back to an earlier point, code and conversation, or summarizes from a chosen messageClaude is heading down the wrong path. The sooner you rewind, the better
/branch [name]Creates a branch of the conversation at this point and switches you to it. The original stays available in /resumeTrying another direction without losing the conversation as it stands
/fork [prompt]Copies the conversation into a background session, which creates its own worktree before changing any codeMoving a side track forward while you keep going here

Model, effort and consumption

CommandWhat it doesWhen to use it
/modelSwitches model (Opus 5.5 by default, Fable 5.1, Sonnet 5.5, Haiku 5.5) and saves it as the default for future sessionsAt the start of a session. Mid-session, it restarts without cache
/effortSets the effort: low, medium (default on 5.5 models), high, xhigh, max (for the session only) or autolow for mechanical work, high or xhigh for a nasty bug
/fastSame Opus model, up to 2.5 times faster, but more expensive (at API rates, $8/$40 per million tokens on Opus 5.5)Fast iterations when you're in a hurry and the budget allows
/usageEstimated session cost, plan limits and a cache line. On a paid plan, breakdown by skill, subagent, plugin and MCP serverAt the end of a session, or when your limit is getting close
/usage-creditsManages usage credits (the old "extra usage", formerly /extra-usage) that take over once you hit your plan limitYou've hit your limit and want to keep going

/cost and /stats still exist, they're aliases of /usage. /fast only works on Opus (5.5, 5 and 4.8).

Efforteffort level, niveau de réflexion

How much thinking the model allows itself before answering. The higher it is, the slower and more expensive, because that thinking is billed as output text. On Opus 5.5, Sonnet 5.5, Haiku 5.5 and Fable 5.1, changing effort mid-session keeps the cache: it's the first setting to touch if you want to spend less. Chapter 19 details what each setting costs.

Autonomy

CommandWhat it doesWhen to use it
/plan [description]Switches to plan mode: Claude explores and proposes a plan before acting. With a description, it starts on the task right awayNon-trivial task, 3 or more steps, architecture choices
/goal <condition>Claude keeps taking turns until the condition is met. /goal clear to stop"All tests pass", "the build is green"
/loop [interval] [prompt]Reruns a prompt as long as the session stays open. Without an interval, Claude picks its own pace. Expires after 7 daysWatching a deployment, polling a build, following a PR
/scheduleCreates a routine (alias /routines): an agent that runs in the cloud on a schedulePR review every morning at 9 a.m., even with your computer off
/workflowsOpens the workflow tracking view (dozens of subagents in the background): follow, pause, resume, saveFollowing a big job running in the background
Decision tree for letting Claude Code work without you: a verifiable objective in this session, /goal; watching or repeating while the session is open, /loop and Monitor; a recurring task even with your machine off, a routine with /schedule; a big parallelizable job, an ultracode workflow; a long task alongside your own work, a background session with claude --bg or /fork.
Which tool for which need. Only the routine runs with your computer off.

All of this is covered in detail in chapter 18.

Review and quality

CommandWhat it doesWhen to use it
/code-review [level]Reviews your diff (or a PR, a branch, a folder) and looks for bugs. Levels low to max. --fix applies the fixes, --comment posts on the PRBefore every important commit
/code-review ultraMulti-agent review in the cloud. 3 free reviews on Pro and Max, then $5 to $25 of usage credits per review depending on sizeBig PR before going to production
/simplifyCleans up the changed code (reuse, simplification, efficiency) and applies it. Doesn't look for bugsAfter a feature, before the review
/security-reviewSecurity audit of the diff between your branch and the default branch of the origin remoteAnything touching auth, payments, personal data
/fewer-permission-promptsAnalyzes your past sessions and suggests a list of commands to allowYou click "Yes" too often
/skill-doctorShows what each skill costs in context and how often it's used. The report opens in the Stats tab of /pluginYou've installed a lot of skills and want to clean up
/doctorChecks your install, settings, extensions and CLAUDE.md, with fixes Claude applies if you approveSomething stopped working after an update

/review still exists, it's an alias of /code-review. The review runs as a background subagent: you can keep working in the meantime.

Visuals and other surfaces

CommandWhat it doesWhen to use it
/artifactsLists your artifacts (private HTML pages published on claude.ai from Claude Code)Finding a report or dashboard you published
/design [brief]Opens Claude Design artboards from the terminalMocking up a screen before coding it
/slides [brief]Creates a Claude Slides deckPresenting a feature or a review
/desktopContinues the session in the Claude Desktop app (alias /app). macOS or Windows x64, subscriptionYou want a graphical interface to review a diff
/teleportBrings a session started in the cloud back into your terminal (alias /tp)Picking up locally a task started on the web
/mobileShows a QR code to install the Claude mobile app (aliases /ios, /android)Installing the app, then following the session with /remote-control
/chromeSets up Claude in Chrome, which drives your browserTesting a page, filling a form, reading the console

Artifacts, Design and Slides are covered in detail in chapter 15.

Configuration

Commands you rarely type, often just once per project.

CommandWhat it doesWhen to use it
/initScans the repo and generates a starter CLAUDE.mdFirst launch in a project with no Claude config
/configOpens the settings. /config key=value to change one directlyTurning on an option without editing JSON
/permissionsManages what Claude can do without asking, with an Auto mode tabSee chapter 9
/memoryOpens your CLAUDE.md files, turns auto memory on or off, opens the memory folderFixing or cleaning up what Claude has remembered
/mcpLists connected MCP servers, reconnects or disables themAn external tool stopped responding
/pluginInstalls and manages plugins and marketplacesAdding commands, skills, MCP servers
/plugin-authoringBuilt-in skill that has Claude write a mod (see chapter 20)You want your own panel, line under the prompt or guardrail
/reload-pluginsReloads plugins and mods in the current sessionYou just installed or updated a mod from the shell
/output-styleChanges the response style (for example /output-style concise)Adapting Claude to a context (pair programming vs docs)
/statuslineConfigures the status line (model, context, cost, cache)Keeping your gauge in view at all times

MCP (Model Context Protocol) is the standard that plugs external tools into Claude: Supabase, Notion, Figma. See chapter 17.

Keyboard shortcuts

ShortcutWhat it does
Shift+TabCycles through permission modes: manual, accept edits, plan, then auto when available (see chapter 9)
EscInterrupts Claude mid-action. It keeps the work already done
Esc EscEmpty prompt: opens /rewind to go back to an earlier point. Filled prompt: clears the draft (the up arrow brings it back)

Commands people think are built in

You'll see commands like these in tutorials (and in older versions of this guide). They don't ship with Claude Code: they're plugins or custom commands someone wrote.

CommandWhere it comes from
/commitOfficial commit-commands plugin (see chapter 16)
/prCustom command or plugin. Without it, ask "open a PR with gh"
/debugCustom command or plugin
/componentCustom command: generates a typed React component
/form-builderCustom command: Zod + react-hook-form + shadcn/ui form
/test-genCustom command: unit tests for existing code
/migration-sqlCustom command: Supabase migration with table, RLS and indexes

They're good examples of what you can build for yourself. If you miss one, create it (next section) or look for a plugin.

A few commands disappeared in 2026. /vim and /tag were removed on April 4 (v2.1.92), /pr-comments just before (v2.1.91). Since July 1 (v2.1.198), /agents no longer opens a wizard and only shows a reminder: you create a subagent by asking Claude, see chapter 7.

Create your own command in 30 seconds

Since January 9, 2026 (v2.1.3), commands and skills are one and the same. Two locations give the same result, /my-workflow:

  • .claude/commands/my-workflow.md: a single file. The simplest.
  • .claude/skills/my-workflow/SKILL.md: a folder, for when you want to attach files (examples, scripts, references). The docs recommend this format for all new work.

In the project's .claude/ folder, the command only exists for that project. In ~/.claude/, it's available everywhere.

---
description: What the command does and when to use it
---

The full prompt Claude should run.
You can reference files, conventions, steps.

The command name comes from the file name (or the skill's folder name). A SKILL.md also accepts a name field, a file in commands/ doesn't.

Take care with the description: it's what tells Claude when to suggest the command to you. Without it, Claude takes the first line of the file, which rarely says much. If the command doesn't show up right away, run /reload-skills.

Key takeaways, the top 5 to get started:

  1. /code-review before every commit, to catch bugs before production
  2. /rewind (Esc Esc) when Claude goes off the rails, more effective than fixing by hand
  3. /clear as soon as you switch topics, it's free
  4. /usage at the end of a session to see what you've used
  5. /plan (or Shift+Tab) before a non-trivial task

The rest comes once you're comfortable with the workflow.

Sources

  • Commands reference, Claude Code documentation
  • Official Claude Code changelog
  • Manage costs, Claude Code documentation
  • Scheduled tasks and /loop
  • /goal, Claude Code documentation
← Chapter 7

Specialized agents

Chapter 9 →

Permissions