Claude Code Assistance Code Productivity Writing

Claude Code Commands: The Complete Guide to Slash Commands in 2026

Claude Code Commands: The Complete Guide to Slash Commands in 2026

The Ultimate Claude Code Commands Guide: Master Your AI-Powered Development Workflow

Introduction

Claude Code is no longer just a coding assistant that sits inside your terminal and answers questions. It has evolved into a powerful AI development environment with an extensive collection of commands for managing context, planning work, reviewing code, coordinating background agents, integrating tools, troubleshooting problems, and even moving work across devices.

The challenge is not simply knowing that these commands exist.

The real challenge is knowing which command to use, when to use it, and how different commands fit together into an efficient development workflow.

This guide organizes the day-to-day Claude Code commands by purpose, helping you move beyond memorizing slash commands and toward building a faster, more deliberate way of working.

Important: Claude Code includes roughly 100 built-in commands and bundled skills, but availability and behavior can vary by version, platform, plan, and environment. For the exact commands available in your installation, type / during a live session or run /help.


1. Session & Context Management

AI coding sessions can become long, complex, and cluttered. Claude Code provides several commands designed specifically to help you control the conversation itself.

/clear, /new, and /reset

Use these commands when you want to start fresh.

A fresh conversation clears the active context while preserving your project memory. This is useful when your current task is complete and you do not want old implementation details influencing the next task.

Best use case

You have just completed a major feature and are moving on to something completely unrelated.

Instead of dragging hundreds of previous messages into the next task, start clean.

/clear

You can also give the previous session a name so it is easier to find later.


/compact

Long conversations consume context.

The /compact command summarizes the conversation so far and frees space while preserving important information. You can also provide instructions about what should be prioritized in the summary.

/compact Focus on the authentication architecture and database decisions

Why this matters

Context management is becoming a serious engineering skill when working with AI agents.

The problem is not simply running out of tokens. Excessive context can make an agent slower, distract it with irrelevant details, and increase the chance that old assumptions influence new decisions.

Use /compact intentionally rather than waiting until your session becomes unmanageable.


/context

Want to understand where your context window is going?

/context

Claude Code can show a visual breakdown of what is consuming context and provide optimization suggestions.

For larger projects, this can help answer an important question:

Is your agent actually focused on the problem, or is your context full of old conversations and irrelevant files?


/rewind, /checkpoint, and /undo

Experimentation is powerful, but sometimes an experiment goes in the wrong direction.

These commands allow you to roll the code or conversation back to an earlier checkpoint.

/rewind

This is particularly valuable when you are exploring multiple approaches to a difficult problem.


/resume and /continue

Need to return to previous work?

/resume

You can reopen a previous conversation by session ID, name, or through an interactive picker.

This makes it easier to treat Claude Code sessions as persistent workspaces rather than disposable conversations.


/branch

Sometimes you want to explore an alternative without losing the original direction.

/branch experimental-auth-approach

This forks the conversation at the current point.

It is useful for questions like:

Instead of committing mentally to one path, branch the conversation and test the alternative.


2. Planning & Code Quality

Writing code quickly is not the same as writing good code.

Claude Code includes commands specifically designed to slow the agent down when necessary and make it think before changing your system.

/plan

The /plan command activates Plan Mode.

Instead of immediately modifying code, Claude proposes an approach first.

/plan Add multi-tenant support to the application

This is especially useful for large or risky changes.

A good workflow is:

  1. Define the objective.
  2. Ask Claude to investigate the codebase.
  3. Review the proposed plan.
  4. Challenge the assumptions.
  5. Approve the direction.
  6. Start implementation.

The important discipline here is simple:

Do not confuse fast implementation with good decision-making.


/diff

Use /diff to inspect uncommitted changes and per-turn modifications.

/diff

This gives you a chance to review what actually changed rather than trusting the agent's summary.


/code-review

Claude Code can review your current changes, a pull request, branch, or specific path.

/code-review

You can also use options for deeper reviews and automated fixes.

Examples:

/code-review ultra
/code-review --fix
/code-review --comment pr#123

The command can inspect code for:

For complex changes, review should not be an afterthought. It should be part of the development loop.


/security-review

When a change involves authentication, permissions, user data, APIs, secrets, or external integrations, a normal code review may not be enough.

/security-review

This command focuses specifically on security vulnerabilities in the current changes.


/simplify

AI-generated code can become overly elaborate.

The /simplify command focuses on cleanup, redundant abstractions, and unnecessary complexity.

/simplify

This command addresses a common AI development problem:

The code works, but it is more complicated than necessary.


3. Model & Effort Control

Not every problem deserves the same amount of reasoning.

Claude Code gives you control over the model and effort used for a task.

/model

Switch the active model with:

/model

You can also configure your preferred model for future sessions.


/effort

Control the reasoning depth:

/effort high

Available effort levels include:

The strategic lesson is important:

Use higher effort for decisions, not everything.

Reserve deeper reasoning for:

Use lighter effort for simple tasks.


/fast

Need quicker responses?

/fast on

Fast mode prioritizes speed, although it may be more expensive.


/advisor

The /advisor command allows another model to weigh in at important decision points.

/advisor

This is particularly useful when a task has competing approaches and you want an independent perspective.


4. Project Setup, Memory & Skills

The quality of an AI coding agent depends heavily on how well it understands your project.

/init

Start with:

/init

Claude Code can generate a starter CLAUDE.md file containing information about the project.

This helps establish project-level instructions and context.


/memory

Use:

/memory

to work with Claude Code's memory configuration.

This can include:

A well-maintained project memory can significantly reduce repetitive explanations.


/agents

Claude Code supports specialized subagents.

/agents

This points you toward creating and managing subagents in:

.claude/agents/

You can create specialized agents for areas such as:


/reload-skills

When skills or commands change during an active session, use:

/reload-skills

This rescans the relevant directories so your changes become available without restarting the entire workflow.


/plugin

Manage plugins with:

/plugin

You can list, install, enable, or disable available plugins.


/permissions

AI agents become dramatically more useful when they can safely access the tools they need.

Use:

/permissions

to manage:

The goal should not be to grant unlimited permissions blindly.

The goal should be to reduce unnecessary friction while maintaining sensible boundaries.


5. Git & Pull Request Workflow

Claude Code can participate directly in modern engineering workflows.

/install-github-app

This command helps set up the Claude GitHub App for a repository.

It can also support additional workflows involving Actions and secrets.


/autofix-pr

Imagine a pull request that continues receiving attention after you leave the terminal.

/autofix-pr

Claude can create a cloud session that watches the branch and responds to:

This moves AI from a passive assistant toward a more autonomous development workflow.


6. Background & Parallel Work

One of the most powerful shifts in AI-assisted development is moving from:

One prompt → One response

to:

Multiple tasks → Parallel execution → Coordinated results

/background

Run work in the background:

/background Investigate the database performance issue

The session can continue while the background work progresses.


/tasks

See active and completed background work:

/tasks

This gives you visibility into what agents are currently doing.


/subtask

Delegate a side task to a forked subagent:

/subtask Find every API endpoint affected by this schema change

The subagent investigates independently and reports the result back.

This is excellent for parallel research.


/loop

Run a prompt repeatedly while the session remains active.

/loop 10m Check whether the tests are passing

This can support repetitive workflows that would otherwise require manual intervention.


/goal

Set a completion condition:

/goal All failing tests are resolved

Claude continues working across turns until the condition is met.


/schedule

For recurring cloud routines:

/schedule

This can create, update, list, or run recurring routines.

This opens the door to workflows such as:


7. MCP & Integrations

Modern AI agents are only as useful as the systems they can interact with.

Claude Code includes commands for managing integrations.

/mcp

Use:

/mcp

to manage MCP server connections and authentication.

MCP allows Claude Code to connect with external tools and systems.


/chrome

Configure Claude in Chrome settings with:

/chrome

/design-sync

For teams with established design systems:

/design-sync

This can upload a repository's React design system so generated designs align more closely with your actual components.


/claude-api

Use:

/claude-api

to access API and SDK-related reference material and workflows such as migration and upgrades.


8. Diagnostics & Troubleshooting

When something is broken, guessing is expensive.

Claude Code includes several diagnostic tools.

/doctor

Run a complete environment check:

/doctor

This can help identify:

Think of it as a health check for your Claude Code environment.


/debug

Need to investigate a specific issue?

/debug My MCP server keeps disconnecting

This enables debugging support for the current session.


/insights

Use:

/insights

to generate an HTML report analyzing recent sessions.

The report can surface:

This is especially valuable because the way you use AI can itself be optimized.


9. Cost & Usage

AI-assisted development has a resource cost.

Use:

/usage

or:

/cost

to inspect:

If you hit a limit, try:

/rate-limit-options

The bigger lesson is that cost awareness should influence workflow design.

If you repeatedly use maximum reasoning for trivial tasks, that is not sophistication. It is waste.


10. Remote & Cross-Device Workflows

Development is no longer restricted to one machine.

Claude Code includes commands for moving work between environments.

/remote-control

/remote-control

This makes a session controllable from Claude's web or mobile interfaces.


/teleport

Use:

/teleport

to move a web session into your local terminal.


/desktop

Continue the session in the Claude Code Desktop application.


/mobile

Generate access to the mobile experience.


/list-agents

Use:

/list-agents

to see available subagents, teammates, and other sessions you can communicate with.


11. Quality-of-Life Commands

Not every useful command is about architecture or automation.

Some simply make daily work smoother.

/copy

Copy a previous assistant response:

/copy

You can also target an earlier response.


/btw

Ask a side question without adding it to the main conversation history:

/btw Why does this database index improve the query?

This is useful for quick clarifications that should not distract from the main task.


/config

Manage settings:

/config

This can include preferences for:


/focus

For a more minimal interface:

/focus

This reduces visual noise and emphasizes the essentials.


/keybindings

Manage keyboard shortcuts:

/keybindings

/powerup

Interactive lessons can help you learn Claude Code features directly.

/powerup

/release-notes

Browse version changes with:

/release-notes

This is worth checking regularly because AI development tools are changing rapidly.


The Most Important Commands to Learn First

If you are new to Claude Code, do not try to memorize everything.

Start with these:

CommandWhy It Matters/helpDiscover available commands/planThink before changing code/compactControl context/diffReview actual changes/code-reviewCatch implementation problems/security-reviewInspect security-sensitive changes/simplifyReduce unnecessary complexity/subtaskDelegate investigation/backgroundWork in parallel/doctorDiagnose your environment/usageUnderstand resource consumption

Master these first.

Then expand based on how you actually work.


A Better Claude Code Workflow

Here is a practical development loop:

Step 1: Understand

Start by asking Claude to investigate the codebase.

Step 2: Plan

/plan

Review the proposed approach before implementation.

Step 3: Challenge the plan

Ask:

Step 4: Implement

Allow Claude to execute the approved plan.

Step 5: Inspect

/diff

Review the actual changes.

Step 6: Simplify

/simplify

Remove unnecessary complexity.

Step 7: Review

/code-review

Look for correctness problems.

Step 8: Secure

/security-review

For sensitive changes.

Step 9: Delegate

Use /subtask or /background for independent investigations.

Step 10: Preserve context

Use /compact when the session becomes large.