← All Claude Builds

Claude Code Reference Guide

Complete Reference — Click any item for details

Updated August 8, 2026

Built-in Slash Commands (89)

Type / in an interactive session. <arg> is required, [arg] optional. Not every command appears for every user — availability depends on platform, plan, and environment. Source: official docs

CommandDescription
/add-dir <path>Add a working directory for file access in this session (Tab completes partial paths)
/advisor [model|off]Consult a second model (opus or sonnet) for guidance at key moments in a task
/agentsPrints a reminder to ask Claude to create or manage subagents, or edit .claude/agents/ directly
/autocompact [auto|<tokens>]Set how full context gets before auto-compaction. Pass a size like 500k, or auto
/autofix-pr [prompt]Web session watches your branch's PR and pushes fixes for CI failures & review comments
/background [prompt]Detach the session to run as a background agent. Alias: /bg
/branch [name]Branch the conversation here and switch into the copy; the original is preserved
/btw <question>Ask a quick side question without adding it to the conversation
/bug [report]Report a bug or share your conversation, with a consent screen before anything is sent
/cd <path>Move the session to a new working directory (keeps the conversation & prompt cache)
/chromeConfigure Claude in Chrome settings (browser integration)
/clear [name]Start a new conversation with empty context. Aliases: /reset, /new
/color [color|default]Set prompt bar color: red, blue, green, yellow, purple, orange, pink, cyan
/compact [instructions]Free up context by summarizing the conversation, with optional focus instructions
/config [key=value ...]Open Settings, or set a key directly. Alias: /settings
/context [all]Visualize current context usage as a colored grid, with optimization suggestions
/copy [N]Copy the last assistant response to clipboard. Pass N for the Nth-latest
/costAlias for /usage — opens on the cost view
/design-loginAuthorize design-system access for /design-sync with your claude.ai account
/desktopContinue the session in the Claude Code Desktop app. Alias: /app
/diffInteractive diff viewer: uncommitted changes and per-turn diffs
/effort [level|auto]Set effort: low, medium, high, xhigh, max, ultracode. auto returns to the model default
/exitExit the CLI. In an attached background session this detaches instead. Alias: /quit
/export [filename]Export the conversation as plain text
/fast [on|off]Toggle Fast Mode — same model, faster output, higher cost per token
/feedback [report]Send product feedback. Opens the same dialog and consent step as /bug
/focusFocus view: your last prompt, a one-line tool-call summary with diffstats, and the response
/fork [prompt]Copy this conversation into a NEW BACKGROUND session and keep working here
/goal [condition|clear]Set a goal; Claude keeps working across turns until the condition is met
/heapdumpWrite a heap snapshot + memory breakdown for diagnosing high memory usage
/helpShow help and list all available commands
/hooksView hook configurations for tool events
/ideManage IDE integrations and show status
/import [codex|gemini]Bring config from OpenAI Codex or Google Gemini CLI into Claude Code
/initInitialize the project with a CLAUDE.md guide
/insightsGenerate a report analyzing your sessions, patterns, and friction points
/install-github-appInstall the Claude GitHub App for a repo, optionally wiring up Actions
/install-slack-appInstall the Claude Slack app (opens a browser for OAuth)
/keybindingsOpen your keyboard shortcuts file
/list-agentsList the subagents and other Claude Code sessions Claude can message
/loginSign in to your Anthropic account
/logoutSign out from your Anthropic account
/mcp [reconnect|enable|disable]Manage MCP server connections and OAuth; reconnect or toggle one server
/memoryEdit CLAUDE.md files, enable/disable auto-memory, view auto-memory entries
/mobileShow a QR code to download the mobile app. Aliases: /ios, /android
/model [model]Switch model and save it as your default (press s for session-only)
/passesShare a free week of Claude Code with friends (if your account is eligible)
/permissionsManage allow / ask / deny rules by scope. Alias: /allowed-tools
/plan [description]Enter plan mode, optionally starting immediately on the task you describe
/plugin [subcommand]Manage plugins: list, install, enable, disable
/powerupLearn Claude Code features through quick interactive lessons with animated demos
/privacy-settingsView and update privacy settings (Pro and Max only)
/radioOpen Claude FM lo-fi radio in your browser
/recapGenerate a one-line summary of the session so far
/release-notesBrowse the changelog with an interactive version picker
/reload-plugins [--force]Reload all active plugins without restarting; reports per-component counts and errors
/reload-skillsRe-scan skill and command directories for changes without restarting
/remote-controlMake the session available for Remote Control from claude.ai. Alias: /rc
/remote-envChoose the default environment for cloud agents
/rename [name]Rename the session. Without a name, auto-generates one
/resume [session]Resume by ID or name, or open the picker. Alias: /continue
/review [level] [pr#]Alias of /code-review — same effort levels and flags
/rewindRewind conversation and/or code to a checkpoint. Aliases: /checkpoint, /undo
/sandboxToggle sandbox mode (supported platforms only)
/schedule [description]Create, update, list or run cloud routines. Alias: /routines
/scroll-speedAdjust mouse-wheel scroll speed with a live preview (fullscreen renderer only)
/security-reviewAnalyze the branch diff for security vulnerabilities
/setup-bedrockInteractive wizard for Amazon Bedrock auth, region, and model pins
/setup-vertexInteractive wizard for Google Cloud Agent Platform auth, project, region, model pins
/skillsList available skills. Press t to sort by token count, Space to toggle visibility
/statsAlias for /usage — opens on the Stats tab
/statusVersion, model, account, connectivity, and session kind. Works during responses
/statuslineConfigure the terminal status line — describe what you want, or auto-configure
/stickersOrder Claude Code stickers
/stopStop the current background session (only while attached; transcript is kept)
/subtask <task>Spawn a forked subagent that inherits the conversation and reports back here
/tasksView and manage background work in this session. Alias: /bashes
/team-onboardingGenerate a teammate ramp-up guide from your last 30 days of usage
/teleportPull a Claude Code on the web session into this terminal. Alias: /tp
/terminal-setupConfigure terminal keybindings (Shift+Enter and friends)
/themeChange the color theme: auto, light/dark, colorblind-accessible, ANSI
/tui [default|fullscreen]Switch terminal renderer and relaunch into it with the conversation intact
/ultrareview [PR|branch]Deep multi-agent code review in a cloud sandbox. Same as /code-review ultra
/upgradeOpen the upgrade page to switch to a higher plan
/usageSession cost, plan limits, and activity stats (incl. per-skill / subagent / MCP breakdown)
/usage-creditsConfigure usage credits, or request them from your admin, when you hit a limit
/voice [hold|tap|off]Toggle voice dictation, or enable it in a specific mode
/web-setupConnect GitHub for Claude Code on the web using your local gh credentials
/workflowsWatch, pause, resume, or save running and completed multi-agent workflows

Retired: /ultraplan (removed — use plan mode), /pr-comments (removed v2.1.91 — just ask Claude to read the PR comments), /vim (removed v2.1.92 — use /config → Editor mode).

Bundled Skills (14 Native + Community)

Skills are prompts handed to Claude, so Claude can also invoke them on its own when relevant — except /verify and /code-review, which run only when you invoke them (changed in v2.1.215). A Workflow fans work out across many background subagents.

Native Skills & Workflows

SkillDescription
/batch <instruction>Decomposes a large-scale codebase change into 5–30 units and runs one background subagent per unit
/claude-api [migrate|prompt-audit]Claude API / Agent SDK / Managed Agents reference for your language. Auto-loads when your code imports anthropic
/code-review [level] [--fix] [--comment] [pr#|branch|path]Review the diff for correctness bugs & cleanup. Levels low→max, or ultra for the cloud review
/dataviz [request]Chart, graph and dashboard design — picks the form, assigns color by role, validates the palette for colorblind safety
/debug [description]Turn on debug logging mid-session and troubleshoot Claude Code itself from the debug log
/deep-research <question>Workflow. Fan out web searches, cross-check sources, synthesize a cited report
/design-sync [hint]Convert your repo's React design system and upload it to Claude Design so designs use your real components
/doctorFull setup checkup that diagnoses and can fix issues. Alias: /checkup
/fewer-permission-promptsScan transcripts for common read-only calls and write a permission allowlist
/loop [interval] [prompt]Run a prompt repeatedly. Omit the interval and Claude self-paces. Alias: /proactive
/runLaunch and drive your project's app to see a change actually working
/run-skill-generatorTeach /run and /verify how to build and launch your project
/simplify [target]Cleanup-only review (reuse, simplification, efficiency, altitude) that applies the fixes
/verifyBuild, run and observe your app to confirm a change does what it should

Community / Third-Party Skills

SkillDescription
/feature-devGuided feature development with architecture-first agents
/frontend-designDistinctive, intentional visual design for new or reshaped UI
/update-configConfigure hooks, permissions and env vars in settings.json
/keybindings-helpCustomize keyboard shortcuts and chord bindings
/security-reviewPlugin-provided security sweep (distinct from the built-in command)

CLI Commands (33)

Run from your shell before entering an interactive session.

CommandDescription
claudeStart an interactive session
claude "query"Start with an initial prompt
claude -p "query"Non-interactive: query via SDK, print, exit
cat file | claude -p "query"Process piped content
claude -cContinue the most recent conversation in this directory
claude -c -p "query"Continue via SDK (non-interactive)
claude -r "session" "query"Resume a session by ID or name
claude updateUpdate to the latest version
claude install [version]Install or reinstall the native binary (2.1.118, stable, latest)
claude doctorRead-only install & settings diagnostics without starting a session
claude auth loginSign in. Flags: --email, --sso, --console
claude auth logoutLog out
claude auth statusAuth status as JSON (--text for human-readable). Exit 0 if logged in
claude agentsAgent view: 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 (--all for every one)
claude stop <id>Stop a background session. Alias: claude kill
claude rm <id>Remove a background session from the list (transcript stays on disk)
claude daemon statusBackground-session supervisor state, version, socket dir, worker count
claude daemon stop --anyStop the supervisor and its sessions (--keep-workers leaves sessions running)
claude auto-mode defaultsPrint the built-in auto mode classifier rules as JSON
claude auto-mode resetRestore default auto mode config by removing autoMode from user settings
claude import [codex|gemini]Import config from other coding agents (--dry-run, --yes)
claude mcpInteractive MCP setup (see the MCP section)
claude mcp login <name>Run an MCP server's OAuth flow without opening the /mcp panel
claude mcp logout <name>Clear stored OAuth credentials for an MCP server
claude pluginManage plugins: init, details, prune, tag. Alias: claude plugins
claude gatewayStart the self-hosted Claude apps gateway server (admins: SSO + policy)
claude remote-controlStart a Remote Control server (no local interactive session). Flag: --name
claude project purge [path]Delete all local Claude Code state for a project
claude setup-tokenGenerate a long-lived OAuth token for CI and scripts
claude ultrareview [target]Run a deep cloud code review non-interactively (--json, --timeout)

CLI Flags (74)

Pass when launching from the terminal. Full reference: cli-reference

Session Control

FlagDescription
--continue, -cLoad the most recent conversation in this directory
--resume, -r <id>Resume by session ID or name, or show a picker
--from-pr <PR>Session picker filtered to sessions linked to a PR (GitHub, GitLab, Bitbucket)
--bg, --backgroundStart as a background agent and return immediately
--exec '<cmd>'Run a shell command as a PTY-backed background job (with --bg)
--fork-sessionWhen resuming, create a new session ID instead of reusing the original
--session-id <UUID>Use a specific session UUID
--name, -n <name>Name the session for display and resuming
--max-turns NLimit agentic turns (print mode)
--max-budget-usd NDollar cap before stopping; subagent spend counts toward it
--worktree, -w <name>Start in an isolated git worktree at .claude/worktrees/<name>
--autocompact <auto|tokens>Set this session's auto-compact window without changing saved settings
--no-session-persistenceDon't save the session to disk (print mode)

Model & Mode

FlagDescription
--model <name>Model alias (fable, opus, sonnet, haiku, best, opusplan) or full ID
--fallback-model <list>Auto-fallback when the primary is overloaded (comma-separated)
--permission-mode <mode>default (aka manual), acceptEdits, plan, auto, dontAsk, bypassPermissions
--advisor <model>Enable the server-side advisor tool (opus, sonnet, or a full model ID)
--effort <level>low, medium, high, xhigh, max, ultracode — levels depend on the model
--print, -pNon-interactive: print and exit
--bareMinimal: skip hooks, skills, plugins, MCP, auto memory, CLAUDE.md
--safe-modeStart with all customizations disabled (troubleshooting)

System Prompt

FlagDescription
--system-prompt "..."Replace the entire default system prompt
--system-prompt-file <path>Replace it with file contents
--append-system-prompt "..."Append to the default prompt
--append-system-prompt-fileAppend file contents to the default prompt
--append-subagent-system-promptAppend text to EVERY subagent's system prompt (print mode)
--exclude-dynamic-system-prompt-sectionsMove per-machine sections into the first user message (better cache hits)

Tools & Permissions

FlagDescription
--tools <list>Restrict built-in tools. "" disables all, "default" allows all
--allowedTools <list>Tools that run without a permission prompt
--disallowedTools <list>Deny rules; a bare tool name removes it from context entirely
--dangerously-skip-permissionsSkip permission prompts (= --permission-mode bypassPermissions)
--allow-dangerously-skip-permissionsAdd bypass to the Shift+Tab cycle without starting in it
--permission-prompt-tool <tool>MCP tool that handles permission prompts in non-interactive mode

Output & Input

FlagDescription
--output-format <fmt>text, json, stream-json
--input-format <fmt>text, stream-json
--json-schema '<json>'Validate the final output against a JSON Schema (print mode)
--include-partial-messagesInclude partial streaming events
--include-hook-eventsInclude hook lifecycle events in the output stream
--forward-subagent-textEmit subagent text and thinking blocks in the stream
--replay-user-messagesRe-emit stdin user messages on stdout for acknowledgment
--prompt-suggestionsEmit a predicted next user prompt after each turn
--verboseFull turn-by-turn logging

Extensions & Config

FlagDescription
--agent <name>Use a specific agent for the session
--agents '<json>'Define custom subagents via JSON
--add-dir <path>Add working directories
--mcp-config <path>Load MCP servers from JSON files or strings
--strict-mcp-configOnly use servers from --mcp-config
--plugin-dir <path>Load a plugin from a directory or .zip for this session
--plugin-url <url>Fetch a plugin .zip from a URL for this session
--settings <path>Settings JSON file or inline string; overrides the same keys for this session
--setting-sources <list>Which settings to load: user, project, local
--ideAuto-connect to the IDE on startup
--chromeEnable Chrome browser integration
--no-chromeDisable Chrome integration
--betas <headers>Beta headers for API requests (API key users)
--disable-slash-commandsDisable all skills and commands
--initRun Setup hooks with the init matcher, then start (print mode)
--init-onlyRun Setup + SessionStart hooks, then exit
--maintenanceRun Setup hooks with the maintenance matcher (print mode)

Remote & Collaboration

FlagDescription
--cloud "task"Create a web session on claude.ai, or target an existing session ID / URL
--environment <id>Create the cloud session on a named environment (with -p)
--ref <branch>Base the new session's checkout on a named ref instead of local HEAD
--remote "task"Deprecated alias for --cloud
--remote-control, --rcEnable Remote Control from claude.ai
--remote-control-session-name-prefixPrefix for auto-generated Remote Control session names
--teleportResume a web session in your local terminal
--teammate-mode <mode>Agent team display: in-process (default), auto, tmux, iterm2
--tmuxCreate a tmux session for the worktree (iTerm2 panes when available)
--channels <list>MCP channel notifications to listen for (research preview)

Accessibility & Diagnostics

FlagDescription
--ax-screen-readerFlat screen-reader output: no decorative borders or animations
--version, -vShow the version number
--debug [categories]Debug mode, e.g. --debug='mcp,startup' or --debug='!1p'
--debug-file <path>Write debug logs to a specific file (implies --debug)
--dangerously-load-development-channelsLoad channels that are not on the approved allowlist, for local development

Keyboard Shortcuts

Press ? on an empty prompt to see the shortcuts for your environment. Source: interactive-mode

General Controls

Interrupt, or clear inputCtrl+C
Interrupt Claude, or close a dialogEsc
Clear input draft, or open the rewind menuEsc Esc
Exit the session (EOF)Ctrl+D
Cycle permission modesShift+Tab
Open agent view (from an empty prompt) — a single press since v2.1.198
Stop all running background subagents (press twice within 3s)Ctrl+X Ctrl+K
Open the prompt in your default text editorCtrl+G / Ctrl+X Ctrl+E
Redraw the screenCtrl+L
Toggle the transcript viewerCtrl+O
Reverse-search command historyCtrl+R
Paste an image from the clipboardCtrl+V / Alt+V (Win & WSL)
Background running tasksCtrl+B
Toggle Claude's task checklistCtrl+T
Stash or restore the promptCtrl+S
Suspend Claude CodeCtrl+Z
Cycle dialog tabsLeft / Right
Move the cursor, or navigate command historyUp / Down or Ctrl+P / Ctrl+N
Switch modelAlt+P (Option+P)
Toggle extended thinkingAlt+T (Option+T)
Toggle fast modeAlt+O (Option+O)
Toggle the shortcut help panel (on empty input)?

Text Editing

Move to start of the current lineCtrl+A
Move to end of the current lineCtrl+E
Delete to end of lineCtrl+K
Delete from cursor to line startCtrl+U
Delete the previous wordCtrl+W
Paste deleted textCtrl+Y
Cycle paste history (after Ctrl+Y)Alt+Y
Move back one wordAlt+B
Move forward one wordAlt+F
Undo the last input editCtrl+_ / Ctrl+Shift+-

Multiline Input

Newline (works in every terminal)\ + Enter
Newline (macOS)Option+Enter
Newline (native in iTerm2, WezTerm, Ghostty, Kitty, Warp, Apple Terminal, Windows Terminal)Shift+Enter
Insert a line-feed characterCtrl+J

Transcript Viewer (Ctrl+O)

Show the full shortcut panel (fullscreen renderer)?
Jump to the previous / next user prompt{ / }
Toggle show-all content (classic renderer only)Ctrl+E
Write the conversation to native terminal scrollback so Cmd+F can search it[
Open the conversation in $VISUAL / $EDITORv
Exit the transcript viewq / Ctrl+C / Esc

Side-Question Overlay (/btw)

Dismiss the answer and return to the promptSpace / Enter / Esc
Scroll the answerUp / Down
Step between this and earlier /btw answersLeft / Right
Copy the answer as raw Markdownc
Fork into a new session carrying this Q&Af
Clear the list of earlier /btw exchangesx

Voice

Voice dictationHold or tap Space

Vim Mode

Enable via /config → Editor mode (/vim was removed in v2.1.92). Map insert-mode escapes like jj with the vimInsertModeRemaps setting. Source: interactive-mode

Mode Switching

KeyAction
EscEnter NORMAL mode
i / IInsert before cursor / at line start
a / AInsert after cursor / at line end
o / OOpen a line below / above
v / VStart character-wise / line-wise visual selection

Navigation

KeyAction
h / j / k / lMove left / down / up / right (Space also moves right)
w / e / bNext word / end of word / previous word
0 / $ / ^Beginning / end / first non-blank of line
gg / GBeginning / end of input
f / F / t / T {char}Jump to / just before the next or previous occurrence
; / ,Repeat the last f/F/t/T motion, forward / in reverse
/Open reverse history search (same as Ctrl+R)

Editing

KeyAction
x / dd / DDelete character / line / to end of line
dw / de / dbDelete word / to end / back
cc / CChange line / to end of line
cw / ce / cbChange word / to end / back
s / SSubstitute character / line, then enter INSERT (v2.1.211+)
yy / YYank (copy) line
yw / ye / ybYank word / to end / back
p / PPaste after / before cursor
>> / <<Indent / dedent line
JJoin the current line with the next
uUndo
.Repeat the last change

Text Objects

KeyAction
iw / awInner / around word
iW / aWInner / around WORD (whitespace-delimited)
i" / a"Inner / around double quotes
i' / a'Inner / around single quotes
i( / a(Inner / around parentheses
i[ / a[Inner / around brackets
i{ / a{Inner / around braces

Visual Mode Operators

KeyAction
d / x / y / c / sDelete / yank / change the selection
pReplace the selection with the register contents
r{char}Replace every selected character
~ / u / UToggle, lowercase, or uppercase the selection
> / <Indent or dedent the selected lines
oSwap cursor and anchor

Counts

KeyAction
{count}{motion}Repeat a motion N times, e.g. 3dd, 5j, 2dw

Prompt Notation

Special characters that change what your input means.

/ — at the start: run a command or skill
!<command> — shell mode: run it directly, add the output to the session, and Claude responds to it
@<path> — file path mention (triggers autocomplete)
:name: — emoji shortcode (v2.1.217+); disable with the emojiCompletionEnabled setting
? — on empty input: toggle the shortcut help panel
ultrathink — anywhere in a message: deep reasoning for that one turn
ultracode — anywhere in a message: opt in to a dynamic multi-agent workflow

Connectors & Integrations

Full directory: claude.com/connectors (50+)

Your Active Connections (27 servers)

Notion

Pages, databases, views, comments, search, move, duplicate

Slack

Messages, channels, canvases, search public and private

Gmail

Read messages and threads, search, drafts, labels

Google Drive

Search, read and create files

Google Calendar

Read and manage events

Microsoft 365

Outlook, OneDrive and Office files

Canva

Designs and brand assets

Spotify

Playback, playlists and library

Zapier

Fire Zaps and reach thousands of apps

Intuit QuickBooks

Invoices, estimates, payroll, P&L and aging reports

Intuit TurboTax

Tax interview, checklist, estimate and expert search

Windsor.ai

Marketing and ad-platform data

Supabase

SQL, edge functions, migrations, branches, advisors

Workflowy (Custom)

Read, write, search, complete, move, force-sync

Discord (Custom)

Fetch, reply, react, edit, download attachments

OBS (Custom)

Scenes, sources, filters, transforms, recording and streaming

Premiere (Custom)

Project state, timeline, markers, effects, scripting bridge

SQLite / RAG (Custom)

Two servers over rag.db — query and write the personal knowledge base

ForgeFlow (Custom)

Book-corpus RAG plus a capture server that writes insights back into it

The Table (Custom)

Board-game state: read the table and lore, file proposals

Playwright

Browser automation: navigate, click, fill, screenshot, evaluate

Context7

Current documentation and code examples for any library

Adobe for Creativity

Express, image editing, video, fonts, asset storage

Image generation

Nano Banana, OpenAI Image, Higgsfield

Popular Available

GitHub

Repos, PRs, issues, CI/CD, code review

Linear

Issue tracking, project management

Jira

Issues, sprints, Atlassian ecosystem

Figma

Design files, component inspection

Stripe

Payments, subscriptions

Airtable

Structured data management

PostgreSQL

Natural language DB queries

Sentry

Error tracking and analysis

Puppeteer

Browser automation, scraping

Environment Variables (100 of 315)

The ones worth knowing, curated from the 315 documented variables. Full list: env-vars docs

API & Authentication

VariableDescription
ANTHROPIC_API_KEYAPI key sent as the X-Api-Key header
ANTHROPIC_AUTH_TOKENCustom value for the Authorization header
ANTHROPIC_BASE_URLOverride the API endpoint (proxy or LLM gateway)
CLAUDE_CODE_OAUTH_TOKENLong-lived OAuth token for CI and scripts (from claude setup-token)
ANTHROPIC_BETASComma-separated extra anthropic-beta header values
ANTHROPIC_CUSTOM_HEADERSCustom headers added to every request
CLAUDE_CODE_CERT_STORECA certificate sources for TLS (corporate roots)
CLAUDE_CODE_CLIENT_CERTClient certificate path for mTLS (with _CLIENT_KEY)

Provider Configuration

VariableDescription
ANTHROPIC_MODELOverride the default model selection
ANTHROPIC_DEFAULT_OPUS_MODELPin what the opus alias resolves to (same for SONNET / HAIKU / FABLE)
ANTHROPIC_CUSTOM_MODEL_OPTIONAdd a custom entry to the /model picker
CLAUDE_CODE_USE_BEDROCKUse Amazon Bedrock as the provider
CLAUDE_CODE_USE_VERTEXUse Google Cloud's Agent Platform as the provider
CLAUDE_CODE_USE_FOUNDRYUse Microsoft Foundry as the provider
CLAUDE_CODE_USE_ANTHROPIC_AWSUse Claude Platform on AWS as the provider
ANTHROPIC_BEDROCK_REGION_PREFIXCross-region inference profile prefix for Bedrock
ANTHROPIC_BEDROCK_SERVICE_TIERBedrock service tier: default, flex, or priority
ANTHROPIC_BEDROCK_BASE_URLCustom Bedrock endpoint URL
ANTHROPIC_VERTEX_PROJECT_IDGCP project ID for Agent Platform requests
ANTHROPIC_VERTEX_BASE_URLCustom Agent Platform endpoint URL
AWS_BEARER_TOKEN_BEDROCKBedrock API key for authentication

Behavior & Effort

VariableDescription
CLAUDE_CODE_EFFORT_LEVELEffort: low, medium, high, xhigh, max, auto
MAX_THINKING_TOKENSThinking-token budget; 0 disables extended thinking
CLAUDE_CODE_DISABLE_THINKINGTurn extended thinking off entirely
CLAUDE_CODE_DISABLE_ADAPTIVE_THINKINGDisable adaptive reasoning (fixed thinking budget instead)
CLAUDE_CODE_MAX_OUTPUT_TOKENSMax model output tokens per response
CLAUDE_CODE_MAX_CONTEXT_TOKENSCap the usable context window
CLAUDE_CODE_AUTO_COMPACT_WINDOWAuto-compact window in tokens (100k–1M)
CLAUDE_AUTOCOMPACT_PCT_OVERRIDEPercentage full at which auto-compaction fires
CLAUDE_CODE_SAFE_MODEStart with all customizations disabled (same as --safe-mode)
CLAUDE_CODE_USE_POWERSHELL_TOOLUse PowerShell as the primary shell on Windows
CLAUDE_CODE_SHELLOverride the shell Claude Code runs Bash commands in
CLAUDE_CODE_GIT_BASH_PATHPath to Git Bash on Windows
CLAUDE_CODE_DISABLE_BUNDLED_SKILLSHide bundled skills and workflows from the model
CLAUDE_CODE_DISABLE_AUTO_MEMORYDisable automatic memory
CLAUDE_CODE_DISABLE_CLAUDE_MDSSkip loading CLAUDE.md files
CLAUDE_CODE_NEW_INITUse the interactive /init flow (skills, hooks, memory)
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFICDisable telemetry and other non-essential network calls
CLAUDE_CONFIG_DIRRelocate the ~/.claude configuration directory

Subagents, Workflows & Limits

VariableDescription
CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTSConcurrently running subagents (default 20)
CLAUDE_CODE_MAX_SUBAGENTS_PER_SESSIONPer-session subagent spawn cap (default 200; reset by /clear)
CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTHNested subagent depth (default 3; set 1 to disable nesting)
CLAUDE_CODE_SUBAGENT_MODELModel used for subagents
CLAUDE_CODE_MAX_WEB_SEARCHES_PER_SESSIONSession-wide WebSearch limit (default 200)
CLAUDE_CODE_FORWARD_SUBAGENT_TEXTEmit subagent text/thinking in stream-json
CLAUDE_CODE_DISABLE_WORKFLOWSDisable dynamic multi-agent workflows
CLAUDE_CODE_TASK_LIST_IDNamed task list shared across sessions
CLAUDE_CODE_MAX_TURNSMax agentic turns per session
CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCYMax tool calls run in parallel

Display, Input & Accessibility

VariableDescription
CLAUDE_AX_SCREEN_READERScreen-reader friendly plain-text rendering
CLAUDE_CODE_ACCESSIBILITYKeep the native terminal cursor visible
CLAUDE_CODE_SYNC_SKILLSDownload your claude.ai skills into ~/.claude/skills/ and resync them
CLAUDE_CODE_DISABLE_MOUSE_CLICKSDisable mouse click/drag/hover in fullscreen (wheel still scrolls)
CLAUDE_CODE_SCROLL_SPEEDMouse-wheel scroll speed
CLAUDE_CODE_SYNTAX_HIGHLIGHTToggle syntax highlighting in code blocks
CLAUDE_CODE_DISABLE_ALTERNATE_SCREENForce the classic renderer instead of fullscreen
CLAUDE_CODE_ENABLE_PROMPT_SUGGESTIONEnable predicted next-prompt suggestions
CLAUDE_CODE_ENABLE_AWAY_SUMMARYShow a session recap when you return
CLAUDE_CODE_HIDE_CWDHide the working directory from the UI (screen sharing)
FORCE_HYPERLINKForce (or with 0, disable) terminal hyperlinks

Timeouts & Reliability

VariableDescription
BASH_DEFAULT_TIMEOUT_MSDefault bash timeout (default 120000)
BASH_MAX_TIMEOUT_MSMax bash timeout the model can set (default 600000)
BASH_MAX_OUTPUT_LENGTHMax characters of bash output read back (default 30000)
API_TIMEOUT_MSAPI request timeout (default 600000)
CLAUDE_ENABLE_STREAM_WATCHDOGStreaming idle watchdog — on by default; 0 disables
CLAUDE_CODE_MAX_RETRIESRetry attempts on transient API errors (default 300)
MAX_MCP_OUTPUT_TOKENSMax tokens of MCP output (default 25000)
MCP_TIMEOUTMCP server startup timeout (ms)
MCP_TOOL_TIMEOUTPer-tool MCP execution timeout (ms)
CLAUDE_CODE_MCP_AUTO_BACKGROUND_MSAuto-background MCP calls longer than this (default 2 min)

Network & Proxy

VariableDescription
HTTP_PROXYHTTP proxy URL for outbound requests
HTTPS_PROXYHTTPS proxy URL for outbound requests
NO_PROXYComma-separated hosts that bypass the proxy
CLAUDE_CODE_PROXY_RESOLVES_HOSTSLet the proxy resolve DNS instead of the client

Features & Toggles

VariableDescription
CLAUDE_CODE_DISABLE_1M_CONTEXTHold 1M-context models to 200K via auto-compaction
CLAUDE_CODE_ENABLE_AUTO_MODEEnable auto mode (already default on Bedrock / Vertex / Foundry)
CLAUDE_CODE_DISABLE_AGENT_VIEWDisable the agent view
CLAUDE_CODE_DISABLE_BACKGROUND_TASKSDisable background tasks
CLAUDE_CODE_DISABLE_CRONStop scheduled jobs
DISABLE_COMPACTTurn off all compaction — both automatic and the /compact command
CLAUDE_CODE_DISABLE_FAST_MODEDisable Fast Mode
CLAUDE_CODE_DISABLE_FILE_CHECKPOINTINGDisable file checkpoints (breaks /rewind of code)
ENABLE_CLAUDEAI_MCP_SERVERSEnable or disable claude.ai-hosted MCP servers
ENABLE_TOOL_SEARCHMCP tool deferral: true, auto, auto:N, false
CLAUDE_CODE_ENABLE_TELEMETRYEnable OpenTelemetry usage telemetry
DO_NOT_TRACKOpt out of tracking entirely
DISABLE_AUTOUPDATERDisable automatic updates
DISABLE_UPDATESBlock ALL update paths, including manual claude update
DISABLE_AUTO_COMPACTTurn off automatic compaction
DISABLE_COST_WARNINGSSuppress cost warnings

Debug & Development

VariableDescription
CLAUDE_CODE_DEBUG_LOGS_DIROverride where debug logs are written
CLAUDE_CODE_DEBUG_LOG_LEVELverbose, debug, info, warn, error
DEBUGStandard debug flag honoured by Claude Code
USE_BUILTIN_RIPGREPUse the bundled ripgrep (0 uses your system install)
CLAUDE_CODE_SESSION_IDSession ID, exported to subprocesses and MCP servers
CLAUDECODESet to 1 inside every subprocess Claude Code spawns
CLAUDE_PIDPID of the Claude Code process
CLAUDE_ENV_FILEPath to an env file loaded at startup
CLAUDE_CODE_PROCESS_WRAPPERCorporate launcher wrapped around every self-spawn
CLAUDE_CODE_TMPDIROverride the temp directory Claude Code uses

MCP Server Management

Source: MCP docs

CommandDescription
claude mcpInteractive MCP setup wizard
claude mcp listList all configured servers
claude mcp get <name>Show details for a specific server
claude mcp add <name> <cmd>Add stdio transport server
claude mcp add --transport sseAdd SSE transport server (deprecated — use HTTP)
claude mcp add --transport httpAdd HTTP transport server
claude mcp add-json <name> '<json>'Add from raw JSON config
claude mcp add-from-claude-desktopImport from Claude Desktop config
claude mcp remove <name>Remove a configured server
claude mcp reset-project-choicesReset approval choices for project-scoped servers
claude mcp serveRun Claude Code as an MCP server
claude mcp login <name>Run a server’s OAuth flow without opening the /mcp panel
claude mcp logout <name>Clear stored OAuth credentials for a server (v2.1.186+)
/mcp reconnect <server>Reconnect one disconnected server from inside a session
/mcp enable|disable [server|all]Turn servers on or off for this session

Best Practices (Top 10)

Patterns that produce the best results. Source: best-practices

PracticeWhy & How
Give Claude a way to verify its workThe single highest-leverage thing you can do. Provide tests, screenshots, or expected outputs so Claude can self-check.
Explore first, plan, then codeUse Plan Mode (Shift+Tab) to research the codebase, create a plan, then switch to Normal Mode to implement. Skip for trivial tasks.
Be specific with contextReference files with @, mention constraints, point to example patterns. "Fix the login bug where users see a blank screen after timeout" beats "fix the login bug."
/clear between unrelated tasksLong sessions with mixed topics fill context with irrelevant info. Fresh context = better results.
Course-correct early and oftenPress Esc to stop, Esc+Esc to rewind, "undo that" to revert. After 2 failed corrections, /clear and start fresh with a better prompt.
Use subagents for investigationSubagents explore in separate context windows. "Use subagents to investigate how auth handles token refresh" keeps your main context clean.
Write an effective CLAUDE.mdKeep it short. Only include things Claude can't infer from code. Prune regularly. If Claude ignores rules, the file is too long.
Let Claude interview youFor complex features: "I want to build [X]. Interview me using AskUserQuestion. Dig into edge cases." Then write a spec and start fresh.
Avoid kitchen-sink sessionsDon't mix unrelated tasks in one session. Context gets polluted with irrelevant info. Use /clear or start a new session.
Scale with parallel sessionsRun multiple Claude sessions in worktrees, use Writer/Reviewer pattern, or fan out across files with claude -p in a loop.

Common Workflows

Quick reference for everyday tasks. Source: common-workflows

WorkflowExample Prompts
Explore a codebase"Give me an overview of this codebase" → "Explain the main architecture" → "How is auth handled?"
Find relevant code"Find the files that handle user authentication" → "Trace the login process front-end to database"
Fix bugs"I'm seeing this error when I run npm test" → "Suggest fixes" → "Apply the null check fix"
Refactor code"Find deprecated API usage" → "Refactor utils.js to ES2024" → "Run tests to verify"
Write tests"Find untested functions in NotificationsService" → "Add tests" → "Add edge cases" → "Run and fix"
Create pull requests"Summarize my changes" → "Create a PR" → "Add more context about security improvements"
Handle documentation"Find undocumented functions in auth" → "Add JSDoc comments" → "Check against project standards"
Work with imagesDrag/drop or Ctrl+V to paste screenshots. "Here's the error screenshot. What's causing it?"
Plan complex changesEnter Plan Mode (Shift+Tab) → "I need to add OAuth2. What files change?" → Switch to Normal → "Implement the plan"
Use as Unix utilitycat error.log | claude -p "explain this error" > output.txt
Run on a schedule/schedule "Review open PRs every morning" — Cloud, Desktop, GitHub Actions, or /loop options

Subagents, Teams & Orchestration

Claude Code fans work out across background workers by default. Source: sub-agents

ConceptDescription
Subagents run in the backgroundSince v2.1.198 subagents run in the background by default, so the main session keeps working while they do. Watch them with /tasks or the agent view.
/subtask <task>Spawns a FORKED subagent that inherits the whole conversation, works in the background, and reports its result back into this conversation.
/fork vs /branch vs /subtask/fork copies the conversation into a new BACKGROUND session (you stay here). /branch copies it and switches YOU into the copy. /subtask delegates one job and returns the answer here.
Agent view (← or claude agents)One list of every session — running, needs-input, completed — where you can dispatch, attach, respawn and delete. The Notification hook fires agent_needs_input and agent_completed.
Nested subagents (depth 3)Subagents may spawn their own subagents up to depth 3 (v2.1.219). Set CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH=1 to switch nesting off.
Concurrency & spawn caps20 subagents run concurrently by default (CLAUDE_CODE_MAX_CONCURRENT_SUBAGENTS). The old 200-per-session cap was removed in v2.1.224.
Dynamic workflows (ultracode)Put ultracode in a prompt to opt in to a scripted multi-agent workflow. Size is advisory via workflowSizeGuideline (small/medium/large); watch runs with /workflows.
Cross-session messagingSessions can message each other by name: /list-agents to discover them, then SendMessage. Approval and delivery are governed by crossSessionInbound and dialogExpiry.
--teammate-mode <mode>How agent-team teammates display: in-process (default), auto, tmux, or iterm2.
Shared task listsSet CLAUDE_CODE_TASK_LIST_ID to share one named task list across several sessions.
Agent config filesDefine agents in .claude/agents/*.md with frontmatter (name, model, tools, effort, isolation). Names can’t contain : — that’s reserved for plugin namespacing.
Worktree isolationisolation: worktree (or -w) gives an agent its own git worktree so parallel edits can’t collide. It’s auto-removed if nothing changed.
Writer / Reviewer patternOne agent writes, another reviews in clean context. Pair with worktrees for isolation.
Fan-out patternclaude -p in a loop, or /batch, to process many files with separate agent instances.

Output Styles

Output styles change how Claude responds, not what it knows — they rewrite part of the system prompt. Set one with /config → Output style, or put "outputStyle" in a settings file. There is no environment variable for this, and the old /output-style command was removed in v2.1.91. Source: output-styles

StyleDescription
DefaultThe standard software-engineering prompt. Concise, action-oriented, minimal explanation.
ProactiveClaude executes immediately and makes reasonable assumptions instead of pausing for routine decisions. Stronger than auto mode, and it does not change your permission mode — you still get permission prompts.
ExplanatoryIncludes reasoning and context behind decisions. Good for code review and learning why.
LearningDetailed explanations with concepts, analogies, and background. Best for beginners and unfamiliar domains.

Cost Management

Monitor and control token usage. Source: costs

ToolDescription
/usage (and /cost, /stats)One command with three views. /cost opens the session cost view, /stats the Stats tab. On paid plans it breaks usage down by skill, subagent, plugin and MCP server.
--max-budget-usd NHard dollar cap; spend from subagents counts toward it, and reaching it also stops background subagents.
/autocompact <size>Set how full context gets before it compacts (e.g. 500k). A smaller window compacts sooner and keeps per-request cost down.
Token reduction/compact to compress, /clear between unrelated tasks, subagents to keep research out of your main context.
Model selectionHaiku 4.5 is cheapest. Sonnet 5 is the everyday default. Opus 5 and Fable 5 cost more and are for the hardest work.
Effort levelLower effort = fewer thinking tokens = lower cost. /effort low for mechanical tasks; xhigh/max only when it earns its keep.
Fast mode is a cost dialFast Mode is the SAME model delivered faster at a higher price per token — not a cheaper or weaker model.
/usage-creditsConfigure (or request from your admin) extra capacity for when you hit a plan limit.

CI/CD Integration (Automated Workflows)

Use Claude Code in automated systems that test and deploy code. Source: GitHub Actions

PatternDescription
GitHub ActionsUse claude -p in workflow YAML. Set ANTHROPIC_API_KEY as repo secret. Use /install-github-app for PR review.
GitLab CIAdd claude -p steps to .gitlab-ci.yml. Same flags and env vars as local usage.
--print ModeNon-interactive output for automation. Pair with --output-format json for structured results.
--dangerously-skip-permissionsSkip permission prompts in CI. Requires --allow-dangerously-skip-permissions first.
Cost ControlsUse --max-turns N and --max-budget-usd N to cap CI agent runs.

Troubleshooting Quick Reference

Most common issues and fixes. Full guide: troubleshooting

ProblemFix
"command not found: claude"Add ~/.local/bin to your PATH. See /doctor for diagnostics.
403 Forbidden after loginCheck subscription at claude.ai/settings. Unset ANTHROPIC_API_KEY if it overrides your sub.
OAuth error: Invalid codeRetry quickly. Press c to copy URL if browser doesn't open. Check if remote/SSH opened on wrong machine.
Repeated permission promptsUse /permissions to allowlist specific tools. Or use Shift+Tab to switch to Accept Edits mode.
High CPU / memory usageUse /compact regularly. /clear between tasks. Add build dirs to .gitignore.
Command hangs or freezesCtrl+C to cancel. If unresponsive, close terminal and restart.
Search / @file not workingInstall system ripgrep: brew install ripgrep (mac), apt install ripgrep (linux), winget install BurntSushi.ripgrep.MSVC (win)
Esc key not working in JetBrainsSettings → Tools → Terminal → uncheck "Move focus to editor with Escape"
WSL installation issuesEnsure node/npm point to Linux paths (/usr/), not Windows (/mnt/c/). Use nvm for node management.
Reset all settingsrm ~/.claude.json && rm -rf ~/.claude/ (removes all settings, MCP configs, session history)
TLS / certificate errorsCheck proxy or corporate cert config. Set NODE_EXTRA_CA_CERTS to your CA bundle path.
ECONNREFUSED on MCP serverEnsure MCP server process is running. Check port/path. Run claude mcp list to verify config.
Background agent stops respondingCheck the supervisor first: claude daemon status. Restart the session with claude respawn <id>, or stop the daemon with claude daemon stop --any.
Claude ignoring your rules, or acting strangelyStart with --safe-mode: it disables CLAUDE.md, skills, plugins, hooks and MCP. If the problem disappears, one of your customizations is the cause.
Login expires mid-runClaude Code warns 3 days ahead. For CI and long unattended work use claude setup-token and CLAUDE_CODE_OAUTH_TOKEN instead of an interactive login.
Too many MCP tools eating contextTurn servers off per session with /mcp disable <server>, or set ENABLE_TOOL_SEARCH so tool schemas load on demand instead of up front.
Something is wrong but you can't say whatRun /doctor (alias /checkup). It finds duplicate installs, PATH problems, unparseable settings, and unused skills, and offers to fix them.
Context window exceededUse /compact to compress history, /clear between tasks, or start a new session. Check /context for usage.

Glossary (75 terms, A-Z)

Every key term you'll encounter when using Claude Code, sorted alphabetically.

TermDefinition
Adaptive ReasoningRecent Claude models (Sonnet 5, Opus 5, Opus 4.8, Fable 5) decide how much to think on each step from your effort level, rather than spending a fixed budget. Harder steps get more thinking automatically.
Agent / Agentic LoopClaude Code operates as an "agent" — it doesn't just answer questions, it autonomously reads files, runs commands, makes changes, and iterates. The "agentic loop" is the cycle of thinking, acting, observing, and acting again.
AliasAn alternative name for a command. Example: /rc is an alias for /remote-control. /reset and /new are aliases for /clear. Both do the same thing.
API (Application Programming Interface)A way for software to communicate with other software. Claude Code uses APIs to talk to Anthropic's servers (Claude API), external services (via MCP), and your local tools.
API KeyA secret string that authenticates you with a service. Like a password for software. Your Workflowy API key lets Claude talk to Workflowy. Never share API keys publicly.
Auto ModeA permission mode where a separate classifier model reviews commands and blocks risky ones, while letting routine work proceed without prompts. Enable with --permission-mode auto or the Shift+Tab cycle.
Background TaskA command or process running behind the scenes while you continue working. Start with Ctrl+B or the & prefix. Check status with /tasks.
Bash / ShellThe command-line interpreter that runs terminal commands. When Claude "runs a bash command," it's executing a terminal command like git status, npm install, etc. Claude Code uses bash on macOS/Linux and Git Bash on Windows.
Bearer TokenAn authentication method where you send "Bearer [token]" in the request header. Used by Workflowy API, many other APIs. The word "Bearer" is literal — you type it before the key.
CheckpointAn automatic save point taken before Claude changes files. Rewind conversation and/or code with Esc Esc or /rewind. Persists across sessions.
CLAUDE.mdA persistent instruction file Claude reads at every session start. Contains project conventions, preferences, and rules. Global (~/.claude/CLAUDE.md) applies everywhere; project-level (./CLAUDE.md) applies to that repo. Check project-level into git.
CLI (Command-Line Interface)A text-based way to interact with software by typing commands. Claude Code's CLI is the terminal-based interface where you type prompts and commands. Contrast with GUI (graphical interface).
CompactionCompressing conversation history to free context space. Happens automatically near context limits, or manually with /compact [focus]. Preserves key decisions, code patterns, and file states while summarizing older messages.
ConnectorA verified MCP server integration in Claude's directory (claude.com/connectors). Examples: Notion, Slack, Gmail. Connectors give Claude tools to read/write external services. Custom connectors can be added via MCP URLs.
Context WindowThe total text Claude can hold in working memory. Sonnet 5 and Opus 5 have a native 1M-token window (~750K words); older models are 200K. Use /context to check, /compact or /autocompact to manage it.
Cron / Scheduled TaskA task that runs automatically on a schedule (e.g., every morning, every hour). Set up with /schedule. Can run in the cloud (even when your computer is off) or locally via the desktop app.
DiffA visual comparison showing what changed between two versions of code. Green = added, red = removed. Claude shows diffs before applying edits. View with /diff.
Effort LevelControls how deeply Claude thinks. Low = fast and cheap; medium; high (the default on every model that supports effort); xhigh; max (session-only). Set with /effort or --effort.
Environment Variable (Env Var)A named value stored in your system that software can read. Example: WORKFLOWY_API_KEY=abc123. Set in your shell profile (~/.bashrc) or system settings. Claude Code uses many env vars for configuration.
Extended ThinkingWhen Claude reasons step-by-step internally before responding. Enabled by default. Visible in verbose mode (Ctrl+O) as gray italic text. Controlled by effort level on recent models. Toggle with Alt+T.
Fable (Claude model)Claude Fable 5 — Anthropic's “Mythos-class” model for tasks larger than a single sitting. It is NOT the default on any plan; choose it with /model fable or the best alias.
Fast ModeMakes Opus produce output substantially faster at a higher cost per token — the same model, delivered quicker. Opus only. Toggle with /fast or Alt+O.
FlagAn option you pass when launching a command, prefixed with -- (double dash) or - (single dash). Example: claude --model opus sets the model. Flags modify how a command behaves. Also called "options" or "switches."
FrontmatterMetadata at the top of a file between --- markers. Used in SKILL.md and agent .md files to define name, description, tools, and behavior. Written in YAML format.
GitVersion control system that tracks changes to code. Claude Code uses git for checkpoints, diffs, commits, branches, PRs, and worktrees. Most Claude Code features assume a git repository.
Haiku (Claude model)The fastest and cheapest Claude model — good for simple, high-volume tasks. Current version: Haiku 4.5.
Headless ModeRunning Claude Code non-interactively with the -p flag. Claude processes the prompt and exits. No back-and-forth conversation. Used in scripts, CI/CD, and automation.
HookA shell command that runs automatically in response to Claude Code events (file edits, tool calls, notifications). Unlike CLAUDE.md instructions (which are advisory), hooks are deterministic — they always execute. Configured in settings.json.
JSON (JavaScript Object Notation)A data format using key-value pairs in curly braces: {"name": "value"}. Used everywhere in Claude Code: settings files, API requests/responses, MCP configs, output formats.
MCP (Model Context Protocol)An open standard by Anthropic for connecting AI to external tools and data. Each MCP server provides "tools" Claude can call. Examples: Notion MCP gives Claude database tools; your Workflowy MCP gives Claude node read/write tools.
ModelThe AI brain behind the responses. Opus 5 (flagship, 1M context), Sonnet 5 (the everyday default, native 1M context), Haiku 4.5 (fastest and cheapest), Fable 5 (longest autonomous runs). Switch with /model or Alt+P.
Node.jsA JavaScript runtime that lets you run JavaScript outside a browser. Many MCP servers (including your Workflowy one) are built with Node.js. Required to run custom MCP servers.
OAuthAn authentication protocol where you authorize access through a browser login rather than sharing your password directly. Used when connecting Claude to services like Slack or GitHub.
Opus (Claude model)The flagship line for complex reasoning and large codebases. Current version: Opus 5, with a 1M-token context window. Opus 4.8 is still selectable.
PATHA system environment variable listing directories where your OS looks for executable programs. If "command not found" after install, the install directory isn't in your PATH.
Permission ModeControls how much autonomy Claude has. Manual (the renamed “default” — asks for everything), Accept Edits, Plan (read-only), Auto (a classifier vets each command), Don't Ask, and Bypass. Cycle with Shift+Tab.
Pipe ( | )The | character chains commands together, sending the output of one command as input to the next. Example: cat file.txt | claude -p "explain this" sends the file content to Claude.
Plan ModeA permission mode where Claude analyzes and plans but doesn't write code or run commands. Uses AskUserQuestion to gather requirements. Good for exploring before implementing. Toggle with Shift+Tab or --permission-mode plan.
PluginAn installable package that bundles skills, hooks, agents, and MCP servers into one unit. Install from marketplace with /plugin. Community and Anthropic-official plugins available.
PromptThe text you type to Claude — your instructions, questions, or requests. A good prompt is specific, includes context, and tells Claude how to verify success.
Pull Request (PR)A proposal to merge code changes from one branch into another. Claude can create PRs, review them, and address comments. Requires the gh CLI for GitHub integration.
Rate LimitA restriction on how many requests you can make in a given time period. Both Claude's API and external services have rate limits. /usage shows your current limits. /usage-credits can extend them.
Remote ControlFeature that lets you control a local Claude Code terminal session from claude.ai or the Claude desktop app on another device. Enable with /remote-control or /rc. Useful for monitoring long tasks.
REPL (Read-Eval-Print Loop)An interactive environment where you type input, it processes it, and prints the result. Claude Code's interactive mode is a REPL — you type prompts, Claude responds, repeat.
Repository (Repo)A folder tracked by git containing your project's code, history, and configuration. Claude Code is designed to work inside git repositories.
Ripgrep (rg)A fast text search tool Claude Code uses internally to find content in files. If search isn't working, install ripgrep on your system: brew install ripgrep (macOS) or apt install ripgrep (Linux).
SandboxAn isolated execution environment that restricts filesystem and network access. Lets Claude work more freely within safe boundaries. Enable with /sandbox. Not available on all platforms.
SessionA saved conversation with full message history, tool states, and context. Persists across terminal restarts. Resume with /resume or claude -c. Named with /rename. Tied to project directory.
SkillA specialized prompt or workflow stored in .claude/skills/. Loaded on demand when relevant (or invoked manually with /skill-name). Lighter than plugins. Uses SKILL.md files with frontmatter.
Slash CommandA command typed with a / prefix inside an interactive Claude Code session. Example: /help, /clear, /model. Type / to see all available commands. Different from CLI flags (which use --).
Sonnet (Claude model)The balanced everyday model. Current version: Sonnet 5, which has a native 1M-token context window and is the default on Pro, Team Standard and Enterprise seats.
STDIO (Standard Input/Output)The basic communication channels for programs: stdin (input), stdout (output), stderr (errors). MCP servers typically communicate over STDIO — Claude sends JSON over stdin, the server responds on stdout.
Sub-agentA child worker with its own context window and tools. Since v2.1.198 subagents run in the BACKGROUND by default, and can nest up to three levels deep. Defined in .claude/agents/.
System PromptHidden instructions that shape Claude's behavior before you type anything. Claude Code has a built-in system prompt. You can append to it (--append-system-prompt) or replace it entirely (--system-prompt).
TerminalThe application where you type commands. Examples: Windows Terminal, iTerm2, VS Code terminal, Warp. Claude Code runs inside your terminal. Different terminals support different keyboard shortcuts.
TokenThe fundamental unit AI models process. Roughly 4 characters or 0.75 words per token. Context window size, costs, and rate limits are all measured in tokens. Check usage with /cost.
ToolA specific capability Claude can use: Read (read files), Edit (modify files), Bash (run commands), Grep (search), Write (create files), etc. MCP servers add custom tools. View allowed tools with /permissions.
UltrathinkA keyword you include in your prompt to trigger deep reasoning for that single turn, without permanently changing your effort setting. Just type "ultrathink" anywhere in your message.
Ultracode / WorkflowsPut “ultracode” in a prompt to let Claude orchestrate a dynamic workflow — deterministic multi-agent fan-out written as a script. Watch runs with /workflows.
UUID (Universally Unique Identifier)A standardized format for unique IDs, like 696b87a1-01cd-fafa-b5a2-52a8bb70b1c2. Used by Workflowy, Notion, and many APIs to identify specific items. The dashes are significant — some APIs require them.
Verbose ModeShows detailed output including Claude's internal thinking, tool usage, and execution details. Toggle with Ctrl+O. Useful for understanding what Claude is doing and debugging issues.
Agent ViewOne screen listing every Claude Code session on your machine — running, waiting for input, or finished — where you dispatch, attach, respawn and delete them. Press ← on an empty prompt, or run claude agents.
Auto-compact WindowHow full the context window is allowed to get before Claude Code compacts automatically. Tune per session with /autocompact 500k, or permanently with the autoCompactWindow setting.
Background AgentA session that keeps working after you detach from it. Start one with /background, claude --bg, or by pressing ←. It is supervised by a local daemon, survives your terminal closing, and is managed with claude attach / logs / stop / respawn / rm.
Daemon (supervisor)The local background process that hosts background sessions. Inspect it with claude daemon status; stop it with claude daemon stop --any.
Focus ViewA stripped-down transcript showing only your last prompt, a one-line tool-call summary with diffstats, and the final response. Toggle with /focus.
Fork (subagent)A subagent that inherits your ENTIRE conversation rather than starting fresh. /subtask spawns one that reports back here; /fork spawns a whole background session.
Remote ControlDrive a local terminal session from claude.ai or the Claude app on another device. Enable with /remote-control (/rc). Disabled automatically when ANTHROPIC_BASE_URL points somewhere that isn't Anthropic.
Routine (scheduled agent)A cloud agent that runs on a cron schedule, even with your computer off. Create and manage with /schedule (alias /routines).
TeleportPull a Claude Code on the web session down into your terminal, branch and conversation intact, with /teleport or claude --teleport <id>. The web session closes.
Workflow (dynamic)A JavaScript script that orchestrates many subagents deterministically — loops, fan-out, verification stages. Triggered by ultracode or the Workflow tool, watched with /workflows.
Path-scoped RulesMarkdown files in .claude/rules/ that load only when Claude touches files matching their glob — conventions that cost no context until they're relevant.
Screen Reader ModeFlat plain-text rendering with no decorative borders or animations, plus spoken announcements for permission-mode changes and deleted text. Enable with --ax-screen-reader, CLAUDE_AX_SCREEN_READER=1, or axScreenReader: true.
Tool Search (deferral)With many MCP servers connected, tool schemas are held back and fetched on demand instead of filling context. Controlled by ENABLE_TOOL_SEARCH (true / auto / auto:N / false).
WorktreeAn isolated copy of a git repo for parallel work. Each worktree has its own branch and files but shares history with the main repo. Created with claude -w or --worktree flag. Auto-cleaned if no changes made.

Configuration Files

Where Claude Code stores its settings. Source: settings

FilePurpose
~/.claude/settings.jsonUser settings: permissions, hooks, model overrides. Applies to all projects.
.claude/settings.jsonProject settings. Check into git to share with team.
.claude/settings.local.jsonLocal project settings. NOT committed to git.
~/.claude.jsonGlobal state: theme, OAuth tokens, MCP servers.
~/.claude/CLAUDE.mdGlobal memory: instructions that apply to ALL sessions.
./CLAUDE.mdProject memory: conventions, rules for this repo. Check into git.
.mcp.jsonProject MCP servers. Check into git.
.claude/rules/Path-scoped rules that load only when matching files are touched.
.claude/agents/Custom sub-agent definitions (also ~/.claude/agents/ for personal ones).
./CLAUDE.local.mdPersonal project instructions. NOT committed (gitignored).
~/.claude/keybindings.jsonCustom keyboard shortcut bindings.
.claude/skills/<name>/SKILL.mdA skill: a prompt Claude loads on demand, or you invoke as /<name>. .claude/commands/*.md still works and does the same thing.
.claude/workflows/Saved dynamic workflow scripts.
.claude/worktrees/Where isolated git worktrees are created for -w and worktree-isolated agents.
~/.claude/memory/Auto-memory files — one fact per file with frontmatter, indexed by MEMORY.md.
managed-settings.jsonAdmin-enforced settings that users can’t override (system-wide path, set by your org).
AppData/Roaming/Claude/claude_desktop_config.jsonClaude Desktop config: MCP servers, preferences. (Windows path shown)

Settings Keys (42 of 201)

What goes inside settings.json. The most useful of the 209 documented keys — user settings live at ~/.claude/settings.json, project settings at .claude/settings.json. Set one without opening the UI with /config key=value. Full list: settings docs

Model & Behavior

KeyWhat It Does
modelDefault model for new sessions
effortLevelDefault effort level
fallbackModelOrdered fallback chain when the primary model is unavailable
availableModelsRestrict which models can be chosen (with enforceAvailableModels)
fastModeTurn Fast Mode on by default
alwaysThinkingEnabledKeep extended thinking on
outputStyleOutput style applied to the system prompt
advisorModelModel used by the advisor tool
teammateDefaultModelDefault model for agent-team teammates

Permissions & Safety

KeyWhat It Does
defaultModeStarting permission mode (manual is the renamed default)
permissions.allow / ask / denyRules that decide what runs without a prompt
autoModeAuto mode configuration; autoMode.classifyAllShell sends every shell command to the classifier
disableAutoModeTurn auto mode off entirely
disableBypassPermissionsModeForbid bypassPermissions
sandbox.filesystem.*allowRead/allowWrite/denyRead/denyWrite, or disabled to keep only network control
sandbox.network.*allowedDomains, deniedDomains, strictAllowlist to deny silently
sandbox.credentialsMask secrets from sandboxed commands (JWT claim masking, AWS SigV4 re-signing)

Context & Memory

KeyWhat It Does
autoCompactWindowHow full context gets before auto-compaction
autoCompactEnabledTurn automatic compaction on or off
autoMemoryEnabledEnable automatic memory
autoMemoryDirectoryWhere auto-memory files are written
claudeMd / claudeMdExcludesWhich CLAUDE.md files load
fileCheckpointingEnabledKeep file checkpoints for /rewind

Interface

KeyWhat It Does
themeColor theme
tuiRenderer: classic or fullscreen
editorModeNormal or Vim editing
vimInsertModeRemapsTwo-key insert-mode escapes, e.g. jj → Esc
emojiCompletionEnabledEmoji shortcode autocomplete
axScreenReaderScreen-reader friendly rendering
statusLineCustom status line command
prefersReducedMotionCut down animation
spinnerTipsEnabledShow tips in the spinner

Automation & Extensions

KeyWhat It Does
hooksDeterministic shell commands bound to tool/session events
agentsInline subagent definitions
skills / skillOverridesWhich skills load, and per-skill overrides
mcp / allowedMcpServers / deniedMcpServersMCP server configuration and allow/deny lists
workflowSizeGuidelineAdvisory workflow size: small, medium, large
disableWorkflowsDisable dynamic workflows
crossSessionInbound / dialogExpiryHow cross-session messages are approved and delivered
strictKnownMarketplaces / blockedMarketplacesPlugin marketplace allow/deny (supports owner/* wildcards)
worktree.*Base ref, sparse paths and symlinked dirs for isolated worktrees
envEnvironment variables applied to every session

Resources (26)

The repos, docs, blogs, and communities every Claude Code user should know. GitHub star counts verified live on August 8, 2026; community member counts are the June 2026 figures.

Official Resources

ResourceWhat It Is
Official Docscode.claude.com/docs — the canonical documentation for every Claude Code surface
Changelog / Release NotesVersion-by-version release notes — what's new in every update
Claude Code Best PracticesThe canonical Anthropic engineering post on agentic coding workflows
Building Agents with the Claude Agent SDKHow to build custom agents on the engine that powers Claude Code
How Anthropic Teams Use Claude CodeReal internal usage stories — lawyers, marketers, and engineers alike
How We Built Auto ModeAnthropic engineering post on safer permission-skipping (March 2026)
Connectors DirectoryOfficial MCP connector directory — browse 50+ verified integrations
Plugin MarketplaceOfficial web directory of 150+ plugins with install counts & verified badges

GitHub Repos & Awesome Lists

RepoWhy It Matters
obra/superpowers~269K ★ — the most-starred Claude Code skills framework & dev methodology
affaan-m/ECC~239K ★ — "Everything Claude Code": 48 agents, 184 skills, hooks & rules in one config
anthropics/skills~167K ★ — Anthropic's official Agent Skills repository
anthropics/claude-code~141K ★ — the official repo: issues, feature requests, the changelog
ComposioHQ/awesome-claude-skills~72K ★ — the largest curated list of Claude Skills
ruvnet/ruflo~67K ★ — multi-agent orchestration on top of Claude Code (was claude-flow)
hesreallyhim/awesome-claude-code~52K ★ — the original awesome list: skills, hooks, commands, plugins
anthropics/claude-cookbooks~51K ★ — Anthropic's official notebooks & recipes for building with Claude
wshobson/agents~39K ★ — large collection of production-ready subagents
musistudio/claude-code-router~37K ★ — route Claude Code to alternative models/providers
davila7/claude-code-templates~30K ★ — CLI with hundreds of ready-made agents, commands & settings
SuperClaude_Framework~24K ★ — adds specialized commands & cognitive personas to Claude Code
VoltAgent/awesome-claude-code-subagents~24K ★ — 100+ specialized subagent definitions by role
anthropics/claude-code-action~9K ★ — official GitHub Action: Claude reviews PRs & fixes issues in CI

Community Hubs

CommunityWhat You'll Find
Claude Developers Discord~104K members — the official Anthropic Discord server
r/ClaudeAI~911K members — the main Claude subreddit: news, tips, troubleshooting
r/ClaudeCode~292K members — the dedicated Claude Code subreddit
ClaudeLogIndependent knowledge base of Claude Code guides & mechanics

New User Guide: How Claude Code Works

A plain-language overview of what Claude Code is, how it works, and what you need to know.

What Is Claude Code?

Claude Code is an AI assistant that runs in your terminal (command line). Instead of chatting in a web browser, you talk to Claude directly where your code and files live. Claude can read your files, write code, run terminal commands, search the web, and connect to external services like Notion, Slack, and Gmail.

It's available as a CLI (terminal), a desktop app (Mac/Windows), inside VS Code and JetBrains IDEs, on the web at claude.ai/code, in Slack, and on iOS and Android. Sessions move between them: /desktop hands one to the desktop app, /teleport pulls a web session into your terminal, and /remote-control lets you drive this terminal from your phone.

Quickstart guide →

How Claude Interacts With Your Files

When you open Claude Code inside a project folder, Claude can automatically see and read the files in that directory. You don't need to manually paste code — just ask about it and Claude will find the right files. Claude can also:

  • Read files anywhere on your machine
  • Edit files with precise, targeted changes (shows you a diff before applying)
  • Create new files when needed
  • Search across your codebase using pattern matching

Claude always asks permission before modifying files. You approve each change individually, or you can enable "accept all" mode for faster workflows.

How Claude Code works →

Terminal / Bash Commands

Claude can run terminal commands on your behalf — things like git status, npm install, python script.py, etc. It uses the same shell you'd use if you typed commands yourself. Claude will show you what command it wants to run and ask for approval before executing.

You can also run commands yourself using the ! prefix: type !git status to run it directly without Claude's involvement.

CLAUDE.md — Persistent Memory

CLAUDE.md is a special file that Claude reads at the start of every session. It contains your preferences, project conventions, and instructions that persist across conversations. Think of it as your personal instruction manual for Claude.

There are several levels: a global one (~/.claude/CLAUDE.md) that applies to all projects, and a project-level one in your repo root. Use /memory to edit them, or type # followed by text to quickly add something.

Memory management →

Permission Modes

Claude Code has several permission modes that control how much autonomy Claude has:

  • Manual — asks before every file edit and command. This is the mode formerly called “Default”; it was renamed in v2.1.200 and both names still work
  • Accept Edits — file edits auto-approved, commands still ask
  • Plan Mode — Claude analyzes and plans but doesn't write code
  • Auto Mode — a separate classifier model vets each command and blocks the risky ones, so routine work proceeds without prompts
  • Don't Ask — stops prompting without fully bypassing the rules
  • Bypass — everything auto-approved (use with extreme caution)

Press Shift+Tab to cycle between modes during a session.

Permission modes →

MCP (Model Context Protocol) — Connecting to External Tools

MCP is the system that lets Claude talk to external services. Each "connector" is an MCP server that gives Claude tools for a specific service. For example, the Notion connector gives Claude tools to read pages, create databases, and search. The Slack connector lets Claude send messages and search channels.

Some connectors are built into Claude (Notion, Slack, Gmail). Others are custom — you can build your own MCP server (like the Workflowy one in this project) and add it to Claude's config.

MCP documentation →

Context Window — Claude's Working Memory

Claude has a "context window" — the total amount of text it can hold in memory during a conversation. Opus 5 and Sonnet 5 have a native 1 million token window (roughly 750,000 words); older models are 200,000. As you talk, read files, and run commands, the context fills up. Use /context to see how full it is, and /compact to compress older messages when it gets crowded. Claude Code also compacts on its own once the window passes a threshold you can set with /autocompact.

Sessions — Saving and Resuming Work

Every conversation is saved as a "session." You can resume any previous session with /resume or claude -c (continue most recent). Sessions are tied to the directory you started them in. Name sessions with /rename to find them easily later.

Models — Choosing Your Brain

Claude Code can use different AI models:

  • Opus 5 — The flagship, with a 1 million token context window. What opus and, on most paid plans, default now resolve to.
  • Sonnet 5 — The everyday model, also with a native 1M context window. The default on Pro, Team Standard and Enterprise seats.
  • Haiku 4.5 — Fastest and cheapest, good for simple, high-volume tasks.
  • Fable 5 — For work larger than a single sitting: long autonomous runs that investigate before acting. Never the default — you choose it.
  • Opus 4.8 — The previous flagship, still selectable.

Switch with /model or Alt+P. The alias best picks Fable 5 where you have it and the latest Opus otherwise, and opusplan uses Opus to plan then Sonnet to execute. Fast Mode (/fast, Opus only) delivers the same model faster at a higher cost per token — it does not switch models.

Model configuration →

Key Documentation Links

Quickstart Guide How It Works Best Practices Common Workflows Settings Skills & Custom Commands Hooks (Automation) Troubleshooting

Sources: commands | cli-reference | interactive-mode | changelog | connectors — verified against Claude Code v2.1.226, August 8, 2026. Command, flag and variable lists were checked against the docs’ own Markdown source, not a summary of it.