CC-101 · Module 5
Complete Slash Command Reference
12 min read
Claude Code has over 60 slash commands organized across session management, configuration, tools, analytics, and account management. Type / at the prompt to see the full filterable list. This lesson is the comprehensive reference.
Slash commands fall into three categories: built-in commands (ship with Claude Code), bundled skills (official workflow templates), and custom project skills (your .claude/commands/ directory). All are invoked with / at the prompt.
Session & Navigation
These commands manage your conversation lifecycle — starting fresh, resuming old work, branching explorations, and recovering from mistakes.
/clear (aliases: /reset, /new) — Wipes the current context window completely. Use this between unrelated tasks so old context doesn't pollute new work. This is the single most important hygiene command.
/resume (alias: /continue) — Reopens a previous session by ID or name, or shows a session picker. If you accidentally close a terminal, this is your safety net. Full context is restored.
/branch (alias: /fork) — Creates a conversation branch at the current point. Useful when you want to explore two different approaches without losing your current state. Think of it like git branch for conversations.
/rewind (alias: /checkpoint) — Rolls back code and conversation to a previous point. When Claude goes down the wrong path, rewind instead of trying to undo manually.
/rename — Names the current session so you can find it later with /resume. Unnamed sessions are listed by timestamp, which is harder to scan.
/compact — Manually compresses the conversation to free context space. Accepts optional focus instructions (e.g., /compact focus on the auth refactor). Auto-compaction handles this automatically in most cases — manual compact is for when you want to direct what gets preserved.
/exit (alias: /quit) — Exits Claude Code. Your session is saved and can be resumed later.
Configuration & Settings
These commands control how Claude Code looks, behaves, and which model it uses.
/config (alias: /settings) — Opens the settings interface for theme, model, output style, and preferences. This is the main control panel.
/theme — Changes the color theme. Options include light, dark, colorblind-accessible, and ANSI variants for different terminal setups.
/model — Switches the AI model mid-session. Use Opus for complex reasoning and architecture decisions. Use Sonnet for routine edits and simpler tasks. Use Haiku when you need speed over depth. You can switch freely during a session based on task complexity.
/effort — Sets the reasoning effort level: low, medium, high, max, or auto. Lower effort = faster responses and fewer tokens. Higher effort = deeper reasoning. auto lets Claude decide based on the prompt.
/fast — Toggles fast mode. Uses the same model but optimizes for faster output. Good for routine tasks where you don't need maximum reasoning depth.
/color — Sets the prompt bar color. Options: red, blue, green, yellow, purple, orange, pink, cyan. Useful for visually distinguishing between projects when running multiple Claude Code sessions.
/vim — Toggles between Vim and Normal editing modes. For developers who live in Vim keybindings.
/voice — Toggles push-to-talk voice dictation. Hold the spacebar to record, release to stop, press Enter to submit. The recording stays active through pauses as long as you hold the key. Requires a Claude.ai account.
/terminal-setup — Configures terminal keybindings for Shift+Enter (newlines in prompts) and other shortcuts. Run this once per terminal app.
/permissions (alias: /allowed-tools) — Views and updates which tools Claude Code can use without asking. Three modes: default (asks for risky operations), relaxed (fewer prompts), and strict (asks for everything).
/sandbox — Toggles sandbox mode, which isolates Claude Code's file system and network access. Available on supported platforms.
Tools & Integrations
These commands connect Claude Code to external tools, browsers, and services.
/chrome — Configures Chrome browser integration. Once enabled, Claude Code can open tabs, navigate pages, click elements, read console output, fill forms, and record sessions as GIFs. The browser shares your existing login state, so Claude can interact with any authenticated web app you can access.
/mcp — Manages Model Context Protocol server connections. MCPs extend Claude Code's capabilities — connecting to databases, APIs, custom tools, and more. Be selective: each MCP adds to your context window.
/plugin and /reload-plugins — Manages Claude Code plugins (bundled combinations of skills, MCPs, and scripts). Reload after making changes to plugin configurations.
/skills — Lists all available skills, including built-in, bundled, and custom project skills from .claude/commands/.
/agents — Manages sub-agent configurations for parallel coding workflows. Sub-agents can work on independent tasks simultaneously in isolated worktrees.
/hooks — Views hook configurations. Hooks are shell commands that execute automatically in response to events like tool calls, session start, or prompt submission. Configured in settings.json.
/ide — Shows IDE integration status and manages connections to VS Code, Cursor, or other supported editors.
GitHub & Remote
These commands connect Claude Code to GitHub, remote sessions, and cloud services.
/install-github-app — Sets up the Claude GitHub Actions app for your repository. Enables Claude to respond to PR comments, review code, and run automated workflows triggered by GitHub events.
/install-slack-app — Installs the Claude Slack app for team-based Claude interactions.
/pr-comments — Fetches and displays comments from a GitHub pull request directly in your terminal. Useful for reviewing PR feedback without switching to the browser.
/remote-control (alias: /rc) — Makes your current terminal session available for remote control from claude.ai. You can start a session locally and continue it from a web browser, or let a collaborator observe.
/schedule — Creates, updates, lists, or runs scheduled remote agents (triggers) that execute on a cron schedule. For recurring automated tasks like daily code reviews, weekly reports, or periodic health checks.
Analytics & Information
These commands help you understand what Claude Code is doing, how much it's costing, and how your session is performing.
/cost — Shows token usage statistics for the current session. Breaks down input tokens, output tokens, and estimated cost. Essential for budget-conscious usage.
/context — Visualizes your current context window as a colored grid. Shows what's consuming space: conversation history, files, MCP tool definitions, system prompts. Includes optimization suggestions. Run this when Claude seems to be degrading mid-session — context bloat is usually the cause.
/diff — Opens an interactive diff viewer showing uncommitted changes. Shows both the cumulative diff and per-turn diffs so you can see exactly what Claude changed at each step. Useful for code review before committing.
/export — Exports the conversation as a plain text file. Useful for documentation, sharing with teammates, or feeding into other tools.
/insights — Generates an analytical report on your Claude Code usage patterns: session frequency, interaction patterns, friction points, and optimization suggestions. Good for periodic self-assessment.
/stats — Visualizes daily usage, session history, streaks, and model preferences. The gamification view — see your usage patterns over time.
/tasks — Lists and manages background tasks. When Claude spawns sub-agents or runs long operations, they appear here.
/status — Shows version, current model, account info, and connectivity. Works even while Claude is generating a response. Your quick system check.
/doctor — Diagnoses and verifies your Claude Code installation. Checks settings, permissions, MCP connections, and configuration. Run this when something isn't working right.
/release-notes — Shows the full changelog with the most recent version first. Check this when you notice new features or want to see what shipped.
Account & Plan Management
These commands handle authentication, billing, and plan-level settings.
/login and /logout — Sign in and out of your Anthropic account.
/upgrade — Opens the upgrade page to switch plan tiers (Pro to Max, etc.). Only available on direct Anthropic plans.
/usage — Shows your plan's usage limits and current rate limit status. Check this when you're hitting rate limits to understand your remaining quota.
/extra-usage — Configures extra usage to keep working when rate limits hit. Allows you to continue at a higher per-token cost rather than waiting for limits to reset.
/privacy-settings — Views and updates privacy settings. Pro/Max only. Controls whether your conversations are used for training.
/passes — Shares a free week of Claude Code with friends. Available on eligible accounts.
Memory & Project Setup
These commands manage Claude Code's persistent knowledge about you and your project.
/memory — Edits CLAUDE.md memory files, enables or disables auto-memory, and views current entries. Auto-memory lets Claude save facts about your preferences and project across sessions.
/init — Initializes a new project by analyzing your codebase and generating a CLAUDE.md file. Run this once on every new project.
/add-dir — Adds an additional working directory to the current session. Useful when your work spans multiple repositories or directories.
Utility Commands
/help — The master reference. Shows all available commands with descriptions.
/feedback (alias: /bug) — Submits feedback or bug reports to the Claude Code team.
/btw — Asks a quick side question without adding it to the main conversation context. Good for "how do I..." questions that aren't related to your current task.
/plan — Enters plan mode directly from the prompt. Claude will analyze the request and produce a structured implementation plan before writing any code.
/copy — Copies the last assistant response to your clipboard. Pass a number to copy an earlier response (e.g., /copy 3 for the third-most-recent).
/desktop (alias: /app) — Continues the current session in the Claude Code Desktop app. Your full context transfers.
/mobile (aliases: /ios, /android) — Shows a QR code to download the Claude mobile app.
/teleport — Resumes a web-started session in your local terminal.
/stickers — Orders Claude Code stickers. Yes, really.
Bundled Skills
Bundled skills ship with Claude Code and provide structured workflows for common tasks.
/simplify — Reviews changed code for reuse opportunities, quality issues, and efficiency problems, then fixes what it finds. Run this after writing a significant chunk of code.
/loop — Runs a prompt or slash command on a recurring interval. Example: /loop 5m /status checks status every 5 minutes. Defaults to 10-minute intervals. Useful for monitoring long-running processes.
/batch — Researches and plans a large-scale change, then executes it in parallel across isolated git worktrees. The power tool for refactors that touch many files.
Custom Project Skills
You can create your own slash commands by adding markdown files to .claude/commands/ in your project. Each file becomes a /command matching its filename. These are project-specific and can load reference files, enforce workflows, and chain complex multi-step processes.
For example, a file at .claude/commands/deploy.md becomes /deploy. The file contains the instructions Claude follows when the command is invoked — including which files to read, what steps to follow, and what validation to run.
Skills are zero-cost until invoked. They load into context only when triggered, so you can have dozens of skills without paying any token overhead during normal sessions.
# Example: .claude/commands/deploy.md
Deploy the current build to production.
## Steps
1. Run `npm run build` and verify no errors
2. Run the test suite: `npm test`
3. If all pass, run `cd worker && npx wrangler deploy`
4. Verify the deployment with a health check
5. Report the result
Quick Input Methods
These aren't slash commands but work at the prompt alongside them.
!command — Bash mode. Prefix any input with ! to run it as a shell command directly. Output lands in the conversation so Claude can see it. Example: !git log --oneline -5 shows recent commits.
@path — File mention. Type @ to trigger file path autocomplete. Mentioned files are loaded into context so Claude can reference them.
Hold Space — Voice dictation (when /voice is active). Hold the spacebar to record speech. The recording stays active through pauses — you can think mid-sentence without it cutting off. Release the spacebar, then press Enter to submit.
Auto Mode & Permission Flags
Claude Code's execution model is permission-gated by default — it asks before writing files, running commands, or making changes. Two mechanisms relax this.
Auto mode runs tasks without per-step approval. The agent reads, edits, executes, and commits without pausing for confirmation. Standard auto mode respects a configurable allowlist of safe operations.
--dangerously-skip-permissions removes all permission gates entirely. The flag name is deliberately alarming — Anthropic wants you to understand that you're giving full autonomous control. For operators who have established trust with the tool through hundreds of sessions, this is a calculated decision, not a reckless one.
The permission model also has three runtime modes, toggled with Shift+Tab or Alt+M: - Default — Asks for confirmation on risky operations (file writes, shell commands) - Relaxed — Fewer prompts, trusts most operations - Strict — Asks for everything, maximum oversight
Start with Default. Graduate to Auto mode once you trust the tool. Whether you ever reach --dangerously-skip-permissions is between you and your risk tolerance.
I trust this tool more than I trust most software I've run in twenty years of enterprise tech. The flag name is a liability disclaimer, not a risk assessment.
— Greg Ryan, on --dangerously-skip-permissions