AI-101

Lesson 5

Slash Commands Overview

AI Confidence: 90%

AI-generated

Slash Commands Overview

Learning Objectives

Know where to find the complete list of slash commands

Categorize commands by their purpose

Use /help to discover available commands

Distinguish between built-in commands and bundled skills

Find and invoke the commands you need quickly

Introduction

Claude Code comes with over 50 slash commands. These commands let you control Claude Code itself rather than asking Claude to do something. Want to clear your conversation? Use /clear. Want to change models? Use /model. Want to check how many tokens you have used? Use /cost.

Knowing these commands exists is half the battle. You do not need to memorize them all. What matters is knowing how to find the right command when you need it and understanding the main categories so you know what is possible.

This lesson gives you a tour of the command landscape. We will organize commands by purpose, show you how to discover them, and highlight the ones you will use most often. Later lessons in this unit dive deeper into specific command categories.

Built-in Commands vs Bundled Skills

Before we look at specific commands, you should understand that there are two types of things you can invoke with a slash.

Built-in commands are core features of Claude Code. They execute immediately and do specific things like clear history, change settings, or show information. Commands like /clear, /help, and /cost are built-in.

Bundled skills come with Claude Code but work differently. Instead of executing fixed logic, skills give Claude a detailed playbook to follow. The skill /simplify does not just run a script. It tells Claude how to review your code for quality issues, and Claude does the work using its tools.

From your perspective as a user, both appear in the same list when you type /. Both are invoked the same way. The difference matters when you want to understand what happens behind the scenes.

How can you tell which is which? In general, commands that configure Claude Code or show information are built-in. Commands that involve Claude doing multi-step work are usually skills.

Commands by Category

Let us organize the most useful commands by what they do.

Session commands manage your conversation and sessions:

/clear - Wipes the conversation history and frees context. Aliases: /reset, /new

/resume - Opens a picker to continue a previous conversation. Alias: /continue

/rename - Names your current session for easy retrieval later

/branch - Creates a fork of the conversation at the current point

/export - Saves your conversation as plain text

Context commands help you manage Claude's working memory:

/compact - Compresses the conversation while keeping important information

/rewind - Goes back to an earlier point in the conversation or code state

/context - Shows a visualization of your current context usage

Configuration commands change how Claude Code works:

/config - Opens the settings interface. Alias: /settings

/model - Switches to a different AI model

/permissions - Manages what Claude is allowed to do

/theme - Changes the color scheme

/fast - Toggles fast mode for quicker responses

Information commands show you useful data:

/help - Lists available commands

/cost - Shows token usage for the session

/status - Displays version, model, account info

/diff - Shows uncommitted changes and per-turn diffs

/doctor - Diagnoses installation issues

Integration commands connect Claude Code to other systems:

/mcp - Manages MCP server connections

/plugin - Manages plugins

/install-github-app - Sets up GitHub Actions integration

/remote-control - Makes the session accessible from other devices

Bundled skills handle complex tasks:

/simplify - Reviews code for quality and applies fixes

/batch - Orchestrates large-scale changes across many files

/debug - Enables debug logging and helps troubleshoot

/loop - Runs a prompt repeatedly on an interval

/claude-api - Loads Claude API reference material

This is not the complete list, but it covers what most developers use regularly.

Finding Commands

You do not need to memorize all commands. Claude Code makes them easy to discover.

Type `/` to see all commands. This opens a searchable list. Use arrow keys to navigate and Enter to select. Start typing to filter the list.

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

Use `/help` for a quick reference. This shows available commands organized by category.

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

Ask Claude what commands exist. You can simply ask:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

Claude will list commands relevant to what you are trying to do.

Press Tab to autocomplete. If you remember part of a command name, type it and press Tab:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

Tab completes this to /permissions or shows matches if there are multiple.

The commands you use most will become automatic. For others, the discovery tools are always there.

The Most Important Commands

If you learn only a handful of commands, make it these:

`/clear` - Use this between unrelated tasks. It resets the conversation and frees context. If Claude seems confused or you are starting something new, /clear gives you a fresh start.

`/cost` - Check this occasionally to understand your token usage. It shows how much of your context window is used and how many tokens the session has consumed.

`/help` - When you forget what is available, /help reminds you. It also works when Claude is being slow to respond since you can run it while waiting.

`/compact` - When your conversation gets long, /compact summarizes it to free up space while keeping important information. You can add focus instructions like /compact focus on the API changes.

`/model` - If you want to switch between Claude models (like Sonnet for speed or Opus for complex reasoning), /model lets you change mid-session.

`/resume` - When you return to a project and want to continue where you left off, /resume shows your recent sessions and lets you pick one.

These six commands cover most of what you need for daily use.

Command Arguments

Some commands accept arguments that modify their behavior.

Required arguments are shown in angle brackets like <path>:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

You must provide a path when using this command.

Optional arguments are shown in square brackets like [name]:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

If you run /rename without a name, Claude Code auto-generates one from your conversation. If you provide a name, it uses that instead.

Flags modify behavior:

[@portabletext/react] Unknown block type "codeBlock", specify a component for it in the `components.types` prop

This runs /cost every 5 minutes. The 5m is an interval argument.

The command list in /help shows the syntax for each command. When in doubt, run the command without arguments and Claude Code will often prompt you for what it needs.

Key Takeaways

Claude Code has over 50 slash commands plus bundled skills

Commands are organized by purpose: session, context, configuration, information, integration

Type / to see all commands with searchable autocomplete

The most essential commands are /clear, /cost, /help, /compact, /model, and /resume

Commands can take required arguments, optional arguments, or flags

You do not need to memorize everything since discovery tools are always available

Try It Yourself

Explore the command system with these steps:

Start Claude Code in a project directory.

Type / and browse the command list without selecting anything. Notice how many there are.

Start typing /co and watch the list filter. Press Tab to autocomplete.

Run /help to see the categorized command list.

Run /cost to see your current token usage.

Run /status to see your session information.

Try /theme and browse the available themes.

Ask Claude "what commands should I know about?" and see what it recommends.

By the end of this exercise, you will know how to find any command you need.

Sources

https://code.claude.com/docs/en/commands - Complete reference for all built-in commands

https://code.claude.com/docs/en/skills - Bundled skills that ship with Claude Code

https://code.claude.com/docs/en/quickstart - Essential commands table