← All Claude Builds

Claude Code Reference Guide

Complete Reference — Click any item for details

Updated June 10, 2026

Built-in Slash Commands (84)

Type / in an interactive session. Source: official docs

CommandDescription
/add-dir <path>Add a new working directory to the current session
/advisor [model|off]Consult a second model for advice mid-session
/agentsManage agent (sub-agent) configurations
/autofix-pr [prompt]Web session watches your PR and pushes fixes for CI failures & review comments
/background [prompt]Detach session to run as a background agent. Alias: /bg
/btw <question>Ask a quick side question without adding to conversation history
/cd <path>Move session to a new working directory (keeps conversation & cache)
/chromeConfigure Claude in Chrome settings (browser integration)
/clearClear conversation history and free up context. Aliases: /reset, /new
/color [color|default]Set prompt bar color: red, blue, green, yellow, purple, orange, pink, cyan
/compact [instructions]Compact conversation with optional focus instructions
/configOpen Settings interface. Alias: /settings
/contextVisualize current context usage as colored grid
/copy [N]Copy last assistant response to clipboard. Pass N for Nth-latest.
/costShow session token usage & cost (opens the cost tab of /usage)
/desktopContinue session in Claude Code Desktop app. Alias: /app
/diffInteractive diff viewer: uncommitted changes and per-turn diffs
/doctorDiagnose and verify installation and settings
/effort [level]Set effort: low, medium, high, xhigh, max. Bare /effort opens a slider.
/exitExit the CLI. Alias: /quit
/export [filename]Export conversation as plain text
/fast [on|off]Toggle Fast Mode (same model, faster output)
/feedback [report]Submit feedback. Alias: /bug
/focusToggle focus view: just the last prompt, tool summary, and response
/branch [name]Branch conversation into a new session
/fork <directive>Spawn a forked subagent that inherits the full conversation
/goal [condition|clear]Set a goal; Claude keeps working across turns until it's met
/heapdumpWrite a memory snapshot for diagnosing high memory usage
/helpShow help and list all available commands
/hooksView hook configurations for tool events
/ideManage IDE integrations and show status
/initInitialize project with CLAUDE.md
/insightsGenerate report analyzing sessions, patterns, friction points
/install-github-appSet up Claude GitHub Actions app
/install-slack-appInstall Claude Slack app (opens browser for OAuth)
/keybindingsOpen or create keybindings configuration file
/loginSign in to your Anthropic account
/logoutSign out from your Anthropic account
/mcpManage MCP server connections and OAuth
/memoryEdit CLAUDE.md, enable/disable auto-memory, view entries
/mobileShow QR code to download mobile app. Aliases: /ios, /android
/model [model]Select or change model (saves as default; press s for session-only)
/passesShare a free week of Claude Code with friends
/permissionsView or update permissions. Alias: /allowed-tools
/plan [description]Enter plan mode. Optional description to start immediately.
/pluginManage Claude Code plugins
/powerupLearn Claude Code features through interactive lessons
/privacy-settingsView/update privacy settings (Pro/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-pluginsReload all active plugins without restarting
/reload-skillsRe-scan skill directories for changes without restarting
/remote-controlMake session available for remote control from claude.ai. Alias: /rc
/remote-envConfigure default remote environment for web sessions
/rename [name]Rename session. Without name, auto-generates.
/resume [session]Resume conversation by ID/name or pick. Alias: /continue
/reviewReview a pull request
/rewindRewind conversation/code to previous point. Aliases: /checkpoint, /undo
/safe-modeRestart with all customizations disabled (troubleshooting)
/sandboxToggle sandbox mode (supported platforms)
/schedule [desc]Create/manage Cloud scheduled tasks (cron triggers)
/scroll-speedAdjust mouse-wheel scroll speed with live preview
/security-reviewAnalyze branch changes for security vulnerabilities
/skillsList available skills
/statsOpen the Stats tab of /usage: history, streaks, model preferences
/statusShow version, model, account, connectivity. Works during responses.
/statuslineConfigure terminal status line display
/stickersOrder Claude Code stickers
/stopStop the current background session (while attached)
/tasksList and manage background tasks
/teleportPull a Claude Code on the web session into your terminal. Alias: /tp
/team-onboardingGenerate a teammate ramp-up guide from your local usage
/terminal-setupConfigure terminal keybindings (Shift+Enter, etc)
/themeChange color theme: light/dark, colorblind-accessible, ANSI
/tui [default|fullscreen]Switch terminal renderer (flicker-free fullscreen mode)
/ultraplan <prompt>Draft a plan, review it in browser, execute remotely or locally
/ultrareview [PR]Deep multi-agent cloud code review. Same as /code-review ultra
/upgradeOpen upgrade page for higher plan
/usageShow plan usage limits and rate limit status
/usage-creditsConfigure usage credits for when rate limits hit (was /extra-usage)
/voiceToggle push-to-talk voice dictation
/web-setupConnect GitHub for Claude Code on the web via local gh credentials
/workflowsWatch, pause, resume, or save running multi-agent workflows

Bundled Skills (12 Native + 5 Community)

Skills extend Claude Code with specialized workflows. Native skills ship with Claude Code; community skills are third-party.

Native Skills

SkillDescription
/batchLarge-scale parallel changes across codebase
/claude-apiBuild apps with Claude API or Anthropic SDK
/code-review [level]Review diff for bugs at chosen effort (low–ultra). --fix applies, --comment posts to PR
/debug [description]Enable debug logging and troubleshoot Claude Code itself
/deep-research <question>Multi-agent web research with verified, cited report
/fewer-permission-promptsScan transcripts and build a permission allowlist
/loop [interval] [cmd]Run prompt/command on a recurring interval (self-paced if omitted)
/runLaunch and drive your app to see a change working
/run-skill-generatorTeach /run and /verify how to build & launch your project
/scheduleScheduled remote agents (cron triggers). Alias: /routines
/simplify [target]Cleanup-only review (reuse, simplification, efficiency) that applies fixes
/verifyRun the app and confirm a change does what it should

Community / Third-Party Skills

SkillDescription
/feature-devGuided feature development with architecture focus
/frontend-designProduction-grade frontend interfaces with high design quality
/update-configConfigure hooks, permissions, env vars in settings.json
/keybindings-helpCustomize keyboard shortcuts, rebind keys
/notebooklmQuery Google NotebookLM for source-grounded answers

CLI Commands (27)

Run from your shell before entering an interactive session.

CommandDescription
claudeStart interactive session
claude "query"Start with initial prompt
claude -p "query"Non-interactive: print response, exit
cat file | claude -p "query"Process piped content
claude -cContinue most recent conversation
claude -c -p "query"Continue via SDK (non-interactive)
claude -r "session" "query"Resume session by ID or name
claude updateUpdate to latest version
claude auth loginSign in. Flags: --email, --sso, --console
claude auth logoutLog out
claude auth statusAuth status as JSON. --text for human-readable.
claude agentsAgent view: every session (running, blocked, done) in one list
claude attach <id>Attach to a background session in this terminal
claude auto-mode defaultsPrint built-in auto mode rules as JSON
claude config listDisplay all settings
claude config get <key>Get specific setting
claude config set <key> <value>Update a setting
claude logs <id>Print recent output from a background session
claude mcpInteractive MCP setup (see MCP section)
claude pluginManage plugins: init, details, prune, tag. Alias: claude plugins
claude project purge [path]Delete all local Claude Code state for a project
claude remote-controlStart Remote Control server. Flag: --name
claude respawn <id>Restart a background session with its conversation intact
claude rm <id>Remove a background session from the list
claude setup-tokenGenerate a long-lived OAuth token for CI and scripts
claude stop <id>Stop a background session. Alias: claude kill
claude ultrareview [target]Run a deep cloud code review non-interactively (CI-friendly)

CLI Flags (60+)

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

Session Control

FlagDescription
--continue, -cResume most recent conversation
--resume, -r <id>Resume by session ID or name
--from-pr <PR>Resume sessions linked to a PR (GitHub, GitLab, Bitbucket)
--bgStart as a background agent and return immediately
--exec '<cmd>'Run a shell command as an attachable background job (with --bg)
--fork-sessionCreate new session ID when resuming
--session-id <UUID>Use specific session UUID
--name, -n <name>Name session for display and resuming
--max-turns NLimit agentic turns (print mode)
--max-budget-usd NMax dollar spend before stopping
--worktree, -w <name>Start in isolated git worktree
--no-session-persistenceDon't save session to disk

Model & Mode

FlagDescription
--model <name>Set model: fable, opus, sonnet, haiku, or full ID
--fallback-model <list>Auto-fallback when primary overloaded (up to 3, comma-separated)
--permission-mode <mode>Set permission mode at launch (default, acceptEdits, plan, auto, bypassPermissions)
--advisor <model>Enable the advisor tool (second-model consultation)
--effort <level>Set effort: low, medium, high, xhigh, max
--print, -pNon-interactive: print and exit
--bareMinimal: skip hooks, skills, plugins, MCP
--safe-modeStart with all customizations disabled (troubleshooting)

System Prompt

FlagDescription
--system-prompt "..."Replace entire default system prompt
--system-prompt-file <path>Replace with file contents
--append-system-prompt "..."Append to default prompt
--append-system-prompt-fileAppend file contents to default prompt

Tools & Permissions

FlagDescription
--tools <list>Restrict available tools
--allowedTools <list>Tools that run without permission
--disallowedTools <list>Tools removed from context
--dangerously-skip-permissionsSkip all permission prompts
--allow-dangerously-skip-permissionsEnable bypass as option
--permission-prompt-tool <tool>MCP tool to handle permissions

Output & Input

FlagDescription
--output-format <fmt>Output: text, json, stream-json
--input-format <fmt>Input: text, stream-json
--json-schema '<json>'Validate output against JSON Schema
--include-partial-messagesInclude streaming events
--verboseFull turn-by-turn logging

Extensions & Config

FlagDescription
--agent <name>Use specific agent for session
--agents '<json>'Define custom sub-agents via JSON
--add-dir <path>Add working directories
--mcp-config <path>Load MCP servers from JSON
--strict-mcp-configOnly use specified MCP config
--plugin-dir <path>Load plugins from directory (or .zip archive)
--plugin-url <url>Fetch a plugin .zip from a URL for this session
--settings <path>Load additional settings
--setting-sources <list>Which settings: user, project, local
--ideAuto-connect to IDE on startup
--chromeEnable Chrome browser integration
--no-chromeDisable Chrome integration
--betas <headers>Beta headers for API requests
--disable-slash-commandsDisable all skills/commands
--initRun init hooks then start
--init-onlyRun init hooks then exit
--maintenanceRun maintenance hooks then exit

Remote & Collaboration

FlagDescription
--remote "task"Create web session on claude.ai
--remote-control, --rcEnable Remote Control from claude.ai
--teleportResume web session in local terminal
--teammate-mode <mode>Agent team display: auto, in-process, tmux
--tmuxCreate a tmux session for the worktree (iTerm2 panes when available)
--channels <list>MCP channel notifications (research preview)

Diagnostics

FlagDescription
--version, -vShow version number
--debug [categories]Debug: "api,mcp" or "!statsig,!file"
--debug-file <path>Write debug logs to a specific file (enables debug mode)

Keyboard Shortcuts

Press ? to see shortcuts for your environment. Source: interactive-mode

General Controls

Cancel input or generationCtrl+C
Kill all background agents (2x)Ctrl+X Ctrl+K
Exit session (EOF)Ctrl+D
Open in text editorCtrl+G / Ctrl+X Ctrl+E
Clear terminal screenCtrl+L
Toggle verbose transcript viewCtrl+O
Reverse search historyCtrl+R
Paste image from clipboardCtrl+V
Background running tasksCtrl+B
Toggle task listCtrl+T
Rewind or summarize menuEsc+Esc
Cycle permission modesShift+Tab
Switch modelAlt+P
Toggle extended thinkingAlt+T
Toggle fast modeAlt+O
Narrow history search scope (in Ctrl+R)Ctrl+S
Open the agents view (all sessions)←←
Detach session to background
Show available shortcuts?

Text Editing

Delete to end of lineCtrl+K
Clear entire input (Ctrl+Y restores)Ctrl+U
Paste deleted textCtrl+Y
Cycle paste historyAlt+Y
Move back one wordAlt+B
Move forward one wordAlt+F

Multiline Input

Newline (all terminals)\ + Enter
Newline (macOS)Option+Enter
Newline (iTerm2, WezTerm, Ghostty, Kitty)Shift+Enter
Line feed characterCtrl+J

Voice & Transcript

Push-to-talk dictation (hold)Hold Space
Toggle show all (transcript viewer)Ctrl+E
Search transcript; n/N steps matches (in Ctrl+O)/

Vim Mode

Enable via /config → Editor mode. Full vim-style editing. 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 line below / above

Navigation

KeyAction
h/j/k/lMove left/down/up/right
w / e / bNext word / end of word / prev word
0 / $ / ^Beginning / end / first non-blank
gg / GBeginning / end of input
f/F/t/T{char}Jump to/before char occurrence

Editing

KeyAction
x / dd / DDelete char / line / to end
dw / de / dbDelete word / to end / back
cc / CChange line / to end of line
yy / YYank (copy) line
p / PPaste after / before cursor
>> / <<Indent / dedent line
.Repeat last change

Undo, Redo & Replace

KeyAction
uUndo last change
Ctrl+RRedo (undo the undo)
r{char}Replace character under cursor
REnter Replace mode (overtype)
JJoin current line with next
~Toggle case of character

Visual Mode

KeyAction
vEnter visual (character) mode
VEnter visual line mode
d / y / cDelete / yank / change visual selection

Text Objects

KeyAction
iw / awInner word / around word (includes surrounding space)
i" / a"Inner / around double quotes
i( / a(Inner / around parentheses
i{ / a{Inner / around curly braces

Search & Counts

KeyAction
/ / ?Search forward / backward
n / NNext / previous search match
{count}{motion}Repeat motion N times (e.g., 3dd, 5j, 2dw)

Prompt Notation

Special prefixes in your messages.

@<filename> — Reference file/directory (triggers autocomplete)
@terminal:<name> — Reference terminal output
#<content> — Add content to CLAUDE.md memory
!<command> — Execute shell command (output in context)
& <task> — Run task in background
/ — Open command/skill menu

Connectors & Integrations

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

Your Active Connections

Notion

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

Slack

Messages, channels, canvases, search public/private

Gmail

Read messages/threads, search, create drafts, labels

Supabase

SQL, edge functions, migrations, branches, projects

Workflowy (Custom)

15 tools: read/write/search/complete/sync, bookmarks

Discord (Custom)

Custom Discord bot integration

Context7

Up-to-date docs and code examples for any library

Popular Available

GitHub

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

Google Drive

File access, search, docs

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 (57)

Source: env-vars docs

API & Authentication

VariableDescription
ANTHROPIC_API_KEYAPI key for direct Anthropic API access
ANTHROPIC_BASE_URLOverride API endpoint URL
CLAUDE_CODE_API_KEYAPI key specifically for Claude Code
CLAUDE_API_KEYAlternative API key variable

Provider Configuration

VariableDescription
ANTHROPIC_MODELOverride default model selection
CLAUDE_CODE_USE_BEDROCKUse Amazon Bedrock as provider (1 to enable)
CLAUDE_CODE_USE_VERTEXUse Google Vertex AI as provider (1 to enable)
AWS_REGIONAWS region for Bedrock (e.g., us-east-1)
AWS_ACCESS_KEY_IDAWS access key for Bedrock auth
AWS_SECRET_ACCESS_KEYAWS secret key for Bedrock auth
AWS_SESSION_TOKENAWS session token (temporary credentials)
ANTHROPIC_BEDROCK_BASE_URLCustom Bedrock endpoint URL
GOOGLE_CLOUD_PROJECTGCP project ID for Vertex AI
CLOUD_ML_REGIONGCP region for Vertex AI
ANTHROPIC_VERTEX_BASE_URLCustom Vertex AI endpoint URL

Behavior & Effort

VariableDescription
CLAUDE_CODE_EFFORT_LEVELThinking level: low, medium, high, xhigh, max, auto
CLAUDE_CODE_THINKING_BUDGETMax thinking tokens per response
MAX_THINKING_TOKENSSet to 0 to disable extended thinking entirely
CLAUDE_CODE_MAX_OUTPUT_TOKENSMax model output tokens per response
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_DISABLE_BUNDLED_SKILLSHide bundled skills and workflows from the model
CLAUDE_CODE_DISABLE_AUTO_MEMORYDisable automatic memory
CLAUDE_CODE_SKIP_CLAUDE_MDSkip loading CLAUDE.md files
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFICDisable telemetry and non-essential network calls

Display & Output

VariableDescription
CLAUDE_CODE_THEMESet color theme (light, dark, etc.)
CLAUDE_CODE_OUTPUT_STYLEOutput style: default, explanatory, learning
CLAUDE_CODE_ENABLE_PROMPT_SUGGESTIONEnable/disable prompt suggestions
NO_COLORDisable colored terminal output
FORCE_COLORForce colored output even when not auto-detected

Timeouts & Limits

VariableDescription
BASH_DEFAULT_TIMEOUT_MSDefault bash timeout (ms)
BASH_MAX_TIMEOUT_MSMax bash timeout (ms)
API_TIMEOUT_MSAPI request timeout (default 10 minutes)
MAX_MCP_OUTPUT_TOKENSMax tokens for MCP output (default 25000)
MCP_TIMEOUTMCP server startup timeout (ms)
MCP_TOOL_TIMEOUTPer-tool MCP execution timeout (ms)
CLAUDE_CODE_MAX_TURNSMax agentic turns per session

Network & Proxy

VariableDescription
HTTP_PROXYHTTP proxy URL for outbound requests
HTTPS_PROXYHTTPS proxy URL for outbound requests
NO_PROXYComma-separated hosts to bypass proxy

Features & Toggles

VariableDescription
CLAUDE_CODE_DISABLE_CRONStop scheduled jobs
ENABLE_CLAUDEAI_MCP_SERVERSEnable/disable claude.ai servers
CLAUDE_CODE_DISABLE_1M_CONTEXTDisable 1M context window
CLAUDE_CODE_DISABLE_BACKGROUND_TASKSDisable background tasks
CLAUDE_CODE_TASK_LIST_IDNamed task list shared across sessions
CLAUDE_CODE_ENABLE_TELEMETRYEnable/disable usage telemetry
CLAUDE_CODE_DISABLE_PLUGINSDisable all plugins
CLAUDE_CODE_DISABLE_WORKFLOWSDisable dynamic multi-agent workflows
ENABLE_TOOL_SEARCHMCP tool deferral: true, auto, auto:N, false
CLAUDE_CODE_ENABLE_AWAY_SUMMARYShow a session recap when you return
DISABLE_AUTOUPDATERDisable automatic updates
DISABLE_UPDATESBlock ALL update paths, including manual claude update

Debug & Development

VariableDescription
CLAUDE_CODE_DEBUGEnable debug output (categories: api, mcp, etc.)
CLAUDE_CODE_LOG_LEVELLog verbosity: error, warn, info, debug
USE_BUILTIN_RIPGREPUse bundled ripgrep (0 to use system install)
CLAUDE_PROJECT_DIRProject root path (set by Claude Code for hooks/MCP servers)
CLAUDE_CODE_SESSION_IDSession ID (exported to subprocesses and MCP servers)

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

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

Agent Teams & Orchestration

Run multiple Claude agents working together. Source: sub-agents

ConceptDescription
--teammate-mode <mode>Display mode for agent teams: auto, in-process (inline), tmux (separate panes)
Shared Task ListsSet CLAUDE_CODE_TASK_LIST_ID to share a named task list across multiple sessions
Agent Config FilesDefine agents in .claude/agents/*.md with frontmatter (name, model, tools, system prompt)
Writer / Reviewer PatternOne agent writes code, another reviews in clean context. Use worktrees for isolation.
Fan-Out Patternclaude -p in a loop: process multiple files in parallel with separate agent instances

Output Styles

Control how Claude formats responses. Set via /config or CLAUDE_CODE_OUTPUT_STYLE env var.

StyleDescription
DefaultConcise, action-oriented responses. Minimal explanation.
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
/cost vs /usage/cost = session tokens & estimated cost. /usage = plan limits & rate limit status.
--max-budget-usd NSet a dollar cap; Claude stops when reached. Use in CI to prevent runaway costs.
Token Reduction/compact to compress context. /clear between tasks. Use subagents to offload research.
Model SelectionHaiku 4.5 is cheapest. Sonnet 4.6 balances cost/quality. Opus 4.8 and Fable 5 cost more but handle the hardest work.
Effort Level ImpactLower effort = fewer thinking tokens = lower cost. Use /effort low for simple tasks.

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.
Context window exceededUse /compact to compress history, /clear between tasks, or start a new session. Check /context for usage.

Glossary (50+ terms, A-Z)

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

TermDefinition
Adaptive ReasoningRecent Claude models (Sonnet 4.6, Opus 4.6+, Fable 5) dynamically allocate thinking tokens based on your effort level, rather than using a fixed budget. More complex questions 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 created before Claude makes changes. Rewind conversation and/or code to any checkpoint 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 during a conversation. Standard is 200K tokens; Opus and Fable 5 can extend to 1M (~750K words) on higher plans. Fills with messages, file reads, and command outputs. Use /context to check, /compact to compress.
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 before responding. Low = faster, cheaper. Medium = balanced. High = thorough. Xhigh = extra-deep (Opus 4.7+). Max = deepest, session-scoped. Set with /effort or --effort flag.
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 newest flagship "Mythos-class" model, released June 2026. The most capable Claude model ever made generally available. Requires Claude Code v2.1.170+.
Fast ModeMakes Opus produce output up to 2.5x faster at a higher cost per token — same model, faster delivery. 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 tasks where speed matters more than depth. 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 powering Claude's responses. Current models: Fable 5 (newest flagship), Opus 4.8 (most capable Opus), Sonnet 4.6 (fast + capable), Haiku 4.5 (fastest/cheapest). 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 Opus line for complex reasoning, large codebases, and ambitious tasks. Current version: Opus 4.8, with 1M token context available on higher plans.
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. Default (asks for everything), Accept Edits (auto-approve file changes), Plan (read-only), Auto (classifier-based), Bypass (everything auto-approved). 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)A fast and capable Claude model — good balance of speed and quality. Current version: Sonnet 4.6. Supports adaptive reasoning and extended thinking.
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 AI worker spawned by Claude that runs in its own context window with its own set of tools. Delegates tasks without cluttering your main conversation. Defined in .claude/agents/ with markdown frontmatter.
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 / WorkflowsInclude "ultracode" in a prompt to let Claude orchestrate a dynamic workflow — structured work fanned out across tens or hundreds of background agents. 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.
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.
AppData/Roaming/Claude/claude_desktop_config.jsonClaude Desktop config: MCP servers, preferences. (Windows path shown)

Resources (26)

The repos, docs, blogs, and communities every Claude Code user should know. Star counts & member counts verified June 10, 2026.

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~223K ★ — the most-starred Claude Code skills framework & dev methodology
affaan-m/ECC~213K ★ — "Everything Claude Code": 48 agents, 184 skills, hooks & rules in one config
anthropics/skills~149K ★ — Anthropic's official Agent Skills repository
anthropics/claude-code~132K ★ — the official repo: issues, feature requests, the changelog
ComposioHQ/awesome-claude-skills~64K ★ — the largest curated list of Claude Skills
ruvnet/ruflo~59K ★ — multi-agent orchestration on top of Claude Code (was claude-flow)
hesreallyhim/awesome-claude-code~46K ★ — the original awesome list: skills, hooks, commands, plugins
anthropics/claude-cookbooks~45K ★ — Anthropic's official notebooks & recipes for building with Claude
wshobson/agents~37K ★ — large collection of production-ready subagents
musistudio/claude-code-router~35K ★ — route Claude Code to alternative models/providers
davila7/claude-code-templates~28K ★ — CLI with hundreds of ready-made agents, commands & settings
SuperClaude_Framework~23K ★ — adds specialized commands & cognitive personas to Claude Code
VoltAgent/awesome-claude-code-subagents~22K ★ — 100+ specialized subagent definitions by role
anthropics/claude-code-action~8K ★ — 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, and in Slack.

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:

  • Default — Claude asks before every file edit and command
  • Accept Edits — file edits auto-approved, commands still ask
  • Plan Mode — Claude analyzes and plans but doesn't write code
  • Auto Mode — Claude runs autonomously with a safety classifier
  • 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. Standard is 200,000 tokens; on Opus and Fable 5 it can extend to 1 million tokens (roughly 750,000 words) on higher plans. 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.

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:

  • Fable 5 — Newest flagship (June 2026), the most capable Claude model yet.
  • Opus 4.8 — Most capable Opus, best for complex tasks. 1M context on higher plans.
  • Sonnet 4.6 — Fast and capable, good balance of speed and quality.
  • Haiku 4.5 — Fastest and cheapest, good for simple tasks.

Switch with /model or Alt+P. Fast Mode (/fast, Opus only) makes the model output up to 2.5x faster at a higher cost.

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.170, June 10, 2026