---
title: "Slash commands in Claude Code - a complete guide to shortcuts and new features"
date: 2025-12-28
description: "A full overview of slash commands in Claude Code: built-in shortcuts, custom commands, Skills, Sub-agents, and delegating tasks to the cloud. A practical guide for daily AI work in the terminal."
tags: ["claude-code", "ai", "tools"]
---

> 🗓️ **As of December 2025.** Claude Code is evolving very fast - some commands and version numbers may have changed since then. Check the [official changelog](https://docs.claude.com/claude-code/changelog) if you can't find something.

## 🚀 Intro

### Why do I need these commands?

Working with Claude Code day to day, I quickly noticed that typing out full instructions every time is just exhausting. Fortunately, the Claude Code creators thought about us nerds and introduced a system of slash commands - shortcuts beginning with `/` that significantly speed up your work.

Imagine that instead of typing "check my code for security and quality issues," you simply type `/review`. Or instead of manually searching the docs, you use `/help`. Simple, right?

What's more, recent versions of Claude Code have brought really interesting additions - **Skills**, **Sub-agents**, and the ability to **delegate tasks to the cloud**. These features take interaction with AI to an entirely new level, but more on that in a moment.

## 📋 All built-in slash commands

Here's the full list of commands available to you the moment you start Claude Code:

### Session and context management

| Command | What it does |
|---------|---------|
| `/clear` | Clears conversation history - useful when you want to start over |
| `/compact [instructions]` | Compresses the conversation, optionally with instructions on what to focus on |
| `/context` | Shows a colored grid with current context usage |
| `/cost` | Displays token usage stats |
| `/exit` | Exits the REPL |
| `/resume [session]` | Resumes a conversation by ID or session name |
| `/rename <name>` | Renames the current session for easier identification |
| `/rewind` | Rewinds the conversation and/or code changes |
| `/export [filename]` | Exports the conversation to a file or clipboard |

### Configuration and settings

| Command | What it does |
|---------|---------|
| `/config` | Opens the settings interface |
| `/model` | Lets you pick or switch the AI model |
| `/permissions` | Shows or updates permissions |
| `/privacy-settings` | Privacy settings |
| `/output-style [style]` | Sets the output style |
| `/statusline` | Configures the status line |
| `/vim` | Turns on vim mode |

### Working with code and repos

| Command | What it does |
|---------|---------|
| `/add-dir` | Adds extra working directories |
| `/init` | Initializes a project with a `CLAUDE.md` guide |
| `/review` | Asks for a code review |
| `/security-review` | Runs a security review of changes on the current branch |
| `/pr-comments` | Shows pull-request comments |
| `/install-github-app` | Configures Claude GitHub Actions |

### Diagnostics and help

| Command | What it does |
|---------|---------|
| `/help` | Displays help |
| `/doctor` | Checks the "health" of your Claude Code installation |
| `/bug` | Reports bugs (sends the conversation to Anthropic) |
| `/release-notes` | Shows release notes |
| `/stats` | Visualizes daily usage, session history and preferences |
| `/usage` | Shows plan limits and rate-limit status |
| `/status` | Shows version, model, account and connection status |

### Advanced features

| Command | What it does |
|---------|---------|
| `/agents` | Manages custom AI subagents |
| `/bashes` | Shows and manages background jobs |
| `/hooks` | Manages hook configurations for events |
| `/ide` | Manages IDE integrations |
| `/mcp` | Manages MCP server connections and OAuth |
| `/memory` | Edits `CLAUDE.md` memory files |
| `/plugin` | Manages plugins |
| `/todos` | Shows current TODO items |
| `/sandbox` | Enables an isolated bash environment |
| `/terminal-setup` | Installs Shift+Enter for newlines (iTerm2/VSCode) |
| `/login` / `/logout` | Logs in/out of your Anthropic account |

## ✨ Creating your own slash commands

This is the part that really gets me going. You can create your own commands as Markdown files.

### Where do you put them?

- **Per project:** `.claude/commands/`
- **Personal (all projects):** `~/.claude/commands/`

### A simple command example

You create a file `.claude/commands/optimize.md`:

```markdown
Analyze this code for performance and suggest optimizations:
```

Now all you have to do is type `/optimize` and Claude takes care of the rest.

### Commands with arguments

You can also pass arguments:

```bash
> /fix-issue 123 high-priority
# $ARGUMENTS contains: "123 high-priority"
# $1 = "123", $2 = "high-priority"
```

### Advanced configuration with frontmatter

```markdown
---
allowed-tools: Bash(git add:*), Bash(git status:*)
argument-hint: [message]
description: Create a git commit
model: claude-3-5-haiku-20241022
---

Create a commit with message: $ARGUMENTS
```

## 🎯 What's new: Skills - Claude's abilities

This is where the real magic begins. **Skills** are markdown files that teach Claude how to perform specific tasks. The coolest thing is that they activate automatically when your request matches their description.

### How does it work?

1. **Discovery** - Claude only loads the name and description of a Skill at startup
2. **Activation** - When a request matches, Claude asks for confirmation
3. **Execution** - Claude runs the instructions from the file

### Creating your first Skill

Create the directory and file:

```bash
mkdir -p ~/.claude/skills/explaining-code
```

In the file `~/.claude/skills/explaining-code/SKILL.md`:

```markdown
---
name: explaining-code
description: Explains code using diagrams and analogies. Use when I ask "how does this work?"
---

# Explaining Code

When explaining code, always:

1. **Start with an analogy** - Compare the code to something from everyday life
2. **Draw a diagram** - Use ASCII art to show the flow
3. **Walk through the code** - Explain it step by step
4. **Flag the pitfalls** - Common mistakes and misunderstandings
```

### Skill locations

| Type | Path | Scope |
|-----|---------|--------|
| Personal | `~/.claude/skills/` | All projects |
| Project | `.claude/skills/` | Team in the repo |
| From a plugin | Built-in | After install |

### Skills vs other options

| Option | When to use it | Activation |
|-------|-----------|-----------|
| **Skills** | Specialized knowledge | Automatic |
| **Slash commands** | Reusable prompts | You type `/command` |
| **CLAUDE.md** | Project instructions | Always active |

### 💎 Ready-made Skills you can use

You don't have to build every Skill from scratch. The community has already put together plenty of ready solutions. I recommend the [Awesome Claude Skills](https://github.com/ComposioHQ/awesome-claude-skills) repository - you'll find a collection of vetted Skills you can install and use right away. From commit generation, through code review, to integrations with various services.

And if you want to build your own Skills but don't feel like manually writing YAML and Markdown files? There's a solution for that - **Skill Creator**. It's a skill that… helps you create other skills. 🔄 Yes, I know - sounds like inception, but it's a genuinely useful tool. Instead of remembering the file structure, required fields and best practices yourself, you simply describe to Claude what you need, and Skill Creator walks you through the whole process and generates a skill ready to use. Meta? Maybe. Useful? Definitely.

## 🤖 What's new: Sub-agents

This is another feature that changes the way you work with Claude Code. **Sub-agents** are specialized AI assistants that the main agent can delegate tasks to.

### Why is this brilliant?

- Each subagent has its **own context** - it doesn't clutter the main conversation
- It has **specialized instructions** for a specific domain
- It can be used **across different projects**
- It has **flexible permissions** - different access to tools

### Built-in subagents

Claude Code already ships with a few built-in subagents:

| Subagent | Model | Use case |
|----------|-------|--------------|
| **Explore** | Haiku (fast) | Codebase search (read-only) |
| **Plan** | Sonnet | Planning before execution |
| **General-purpose** | Sonnet | Complex, multi-step tasks |

### Creating your own subagent

Create the file `.claude/agents/code-reviewer.md`:

```markdown
---
name: code-reviewer
description: Code review expert. Use proactively after changes.
tools: Read, Grep, Glob, Bash
model: inherit
---

You are a senior code reviewer. For every review:

1. Run `git diff` to see the changes
2. Check code readability
3. Look for security issues
4. Check error handling

Group your feedback:
- Critical (must fix)
- Warnings (should fix)
- Suggestions (worth considering)
```

### Managing subagents

The easiest way is via the command:

```bash
/agents
```

It opens a menu for browsing, creating and editing subagents.

### Using subagents

Claude automatically delegates tasks based on the description, but you can also invoke them explicitly:

```bash
> Use the code-reviewer subagent to check my changes
> Ask the debugger to investigate this bug
```

## 🆕 What's new in recent versions?

From the Claude Code changelog, here are the most interesting recent additions:

### Background Agents (v2.0.60)

Agents can now run **in the background** and send messages to the main agent while you work on something else. A real game-changer for complex tasks.

### Named Sessions (v2.0.64)

You can now name sessions with the `/rename` command and return to them via `claude --resume <name>`. No more hunting for sessions by ID.

### Skills Frontmatter (v2.0.43)

Subagents can now automatically load Skills defined in their configuration:

```yaml
---
name: code-reviewer
skills: pr-review, security-check
---
```

### LSP Tool (v2.0.74) 🔍

The new **Language Server Protocol** tool is a real game-changer for code work. LSP is the standard that IDEs like VS Code use to provide "code intelligence." Now Claude Code has direct access to it.

What does this mean in practice? Claude can now:

- **Go-to-definition** - jump to the definition of a function, class or variable
- **Find references** - find every place something is used
- **Hover documentation** - show documentation without leaving the terminal

Example usage:

```bash
> Find every place the processPayment function is used
> Show me the UserService class definition
> What methods does the PaymentGateway interface have?
```

Claude uses LSP in the background to give you precise answers instead of guessing from the text. It's like having the IDE experience, but in the terminal.

### MCP Wildcards (v2.0.70) 🔐

**MCP (Model Context Protocol)** is an open standard for integrating Claude with external tools and data sources - databases, APIs, services like GitHub, Sentry, Jira and many others.

The new feature in 2.0.70 is **wildcards in permissions**. Previously you had to approve every tool from an MCP server individually. Now you can allow all tools from a given server in one move:

```bash
# Allow all tools from the github server
mcp__github__*

# Block all tools from a server
# (add to deny rules in /permissions)
mcp__dangerous-server__*
```

This is especially handy when you trust a given server and don't want to click "Allow" for every tool separately. Saves time and nerves.

## ☁️ Claude Code on the Web - delegating to the cloud

This is a feature that really fascinated me. **Claude Code on the Web** lets you run tasks asynchronously on Anthropic's secure cloud infrastructure. Sounds complicated? In practice it's brilliantly simple.

### How does it work?

1. You go to [claude.ai/code](https://claude.ai/code)
2. You connect your GitHub account
3. You pick a repository and describe the task
4. Claude clones the repo to a secure virtual machine
5. It works on the task (even when you close the browser!)
6. You get a notification when it's done
7. You review the changes and create a Pull Request

### When is this useful?

- **Parallel work** - you can dispatch fixes for several bugs at once
- **Repo not on your machine** - code you don't have cloned locally
- **Long-running tasks** - you don't have to keep a terminal open
- **Backend changes** - Claude writes tests, then code that satisfies them

### What's in the cloud environment?

The default image contains pretty much everything you need:

- **Languages**: Python, Node.js, Ruby, PHP, Java, Go, Rust, C++
- **Databases**: PostgreSQL 16, Redis 7.0
- **Tools**: popular build tools, package managers, testing frameworks

### Moving between web and terminal

What's nice is that you can **move a session from the cloud to a local terminal**. You click "Open in CLI," paste the command into your terminal and keep working locally with full context of what Claude did in the cloud.

> ⚠️ **Note**: The feature is currently in research preview and available to Pro, Max, Team and Enterprise users.

## 🔌 Commands from plugins and MCP

It's also worth knowing that commands can come from:

### Plugins

```bash
/plugin-name:command-name
```

### MCP servers

```bash
/mcp__github__list_prs
/mcp__github__pr_review 456
```

## 🎬 Summary

Slash commands in Claude Code are a powerful tool that lets you:

- ⚡ Speed up everyday work with simple shortcuts
- 🛠️ Create your own commands tailored to your workflow
- 🎯 Use Skills to automatically activate specialized knowledge
- 🤖 Delegate tasks to specialized Sub-agents
- ☁️ Dispatch work to the cloud and run things in parallel

I recommend starting with the built-in commands (`/help`) and then gradually building your own. The possibilities are genuinely impressive - and importantly, they keep growing.

That's all!
As always - enjoy it. 🚀