Claude Code Commands You Didn’t Know Existed
A practical reference to Claude Code commands, including conversation controls, checkpoint limits, model selection and terminal configuration.
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 freelyWhy 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 multiple dictation languages, including English, Spanish, French, German, Japanese and Korean; check the current supported-language table
- 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 terminalStart 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, proposes a decomposition into parallel work 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 headerEach agent works in an isolated checkout. The resulting branches can still conflict during integration and require combined validation. Review the individual changes and the integrated result.
Esc+Esc — Time Travel
Esc twice opens the checkpoint menu. It can restore the conversation, supported tracked edits, or both when a matching snapshot is available. This is narrower than restoring the entire system.
# Press Esc twice and choose an available checkpoint.
# Restore conversation, supported tracked edits, or both.
# Review the coverage and skipped-file warnings before relying on restoration.Checkpointing covers direct edits made through Claude’s file-editing tools, with documented exceptions. Shell changes, external effects and most subagent edits are not restored; symlinked or hard-linked files are skipped. Keep Git and appropriate backups for recovery outside that coverage.
/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 tokensWhen 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: closeReview 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 -20Faster 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 breakdownUseful 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 a prompt repeatedly within a running Claude Code session. Local loops require the process to remain running and are not a durable unattended scheduler.
/loop 5m check if the deploy finished
/loop 10m run the test suite and report failures
/loop 1h check for new PR commentsWith an explicit interval, scheduled prompts wait until Claude Code is idle and their timing includes jitter. Recurring tasks have a documented seven-day expiry. Use a supported cloud routine when execution must continue independently of the local session, and check its separate scheduling limits.
/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 createUserRuns 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
Branching creates a separate conversation path. Resuming a conversation restores its history; neither operation by itself isolates or restores the working directory.
/branch try-hooks-approach
# Conversation branch only; use a separate worktree for code isolation.
/resume
# Select the intended conversation and confirm the working directory.Use a Git branch or worktree when an experiment also needs isolated code. Choose explicitly which conversation and which checkout to continue.
Shift+Tab — Permission Mode Cycling
Instantly cycle through permission modes without typing a command:
- Default — Asks when approval is required
- Accept Edits — Auto-approves code changes
- Plan — Claude analyzes before editing
- Auto — AI decides what’s safe to run
- Bypass — Skips ordinary approval prompts; documented exceptions and managed restrictions remain
The fastest way to go from cautious to autonomous mid-conversation. No need to stop and configure anything.
/fast — Speed Mode
Fast mode changes the serving option for supported models and has its own pricing. Availability, model support and performance depend on the current offering; it is not a universal 2.5× guarantee. Check the active model and rate card before using it.
/fast # Toggle on
/fast on # Explicitly enable
/fast off # Explicitly disableA 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 # ResetWhen 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 responseWhen 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 fileExport your entire conversation as plain text. Great for sharing sessions with teammates, archiving problem-solving approaches, or creating documentation from a debugging session.
Reference: Claude Code checkpoint coverage and exclusions (documentation checked 20 September 2026).
Command details checked 20 September 2026: permission modes; model effort support; dictation languages; bundled skills; background command output limits; local scheduling and expiry.
🚀 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 compressionCompaction replaces some active context with a summary. The stored transcript and the model’s current context are different: details omitted from the summary may need to be read again.
/rewind — Checkpoint Restore
Restore conversation state or supported tracked file edits from an available checkpoint. This does not reverse all shell commands, external actions or changes made by other processes.
/rewind # Opens message picker to choose restore point/model — Switch Models Mid-Conversation
/model # Inspect available models and the active selection
/model sonnet # A model alias; the resolved version can change
/model opus # A model alias; confirm the resolved version
/model haiku # Availability depends on the account and routeSwitch 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 reasoning where supported by the selected model and route
/effort auto # Claude decidesControl 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 URLPull 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 tasksCtrl+B — Background Tasks
Press Ctrl+B while a command is running to send it to the background. Output is written to a file that Claude can retrieve. The documented output limit terminates a background task if it exceeds 5GB; it is not an unlimited logging facility. 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.
Keyboard Shortcuts Cheat Sheet
Every shortcut you need, organized by what you’re trying to do.
Essential
Productivity
Model & Thinking
Text Editing
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 contentSessions
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 worktreePermissions & 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 ordinary approval prompts; exceptions and managed restrictions remainAdvanced
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-discoveryPro Tips
- Color-code your sessions. Running three terminals?
/color redfor production,/color cyanfor the feature branch,/color purplefor research. - Use ! for quick checks. Type
! git statusinstead of asking Claude to check. Faster, and the output enters context automatically. - Branch a conversation for an alternate discussion. Use a separate worktree for filesystem isolation; /resume alone does not undo an experiment.
- Combine /fast and /effort. For simple tasks:
/fast on+/effort low= lightning fast. For architecture:/fast off+/effort max= deepest reasoning. - 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.
- Use Ctrl+G for complex prompts. Don’t fight the terminal input. Open your editor, write a detailed prompt with structure, save, and send.
- Monitor costs with /cost. Check periodically during long sessions to avoid surprises. Set
--max-budget-usdfor automated budget limits. - /security-review before every PR. Make it a habit. Takes seconds, catches real vulnerabilities.
Quick Reference: Every Command
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.