Claude Code Commands You Didn’t Know Existed

Over 50 built-in commands ranked by coolness — from voice dictation and remote control to time-travel checkpoints, visual context maps, and a full vim mode. The complete reference you’ll bookmark.

Claude Code Commands You Didn’t Know Existed — Artificial Intelligence

Claude Code has over 50 built-in commands, and most people use maybe five of them. /help, /clear, /compact, and whatever else shows up in autocomplete.

But buried in that / menu are features that genuinely change how you work: voice dictation, remote control from your phone, time-travel checkpoints, visual context maps, interactive diff viewers, and a full vim mode. This guide covers all of them, ranked by how likely they are to make you say "Wait, this exists?"

Bookmark this page. You’ll come back to it.


🤯 Tier 1: Hidden Gems

These are the commands that make people stop and say "How long has this been here?"

/voice — Push-to-Talk Dictation

Talk to Claude Code instead of typing. Hold Space, speak your prompt, release. Your speech appears in real-time, dimmed until finalized, then inserted at your cursor.

/voice          # Toggle on/off
# Then hold Space to speak
# Release to insert text
# Mix voice + typing freely

Why it’s incredible:

  • Tuned for coding vocabulary — recognizes regex, OAuth, JSON, localhost, camelCase
  • Auto-uses your project name and git branch as recognition hints
  • Supports 20 languages (en, es, fr, de, ja, ko, zh, and more)
  • You can speak part of a prompt and type the rest

Requires: Claude.ai account (not API keys), local microphone, native terminal (not SSH).

/rc — Remote Control

This one blows minds. Run /rc (short for /remote-control) and your local CLI session becomes controllable from claude.ai or the Claude app. Same session, same context, same tools — just accessible from your browser or phone.

/rc
# Shows a URL you can open on any device
# Full two-way control: type from web, see results in terminal

Start a long-running task on your workstation, walk away, monitor and steer it from your phone. The session stays local (your machine runs everything), but the interface is remote.

/batch — Parallel Large-Scale Changes

The nuclear option for codebase-wide changes. /batch analyzes your codebase, decomposes the work into 5–30 independent units, spawns isolated agents in separate git worktrees, and each agent opens its own PR.

/batch migrate all React class components to hooks
/batch add error boundaries to every page component
/batch update all API calls to use the new auth header

This isn’t running one change at a time. It’s parallel execution across isolated branches. Each agent has its own worktree, so there are no merge conflicts between them. You review each PR independently.

Esc+Esc — Time Travel

Press Escape twice and Claude Code opens a rewind/checkpoint dialog. You can scroll through every message in your conversation and choose a point to restore to — both the code and the conversation state.

# Press Esc + Esc
# Arrow through messages
# Choose: Rewind (restore code + conversation) or Summarize (compress from that point)

Claude took a wrong turn three messages ago? Rewind. Don’t lose the good parts of a long conversation? Summarize from a specific point. It’s the undo button you didn’t know existed.

/context — Visual Context Map

Displays your context window usage as a colored grid — a visual representation of how much space your conversation, tools, system prompt, and skills are consuming.

/context
# Shows a colored grid: each cell = a chunk of your context window
# Instantly see what's eating your tokens

When you’re hitting context limits and don’t know why, this command shows you exactly where the tokens went. Maybe a massive file read is still in context. Maybe your CLAUDE.md is larger than you thought. Now you can see it.

/diff — Interactive Diff Viewer

Opens a full interactive diff viewer inside the terminal. Not just the current git diff — it shows per-turn diffs, so you can see exactly what Claude changed on each response.

/diff
# Left/Right arrows: cycle between git diff and individual turns
# Up/Down arrows: browse files
# Enter: view details
# Esc: close

Review what each turn modified before committing. See the full picture without leaving Claude Code.

Ctrl+G — External Editor

Press Ctrl+G and your current prompt opens in your $EDITOR (Vim, VS Code, Zed, whatever). Write a complex multi-line prompt with full editor capabilities, save and close, and it’s inserted into Claude Code.

Perfect for crafting detailed prompts that are painful to type in a single-line terminal input. Write them in your editor of choice, with syntax highlighting and all.

/vim — Full Vim Mode

Toggles complete vim keybindings for the input area. Not a toy implementation — this is real vim: hjkl navigation, dd/yy/p, text objects (ciw, da", yi(), . repeat, f{char} jumps, and Insert/Normal mode switching.

/vim          # Toggle on
# Normal mode: Esc
# Insert mode: i, a, o, O
# Delete line: dd
# Change word: cw
# Yank line: yy
# Paste: p
# Repeat: .

Persists across sessions once enabled. Vim users, you’re home.

! — Bash Mode

Type ! at the start of your prompt and you’re in direct bash mode. The command runs without Claude interpreting it, and both the command and its output are added to the conversation.

! npm test
! git log --oneline -10
! docker ps
! cat package.json | head -20

Faster than asking Claude to run a command. The output becomes context Claude can reference in its next response. Supports Tab autocomplete from your bash history and Ctrl+B to background long-running commands.

/insights — Session Analytics

Generates a report analyzing your Claude Code usage across sessions. Shows project areas you’ve worked on, interaction patterns, friction points, and tool usage breakdown.

/insights
# Generates a comprehensive report of:
# - Projects and areas you've worked on
# - Session duration and frequency patterns
# - Where you get stuck (friction points)
# - Model and tool usage breakdown

Useful for quarterly reviews, understanding your work patterns, or identifying where you’re spending the most time.


⚡ Tier 2: Power User Essentials

You can live without these, but once you start using them, you won’t.

/loop — Recurring Prompts

Run any prompt on a repeating interval. Set it and forget it.

/loop 5m check if the deploy finished
/loop 10m run the test suite and report failures
/loop 1h check for new PR comments

Claude executes the prompt every N minutes/hours. Like a watch command but with full Claude intelligence. Monitors deployments, polls CI, babysits long-running processes.

/btw — Side Questions

Ask a quick question without affecting the conversation. Claude sees the full context but the exchange doesn’t get added to your history. No tool access — just answers from current context.

/btw what was the name of that config file we looked at earlier?
/btw what does this error code mean?
/btw remind me of the function signature for createUser

Runs in the background while Claude continues working. Minimal cost (reuses parent cache). Perfect for quick clarifications without derailing the main task.

/stats — Usage Dashboard

Visualizes your daily usage, session history, streaks, and model preferences. For subscribers (Pro/Max) — API users should check /cost instead.

/stats
# Shows: daily usage graph, session streaks,
# model distribution, time patterns

/branch — Fork Conversations

Create a divergence point in your conversation. Want to try two different approaches without losing either? Branch the conversation, explore one path, then /resume the original.

/branch try-hooks-approach    # Save this point
# ... explore approach A ...
/resume                      # Go back to the branch point
# ... explore approach B ...

Think git branches, but for conversations.

Shift+Tab — Permission Mode Cycling

Instantly cycle through permission modes without typing a command:

  • Default — Prompts for each action
  • Accept Edits — Auto-approves code changes
  • Plan — Claude analyzes before editing
  • Auto — AI decides what’s safe to run
  • Bypass — Skip all checks (careful!)

The fastest way to go from cautious to autonomous mid-conversation. No need to stop and configure anything.

/fast — Speed Mode

Toggles fast mode for 2.5x faster responses. Same Opus 4.6 model, same quality, just faster output. Higher cost per token, but when you’re iterating rapidly, it’s worth every cent.

/fast          # Toggle on
/fast on      # Explicitly enable
/fast off     # Explicitly disable

A gray symbol appears when fast mode is active. Combine with /effort low for maximum speed on simple tasks.

Ctrl+O — Verbose Transcript

Toggle verbose output to see exactly what Claude is doing behind the scenes: every tool call, every MCP request, full argument details. Essential for debugging when things aren’t working as expected.

/color — Session Color Coding

Set a color for the current session’s prompt bar:

/color red
/color cyan
/color purple
/color default    # Reset

When you’re running multiple Claude Code sessions in different terminal tabs, color-coding them makes it instantly clear which project you’re talking to. Available colors: red, blue, green, yellow, purple, orange, pink, cyan.

/copy — Copy Response to Clipboard

/copy        # Copy last response
/copy 2      # Copy second-to-last response

When a response contains code blocks, it shows a picker to select individual blocks. No more manual selection and copy-paste.

/export — Save Conversation

/export                     # Opens dialog
/export conversation.txt    # Save directly to file

Export your entire conversation as plain text. Great for sharing sessions with teammates, archiving problem-solving approaches, or creating documentation from a debugging session.


🚀 Tier 3: Workflow Boosters

These won’t blow your mind, but they’ll save you time every single day.

/compact — Compress Conversation

Summarizes your conversation history to free up context window space. Optionally tell it what to focus on:

/compact                                    # Summarize everything
/compact Focus on the API changes only      # Guided compression

Old messages are replaced with an AI summary. Recent context stays in full detail. The original is preserved in the transcript — nothing is lost. Use this when you’re deep in a long session and context is running low.

/rewind — Checkpoint Restore

Restore both code and conversation to a previous state. Like git checkout for your entire session. Also accessible via Esc+Esc.

/rewind    # Opens message picker to choose restore point

/model — Switch Models Mid-Conversation

/model            # Opens picker with effort slider
/model sonnet     # Switch to Sonnet 4.6 (faster, cheaper)
/model opus       # Switch to Opus 4.6 (maximum capability)
/model haiku      # Switch to Haiku (fastest, cheapest)

Switch models without restarting the session. Use Opus for complex architectural decisions, switch to Sonnet for routine file edits. The Left/Right arrows in the model picker adjust effort level.

/effort — Reasoning Depth

/effort low       # Minimal thinking, fastest
/effort medium    # Balanced
/effort high      # Deep reasoning
/effort max       # Maximum thinking (Opus only)
/effort auto      # Claude decides

Control how much Claude thinks before responding. low for simple tasks (rename a variable), max for complex ones (design a migration strategy). Directly impacts both speed and cost.

/pr-comments — Fetch PR Feedback

/pr-comments              # Current branch's PR
/pr-comments 123          # PR #123
/pr-comments https://...  # By URL

Pull all reviewer comments into context. Then ask Claude to address them. Requires gh CLI.

/security-review — Vulnerability Scanner

Analyzes pending git changes for security vulnerabilities: injection, auth bypasses, data exposure, credential leaks, XSS, CSRF. Run it before committing security-sensitive code.

/security-review
# Scans your uncommitted changes for:
# - Injection vulnerabilities
# - Authentication issues
# - Data exposure risks
# - Credential leaks
# - Permission problems

/simplify — Code Quality Review

Spawns three parallel review agents to analyze your recent changes for code reuse, quality, and efficiency. Aggregates findings and applies fixes.

/simplify                              # Review all recent changes
/simplify focus on memory efficiency   # Guided focus

/schedule — Cloud Scheduled Tasks

Create scheduled tasks that run in the cloud on a cron schedule. Set up recurring remote agents for automated workflows.

/schedule    # Create, list, or manage scheduled tasks

Ctrl+B — Background Tasks

Press Ctrl+B while a command is running to send it to the background. The output is buffered (up to 5GB!) and Claude retrieves it when done. Use /tasks to manage background tasks, Ctrl+F (press twice) to kill all background agents.

Tmux users: Press Ctrl+B twice (tmux intercepts the first one).

@ — File Mentions

Type @ and start typing a filename. Claude Code shows autocomplete for project files, letting you add specific files to context without reading them manually.

@package.json what version of react are we using?
@src/auth/middleware.ts explain the token validation logic

🔧 Tier 4: Setup and Configuration

Set these up once, benefit forever.

/doctor — System Diagnostics

Comprehensive health check: installation integrity, authentication, tool availability, MCP servers, hook setup, permissions, IDE integration. Run this first when anything isn’t working.

/terminal-setup — Terminal Keybindings

Configures Shift+Enter for multiline input and other shortcuts. Only appears when your terminal needs it (iTerm2, WezTerm, Ghostty, and Kitty work out of the box). Essential for VS Code, Alacritty, Zed, and Warp users.

/keybindings — Custom Shortcuts

Opens ~/.claude/keybindings.json for full keyboard shortcut customization:

{
  "bindings": [
    {
      "context": "Chat",
      "bindings": {
        "ctrl+e": "chat:externalEditor",
        "ctrl+k ctrl+s": "chat:stash"
      }
    }
  ]
}

Supports chord bindings (ctrl+k ctrl+s), modifier combos, and per-context configuration. Changes apply instantly without restarting.

/statusline — Custom Status Bar

Configure a persistent status line showing model, git branch, context usage, cost, or any custom information.

/mcp — MCP Server Management

Manage your Model Context Protocol servers: connect, disconnect, handle OAuth, and configure external tool integrations (GitHub, Slack, databases, and more).

/init — Project Initialization

Creates a starter CLAUDE.md file for your project. Set CLAUDE_CODE_NEW_INIT=true for an interactive flow that walks through skills, hooks, and memory setup.

/memory — Project Instructions

Edit CLAUDE.md files and auto-memory from one place. View current project instructions, enable/disable auto-memory, and manage .claude/rules/ files.

/permissions — Tool Access Control

View and configure which tools Claude can use. Set allow/deny rules with patterns like Bash(git *) or mcp__github__*. Alias: /allowed-tools.

/config — Settings Interface

The master settings panel. Theme, model, output style, effort level, voice language, vim mode, syntax highlighting, and more. Alias: /settings.

/theme — Color Themes

Switch between light, dark, daltonized (colorblind-accessible), and ANSI themes. Press Ctrl+T inside the theme picker to toggle syntax highlighting.


📌 Tier 5: Nice to Know

You might not use these daily, but you’ll be glad you know they exist when you need them.

CommandWhat It Does
/debug [desc]Troubleshoot the current Claude Code session by reading debug logs
/resume [session]Continue a previous conversation by ID or name. Alias: /continue
/rename [name]Name the current session (appears in /resume picker)
/costShow token usage and dollar cost for API users
/usageShow plan limits and rate limit status
/ideManage IDE integrations (VS Code, JetBrains, Zed)
/chromeEnable browser automation via Chrome integration
/desktopContinue session in Claude Code Desktop app (macOS/Windows). Alias: /app
/planEnter plan mode: Claude analyzes before implementing
/sandboxToggle filesystem/network sandboxing (supported platforms)
/install-github-appSet up Claude GitHub Actions for a repository
/install-slack-appInstall Claude Slack integration
/extra-usageConfigure extra usage pool for when rate limits hit
/release-notesView the full changelog
/skillsList all available custom skills
/hooksView active hook configurations
/pluginManage Claude Code plugins
/reload-pluginsReload all active plugins
/mobileQR code to download Claude mobile app. Aliases: /ios, /android
/passesShare a free week of Claude Code with friends (if eligible)
/stickersOrder Claude Code stickers (yes, really)

Keyboard Shortcuts Cheat Sheet

Every shortcut you need, organized by what you’re trying to do.

Essential

ShortcutAction
Ctrl+CCancel current input or generation
Ctrl+DExit Claude Code
Ctrl+LClear terminal screen (keeps conversation)
Esc+EscOpen rewind/checkpoint dialog
Shift+TabCycle permission modes
Up/DownNavigate command history

Productivity

ShortcutAction
Ctrl+GOpen prompt in external editor
Ctrl+OToggle verbose output
Ctrl+RReverse search command history
Ctrl+BBackground running task
Ctrl+TToggle task list
Ctrl+FKill all background agents (press twice)
Ctrl+VPaste image from clipboard
Ctrl+SStash current prompt draft

Model & Thinking

ShortcutAction
Option+P / Alt+PSwitch model without clearing prompt
Option+T / Alt+TToggle extended thinking
Left/Right in model pickerAdjust effort level

Text Editing

ShortcutAction
Ctrl+KDelete to end of line
Ctrl+UDelete entire line
Ctrl+YPaste deleted text
Alt+B / Alt+FMove cursor back/forward one word
\ + EnterNew line (all terminals)
Shift+EnterNew line (iTerm2, WezTerm, Ghostty, Kitty)

CLI Power Flags

These flags control how Claude Code starts. Use them from your shell.

Headless / SDK Mode

claude -p "explain this function"              # One-shot, then exit
claude -p "query" --output-format json          # JSON output
claude -p --max-turns 3 "fix this bug"          # Limit agentic turns
claude -p --max-budget-usd 5.00 "refactor"      # Stop at $5
cat logs.txt | claude -p "what went wrong?"      # Pipe content

Sessions

claude -c                          # Continue most recent conversation
claude -r "auth-refactor"          # Resume by name
claude -n "my-feature"             # Name the session
claude -w feature-x                # Start in isolated git worktree

Permissions & Safety

claude --permission-mode plan                   # Start in plan mode
claude --tools "Bash,Edit,Read"                 # Restrict available tools
claude --allowedTools "Bash(git *)" "Read"       # Pre-approve specific tools
claude --dangerously-skip-permissions            # Skip all prompts (careful!)

Advanced

claude --model opus --effort high               # Model + effort
claude --add-dir ../lib ../shared              # Add directories to context
claude --append-system-prompt "Always use TS"  # Add rules to system prompt
claude --remote "Fix the login bug"            # Create web session
claude --debug "api,hooks"                     # Debug logging
claude --bare -p "query"                       # Skip all auto-discovery

Pro Tips

  1. Color-code your sessions. Running three terminals? /color red for production, /color cyan for the feature branch, /color purple for research.
  2. Use ! for quick checks. Type ! git status instead of asking Claude to check. Faster, and the output enters context automatically.
  3. Branch before experiments. Before trying a risky approach: /branch safe-point. If it fails, /resume safe-point.
  4. Combine /fast and /effort. For simple tasks: /fast on + /effort low = lightning fast. For architecture: /fast off + /effort max = deepest reasoning.
  5. Check /context before /compact. See what’s actually filling your context window. Often one large file read is the culprit — compacting may not be the best solution.
  6. Use Ctrl+G for complex prompts. Don’t fight the terminal input. Open your editor, write a detailed prompt with structure, save, and send.
  7. Monitor costs with /cost. Check periodically during long sessions to avoid surprises. Set --max-budget-usd for automated budget limits.
  8. /security-review before every PR. Make it a habit. Takes seconds, catches real vulnerabilities.

Quick Reference: Every Command

CommandCategoryWhat It Does
/voice🎵 InputPush-to-talk voice dictation
/vim🎵 InputToggle full vim keybindings
/rc🌐 RemoteRemote control from claude.ai
/desktop🌐 RemoteContinue in desktop app
/batch⚙️ TasksParallel codebase-wide changes
/loop⚙️ TasksRecurring prompts on interval
/schedule⚙️ TasksCloud-scheduled recurring tasks
/simplify⚙️ TasksCode quality review (3 parallel agents)
/security-review⚙️ TasksScan changes for vulnerabilities
/diff🔍 ViewInteractive diff viewer
/context🔍 ViewVisual context window map
/insights🔍 ViewSession analytics report
/stats🔍 ViewUsage dashboard and streaks
/cost🔍 ViewToken and dollar cost (API users)
/usage🔍 ViewPlan limits and rate status
/copy🔍 ViewCopy response to clipboard
/export🔍 ViewSave conversation to file
/compact💬 SessionCompress conversation history
/rewind💬 SessionRestore to previous checkpoint
/branch💬 SessionFork the conversation
/resume💬 SessionContinue a previous session
/rename💬 SessionName the current session
/clear💬 SessionClear history (saves checkpoint)
/model🎯 ModelSwitch AI model
/effort🎯 ModelSet reasoning depth
/fast🎯 ModelToggle 2.5x speed mode
/btw💬 ChatSide question (no history impact)
/plan💬 ChatEnter plan-only mode
/pr-comments🔗 GitFetch PR reviewer comments
/color🎨 DisplaySession prompt bar color
/theme🎨 DisplayTerminal color theme
/statusline🎨 DisplayCustom status bar
/config⚙️ SetupMaster settings panel
/doctor⚙️ SetupSystem diagnostics
/init⚙️ SetupInitialize CLAUDE.md
/memory⚙️ SetupEdit project instructions
/permissions⚙️ SetupTool access control
/keybindings⚙️ SetupCustom keyboard shortcuts
/terminal-setup⚙️ SetupConfigure terminal keybindings
/mcp⚙️ SetupMCP server management
/hooks⚙️ SetupView hook configurations
/debug🐛 DebugTroubleshoot session
/skills📦 MetaList available skills
/plugin📦 MetaManage plugins
/help📦 MetaShow all commands
/release-notes📦 MetaView changelog

This is a living tool — Anthropic ships new commands regularly. Type / to see the latest, or run /release-notes to check what’s new. And if something’s missing or broken, /bug sends feedback directly to the team.