Latest Posts

Claude

Claude Code Command Complete List

Claude Code Command Complete List

Claude Code — Command & Instruction Reference
Claude Code · CLI reference

> Every command, flag & shortcut

A complete, scannable reference for Claude Code — slash commands you run inside a session, the claude commands and flags you launch it with, keyboard shortcuts, and how to build your own commands.

Type / in a session to filter live Marked Skill = prompt-based Marked Workflow = fans out to subagents
00

Getting started

Install once, then start a session. Inside a session, type / to see and filter every command available to you.

# Install (requires Node.js)
npm install -g @anthropic-ai/claude-code

# Start an interactive session in the current project
claude

# Start with a prompt, or run a one-off query and exit
claude "explain this project"
claude -p "summarize the failing test"

# Verify your setup at any time
claude /doctor
Tip: availability of any single command depends on your platform, plan, and version — not everything below appears for everyone.
01

Session & context

Control the conversation itself: start fresh, reclaim context, resume earlier work, and move responses around.

/help
Show help and the list of available commands.
/init
Generate a starter CLAUDE.md guide for the project.
/clear [name]
Start a new conversation with empty context; the old one stays in /resume. aliases: /reset, /new
/compact [instructions]
Summarize the conversation so far to free up context, with optional focus instructions.
/context [all]
Visualize current context-window usage as a colored grid, with optimization hints.
/resume [session]
Resume a conversation by ID or name, or open the session picker. alias: /continue
/rename [name]
Rename the current session; the name shows on the prompt bar and in /resume.
/export [filename]
Export the current conversation as plain text, to a file or the clipboard.
/copy [N]
Copy the last assistant response (or the Nth-latest); picks individual code blocks when present.
/btw <question>
Ask a quick side question without adding it to the conversation history.
/recap
Generate a one-line summary of the current session on demand.
/memory
Edit CLAUDE.md memory files and manage auto-memory entries.
/exit
Exit the CLI; detaches (keeps running) if attached to a background session. alias: /quit
02

Models, effort & behavior

Tune how much reasoning you spend, switch models mid-task, and shape the interface and plan mode.

/model [model]
Switch the AI model and save it as the default for new sessions; press s for session-only.
/effort [level|auto]
Set the effort level: low/medium/high/xhigh/max/ultracode. Available levels depend on the model.
/fast [on|off]
Toggle fast mode for quicker, lighter responses.
/plan [description]
Enter plan mode from the prompt, optionally starting with a task.
/goal [condition|clear]
Set a goal Claude keeps working toward across turns until the condition is met.
/advisor [model|off]
Enable or disable the advisor tool, which consults a second model for guidance at key moments.
/config
Open settings to adjust theme, model, output style, and other preferences. alias: /settings
/theme
Change the color theme, including auto, light/dark, and colorblind-accessible variants.
/tui [default|fullscreen]
Set the terminal UI renderer and relaunch into it with the conversation intact.
/focus
Toggle focus view, showing only your last prompt, a tool summary, and the final response (fullscreen).
/statusline
Configure the status line; describe what you want or auto-configure from your shell prompt.
/color [color|default]
Set the prompt-bar color for the current session.
/scroll-speed
Adjust mouse-wheel scroll speed interactively (fullscreen rendering only).
03

Review & ship

Inspect changes, get bug and security reviews, and roll back when something goes wrong.

/diff
Open an interactive diff viewer for uncommitted changes and per-turn diffs.
/code-review [level] [--fix] [--comment] [target] Skill
Review the current diff for correctness bugs plus reuse, simplification, and efficiency cleanups. Use --fix to apply, or ultra for a deep cloud review.
/simplify [target] Skill
Cleanup-only review run by four parallel agents that applies fixes without hunting for bugs.
/review [PR]
Review a pull request locally in the current session.
/security-review
Analyze pending branch changes for vulnerabilities like injection, auth issues, and data exposure.
/ultrareview [PR]
Deep, multi-agent code review in a cloud sandbox. Prefer /code-review ultra; this is its alias.
/rewind
Rewind code and/or conversation to a previous checkpoint, or summarize from a chosen message. aliases: /checkpoint, /undo
04

Parallel & background work

Delegate to subagents, fan large changes out across worktrees, and keep work running in the background.

/agents
Manage custom subagent configurations Claude can delegate side tasks to.
/tasks
View and manage everything running in the background. also: /bashes
/background [prompt]
Detach the current session to run as a background agent and free the terminal. alias: /bg
/fork <directive>
Spawn a forked subagent that inherits the full conversation and works while you keep going.
/branch [name]
Branch the conversation at this point to try a different direction without losing the original.
/batch <instruction> Skill
Decompose a large change into 5–30 units and run each in its own background subagent and worktree.
/loop [interval] [prompt] Skill
Run a prompt repeatedly while the session stays open; self-paces if no interval is given. alias: /proactive
/deep-research <question> Workflow
Fan out web searches, cross-check sources, and synthesize a cited report.
/workflows
Open the workflow progress view to watch, pause, resume, or save running workflows.
/ultraplan <prompt>
Draft a plan in a cloud session, review it in the browser, then execute remotely or send it back.
/schedule [description]
Create, update, list, or run routines that execute on managed cloud infrastructure. alias: /routines
/stop
Stop the current background session; the transcript and any worktree are kept.
05

Run & verify your app

Confirm changes against the running app instead of just tests. These bundled skills require Claude Code v2.1.145+.

/run Skill
Launch and drive your app to see a change working in the running app, not just in tests.
/verify Skill
Confirm a change does what it should by building and running the app and observing the result.
/run-skill-generator Skill
Teach /run and /verify how to build and launch your project from a clean environment.
06

Connections & integrations

Wire in MCP servers, plugins, skills, hooks, your IDE, and GitHub/Slack apps.

/mcp [reconnect|enable|disable]
Manage MCP server connections and OAuth authentication.
/plugin [subcommand]
Manage plugins; run bare for the menu, or pass list/install/enable/disable.
/reload-plugins [--force]
Reload active plugins to apply pending changes without restarting.
/reload-skills
Re-scan skill and command directories so on-disk changes apply without restarting.
/skills
List available skills; sort by token count or hide individual skills.
/hooks
View hook configurations that fire on tool events.
/ide
Manage IDE integrations and show connection status.
/chrome
Configure Claude in Chrome settings for web automation and testing.
/install-github-app
Set up the Claude GitHub Actions app for a repository.
/install-slack-app
Install the Claude Slack app via an OAuth flow in the browser.
/web-setup
Connect your GitHub account to Claude Code on the web using your local gh credentials.
07

Remote, web & devices

Move a session between your terminal, claude.ai, the cloud, and the desktop or mobile apps.

/remote-control
Make this session controllable from claude.ai or the Claude app. alias: /rc
/remote-env
Choose the default environment for cloud agents.
/teleport
Pull a Claude Code on the web session into this terminal. also: /tp
/autofix-pr [prompt]
Spawn a cloud session that watches the branch's PR and pushes fixes when CI fails or reviewers comment.
/desktop
Continue the session in the Claude Code Desktop app (macOS/Windows, subscription). alias: /app
/mobile
Show a QR code to download the Claude mobile app. aliases: /ios, /android
/cd <path>
Move the session to a new working directory while preserving the prompt cache (v2.1.169+).
/add-dir <path>
Add a working directory for file access during the current session.
08

Account, usage & permissions

Sign in, track spend, and decide which tools run without asking.

/login
Sign in to your Anthropic account.
/logout
Sign out from your Anthropic account.
/status
Open the Status tab showing version, model, account, and connectivity.
/usage
Show session cost, plan usage limits, and activity stats. aliases: /cost, /stats
/usage-credits
Configure usage credits to keep working after hitting a limit. was: /extra-usage
/permissions
Manage allow, ask, and deny rules for tool permissions. alias: /allowed-tools
/privacy-settings
View and update privacy settings (Pro and Max subscribers).
/sandbox
Toggle sandbox mode on supported platforms.
/fewer-permission-prompts Skill
Scan transcripts for common safe calls and build a prioritized allowlist to cut prompts.
/upgrade
Open the upgrade page to switch to a higher plan tier (Pro and Max).
/passes
Share a free week of Claude Code with friends (if eligible).
09

Diagnostics, learning & extras

Troubleshoot, report problems, learn the tool, and a few fun ones.

/doctor
Diagnose and verify your installation and settings; press f to have Claude fix issues.
/debug [description] Skill
Enable debug logging and troubleshoot by reading the session debug log.
/feedback [report]
Submit feedback, report a bug, or share your conversation. aliases: /bug, /share
/heapdump
Write a heap snapshot and memory breakdown for diagnosing high memory usage.
/release-notes
View the changelog in an interactive version picker.
/insights
Generate a report analyzing your sessions: project areas, patterns, and friction points.
/keybindings
Open your keyboard-shortcuts file to customize bindings.
/terminal-setup
Configure terminal keybindings for Shift+Enter and newlines (shown only where needed).
/powerup
Discover features through quick interactive lessons with animated demos.
/team-onboarding
Generate a teammate ramp-up guide from your project's Claude Code usage history.
/claude-api [migrate|managed-agents-onboard] Skill
Load Claude API reference material for your project's language; migrate code or onboard a Managed Agent.
/setup-bedrock
Configure Amazon Bedrock auth, region, and model pins (when CLAUDE_CODE_USE_BEDROCK=1).
/setup-vertex
Configure Google Vertex AI auth, project, and region (when CLAUDE_CODE_USE_VERTEX=1).
/voice [hold|tap|off]
Toggle voice dictation, or enable a specific mode (requires a Claude.ai account).
/radio
Open Claude FM lo-fi radio in your browser.
/stickers
Order Claude Code stickers.
/pr-comments [PR] Removed
Removed in v2.1.91 — ask Claude directly to view pull-request comments instead.
/vim Removed
Removed in v2.1.92 — toggle Vim/Normal editing via /config → Editor mode.
10

CLI commands

Run these in your shell to start, resume, pipe into, and manage Claude Code and its background sessions.

claude
Start an interactive session.
claude "query"
Start an interactive session with an initial prompt.
claude -p "query"
Query via the SDK (print mode), then exit.
cat file | claude -p "query"
Pipe content into Claude for processing.
claude -c
Continue the most recent conversation in the current directory.
claude -r "<session>" "query"
Resume a session by ID or name and send a prompt.
claude update
Update to the latest version.
claude install [version]
Install or reinstall the native binary (a version, or stable/latest).
claude auth login
Sign in; supports --email, --sso, and --console.
claude auth logout
Log out of your Anthropic account.
claude auth status
Show authentication status as JSON (--text for human-readable).
claude agents
Open agent view to monitor and dispatch parallel background sessions.
claude attach <id>
Attach to a background session in this terminal.
claude logs <id>
Print recent output from a background session.
claude respawn <id>
Restart a background session with its conversation intact.
claude stop <id>
Stop a background session. also: claude kill
claude rm <id>
Remove a background session from the list; the transcript stays on disk.
claude mcp
Configure Model Context Protocol (MCP) servers.
claude plugin
Manage plugins. alias: claude plugins
claude project purge [path]
Delete all local Claude Code state for a project (transcripts, logs, history).
claude remote-control
Start a Remote Control server to drive Claude Code from claude.ai or the app.
claude setup-token
Generate a long-lived OAuth token for CI and scripts.
claude ultrareview [target]
Run ultrareview non-interactively; prints findings and exits 0/1.
claude daemon status
Print the background-session supervisor's state for diagnostics.
claude auto-mode defaults
Print the built-in auto-mode classifier rules as JSON.
11

CLI flags

Launch-time options. Some apply only in print mode (-p). claude --help doesn't list every flag.

--add-dir
Add working directories Claude can read and edit.
--model
Set the session model — an alias (sonnet/opus/haiku/fable) or a full name.
--effort
Set the effort level for the session (low…max).
--fallback-model
Fall back to other models, in order, when the primary is overloaded or retired.
--print, -p
Print the response without interactive mode (SDK/scripting).
--continue, -c
Load the most recent conversation in the current directory.
--resume, -r
Resume a session by ID/name or pick one interactively.
--fork-session
Create a new session ID when resuming instead of reusing the original.
--from-pr
Resume sessions linked to a specific pull request.
--session-id
Use a specific session UUID for the conversation.
--no-session-persistence
Don't save the session to disk; can't be resumed (print mode).
--name, -n
Set a display name for the session.
--permission-mode
Start in default/acceptEdits/plan/auto/dontAsk/bypassPermissions.
--dangerously-skip-permissions
Skip permission prompts (equivalent to bypassPermissions mode).
--allow-dangerously-skip-permissions
Add bypassPermissions to the Shift+Tab cycle without starting in it.
--allowedTools / --allowed-tools
Tools that run without prompting; supports pattern matching.
--disallowedTools / --disallowed-tools
Deny rules; a bare name removes the tool from context.
--tools
Restrict which built-in tools are available ("", default, or names).
--permission-prompt-tool
MCP tool to handle permission prompts in non-interactive mode.
--system-prompt
Replace the entire default system prompt with custom text.
--system-prompt-file
Replace the system prompt with the contents of a file.
--append-system-prompt
Append custom text to the default system prompt (recommended for most cases).
--append-system-prompt-file
Append a file's contents to the default system prompt.
--agent
Use a specific agent for the session.
--agents
Define custom subagents dynamically via JSON.
--mcp-config
Load MCP servers from JSON files or strings.
--strict-mcp-config
Use only the servers from --mcp-config.
--advisor
Enable the advisor tool for the session with a model alias.
--bare
Minimal mode: skip auto-discovery so scripted calls start faster.
--safe-mode
Start with all customizations disabled to troubleshoot a broken config (v2.1.169+).
--bg
Start as a background agent and return immediately.
--exec
Run a shell command as a background job instead of a Claude session (with --bg).
--worktree, -w
Start in an isolated git worktree.
--tmux
Create a tmux session for the worktree (requires -w).
--chrome / --no-chrome
Enable or disable Chrome browser integration.
--ide
Auto-connect to an IDE on startup if exactly one is available.
--remote
Create a new web session on claude.ai with a task description.
--remote-control, --rc
Start an interactive session controllable from claude.ai.
--teleport
Resume a web session in your local terminal.
--plugin-dir / --plugin-url
Load a plugin from a path or URL for this session only.
--teammate-mode
How agent-team teammates display: auto/in-process/tmux.
--disable-slash-commands
Disable all skills and commands for the session.
--output-format
Print-mode output: text/json/stream-json.
--input-format
Print-mode input: text/stream-json.
--include-partial-messages
Stream partial events (with stream-json).
--include-hook-events
Include hook lifecycle events in the output stream.
--replay-user-messages
Echo user messages back on stdout for acknowledgment.
--prompt-suggestions
Emit a predicted next prompt after each turn.
--json-schema
Return output validated against a JSON Schema (print mode).
--max-turns
Limit the number of agentic turns (print mode).
--max-budget-usd
Maximum dollar amount to spend before stopping (print mode).
--debug
Enable debug mode with optional category filtering.
--debug-file
Write debug logs to a specific file (enables debug mode).
--verbose
Verbose logging with full turn-by-turn output.
--betas
Beta headers to include in API requests (API-key users).
--settings
Path or inline JSON of settings to override for this session.
--setting-sources
Which setting sources to load: user/project/local.
--exclude-dynamic-system-prompt-sections
Improve prompt-cache reuse across machines (with -p).
--version, -v
Output the version number.
System prompt flags: --system-prompt and --system-prompt-file replace the default prompt (mutually exclusive); the two --append-* flags add to it and can combine with either. Append when Claude should stay a coding assistant with extra rules; replace only when the identity and safety model differ.
12

Keyboard shortcuts

Shortcuts vary by platform and terminal. On macOS, the Alt/Option bindings require setting Option as Meta. In fullscreen, press ? for the in-app list.

Ctrl+C
Interrupt a running operation; if idle, clears input, then exits on a second press.
Esc
Interrupt Claude mid-turn so you can redirect; work done so far is kept.
Esc Esc
Clear the input draft, or — when empty — open the rewind menu.
Ctrl+D
Exit the Claude Code session (EOF).
Ctrl+X Ctrl+K
Kill all running background subagents; press twice within 3 seconds to confirm.
Shift+Tab
Cycle permission modes (default → acceptEdits → plan → any enabled).
Ctrl+G / Ctrl+XCtrl+E
Open your prompt in the default text editor.
Ctrl+O
Toggle the transcript viewer with detailed tool usage.
Ctrl+R
Reverse-search command history interactively.
Ctrl+B
Background a running bash command or agent (tmux: press twice).
Ctrl+T
Toggle the task list in the status area.
Ctrl+L
Redraw the screen to recover a garbled display.
Ctrl+V / Cmd+V
Paste an image from the clipboard as an [Image #N] chip.
Option/Alt+P
Switch model without clearing your prompt.
Option/Alt+T
Toggle extended thinking.
Option/Alt+O
Toggle fast mode.
Ctrl+A / Ctrl+E
Move cursor to start / end of the current line.
Ctrl+K / Ctrl+U / Ctrl+W
Delete to end of line / to line start / previous word (stored for paste).
Ctrl+Y
Paste text deleted with Ctrl+K/U/W; Alt+Y cycles paste history.
Alt+B / Alt+F
Move cursor back / forward one word.
Shift+Enter
New line in supported terminals; otherwise \\+Enter or Ctrl+J.
! at start
Shell mode: run a command directly and add its output to the session.
@
Mention a file path with autocomplete.
/ at start
Open the command / skill menu; type letters to filter.
Hold / tap Space
Voice dictation, when enabled.
13

Vim editor mode

Enable vim-style editing via /config → Editor mode. A condensed cheat sheet of the most-used motions and operators.

Modes
Esc NORMAL · i/I/a/A insert · o/O open line · v/V visual.
Move
h j k l · w/e/b words · 0/$/^ line · gg/G start/end.
Find char
f/F/t/T + char; ;/, repeat forward/reverse.
Delete / change
x char · dd/D line · dw/de/db · cc/C/cw change.
Yank / paste
yy/Y · yw/ye/yb · p/P paste after/before.
Other ops
>>/<< indent · J join · u undo · . repeat last change.
Text objects
With d/c/y: iw/aw, i"/a", i(, i[, i{ and their a variants.
Block-wise visual mode (Ctrl+V) is not supported. At the input edges, j/k and arrows navigate command history.
14

Build your own commands (skills)

Custom commands have merged into skills. A skill is a folder with a SKILL.md; the directory name becomes the command you type. You invoke it with /name, and Claude can load it automatically when relevant.

Personal
~/.claude/skills/<name>/SKILL.md — available across all your projects.
Project
.claude/skills/<name>/SKILL.md — committed to the repo, this project only.
Legacy command
.claude/commands/<name>.md still works; skills are recommended.
Plugin
<plugin>/skills/<name>/SKILL.md — namespaced as /plugin:name.
# ~/.claude/skills/fix-issue/SKILL.md
---
description: Fix a GitHub issue following our coding standards
argument-hint: [issue-number]
allowed-tools: Read Grep Bash(git *)
disable-model-invocation: true     # only you can trigger it
---

Fix GitHub issue $ARGUMENTS following our standards.

## Current changes
# Shell output is injected before Claude sees the file:
!`git diff HEAD`

# Then invoke it:  /fix-issue 123
$ARGUMENTS · $1 · $name
Substitute everything passed, a positional argument, or a declared named argument.
!`command`
Inject dynamic context — runs a shell command and inserts its output before Claude reads the skill.
context: fork
Run the skill in an isolated subagent; pair with agent: Explore for read-only research.
disable-model-invocation
Restrict to manual /name use — good for side-effecting actions like deploys.
MCP prompts
Connected servers expose prompts as commands: /mcp__<server>__<prompt>.
No matches. Press Esc to clear the filter.

This reference is compiled from the official Claude Code documentation. Commands, flags, and shortcuts evolve quickly and availability depends on your platform, plan, and version. When in doubt, type /help in a session or run claude --help.

Sources: code.claude.com/docs — commands, cli-reference, interactive-mode, skills · Compiled June 2026

Share:
Author

About DC

This is the author bio. Edit it from Blogger profile to introduce yourself to readers and tell them what your blog is about.

Comments