Complete Reference — Click any item for details
Updated June 10, 2026Type / in an interactive session. Source: official docs
| Command | Description |
|---|---|
| /add-dir <path> | Add a new working directory to the current session |
| /advisor [model|off] | Consult a second model for advice mid-session |
| /agents | Manage 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) |
| /chrome | Configure Claude in Chrome settings (browser integration) |
| /clear | Clear 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 |
| /config | Open Settings interface. Alias: /settings |
| /context | Visualize current context usage as colored grid |
| /copy [N] | Copy last assistant response to clipboard. Pass N for Nth-latest. |
| /cost | Show session token usage & cost (opens the cost tab of /usage) |
| /desktop | Continue session in Claude Code Desktop app. Alias: /app |
| /diff | Interactive diff viewer: uncommitted changes and per-turn diffs |
| /doctor | Diagnose and verify installation and settings |
| /effort [level] | Set effort: low, medium, high, xhigh, max. Bare /effort opens a slider. |
| /exit | Exit 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 |
| /focus | Toggle 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 |
| /heapdump | Write a memory snapshot for diagnosing high memory usage |
| /help | Show help and list all available commands |
| /hooks | View hook configurations for tool events |
| /ide | Manage IDE integrations and show status |
| /init | Initialize project with CLAUDE.md |
| /insights | Generate report analyzing sessions, patterns, friction points |
| /install-github-app | Set up Claude GitHub Actions app |
| /install-slack-app | Install Claude Slack app (opens browser for OAuth) |
| /keybindings | Open or create keybindings configuration file |
| /login | Sign in to your Anthropic account |
| /logout | Sign out from your Anthropic account |
| /mcp | Manage MCP server connections and OAuth |
| /memory | Edit CLAUDE.md, enable/disable auto-memory, view entries |
| /mobile | Show QR code to download mobile app. Aliases: /ios, /android |
| /model [model] | Select or change model (saves as default; press s for session-only) |
| /passes | Share a free week of Claude Code with friends |
| /permissions | View or update permissions. Alias: /allowed-tools |
| /plan [description] | Enter plan mode. Optional description to start immediately. |
| /plugin | Manage Claude Code plugins |
| /powerup | Learn Claude Code features through interactive lessons |
| /privacy-settings | View/update privacy settings (Pro/Max only) |
| /radio | Open Claude FM lo-fi radio in your browser |
| /recap | Generate a one-line summary of the session so far |
| /release-notes | Browse the changelog with an interactive version picker |
| /reload-plugins | Reload all active plugins without restarting |
| /reload-skills | Re-scan skill directories for changes without restarting |
| /remote-control | Make session available for remote control from claude.ai. Alias: /rc |
| /remote-env | Configure 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 |
| /review | Review a pull request |
| /rewind | Rewind conversation/code to previous point. Aliases: /checkpoint, /undo |
| /safe-mode | Restart with all customizations disabled (troubleshooting) |
| /sandbox | Toggle sandbox mode (supported platforms) |
| /schedule [desc] | Create/manage Cloud scheduled tasks (cron triggers) |
| /scroll-speed | Adjust mouse-wheel scroll speed with live preview |
| /security-review | Analyze branch changes for security vulnerabilities |
| /skills | List available skills |
| /stats | Open the Stats tab of /usage: history, streaks, model preferences |
| /status | Show version, model, account, connectivity. Works during responses. |
| /statusline | Configure terminal status line display |
| /stickers | Order Claude Code stickers |
| /stop | Stop the current background session (while attached) |
| /tasks | List and manage background tasks |
| /teleport | Pull a Claude Code on the web session into your terminal. Alias: /tp |
| /team-onboarding | Generate a teammate ramp-up guide from your local usage |
| /terminal-setup | Configure terminal keybindings (Shift+Enter, etc) |
| /theme | Change 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 |
| /upgrade | Open upgrade page for higher plan |
| /usage | Show plan usage limits and rate limit status |
| /usage-credits | Configure usage credits for when rate limits hit (was /extra-usage) |
| /voice | Toggle push-to-talk voice dictation |
| /web-setup | Connect GitHub for Claude Code on the web via local gh credentials |
| /workflows | Watch, pause, resume, or save running multi-agent workflows |
Skills extend Claude Code with specialized workflows. Native skills ship with Claude Code; community skills are third-party.
| Skill | Description |
|---|---|
| /batch | Large-scale parallel changes across codebase |
| /claude-api | Build 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-prompts | Scan transcripts and build a permission allowlist |
| /loop [interval] [cmd] | Run prompt/command on a recurring interval (self-paced if omitted) |
| /run | Launch and drive your app to see a change working |
| /run-skill-generator | Teach /run and /verify how to build & launch your project |
| /schedule | Scheduled remote agents (cron triggers). Alias: /routines |
| /simplify [target] | Cleanup-only review (reuse, simplification, efficiency) that applies fixes |
| /verify | Run the app and confirm a change does what it should |
| Skill | Description |
|---|---|
| /feature-dev | Guided feature development with architecture focus |
| /frontend-design | Production-grade frontend interfaces with high design quality |
| /update-config | Configure hooks, permissions, env vars in settings.json |
| /keybindings-help | Customize keyboard shortcuts, rebind keys |
| /notebooklm | Query Google NotebookLM for source-grounded answers |
Run from your shell before entering an interactive session.
| Command | Description |
|---|---|
| claude | Start 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 -c | Continue most recent conversation |
| claude -c -p "query" | Continue via SDK (non-interactive) |
| claude -r "session" "query" | Resume session by ID or name |
| claude update | Update to latest version |
| claude auth login | Sign in. Flags: --email, --sso, --console |
| claude auth logout | Log out |
| claude auth status | Auth status as JSON. --text for human-readable. |
| claude agents | Agent view: every session (running, blocked, done) in one list |
| claude attach <id> | Attach to a background session in this terminal |
| claude auto-mode defaults | Print built-in auto mode rules as JSON |
| claude config list | Display 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 mcp | Interactive MCP setup (see MCP section) |
| claude plugin | Manage plugins: init, details, prune, tag. Alias: claude plugins |
| claude project purge [path] | Delete all local Claude Code state for a project |
| claude remote-control | Start 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-token | Generate 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) |
Pass when launching from terminal. Full reference: cli-reference
| Flag | Description |
|---|---|
| --continue, -c | Resume most recent conversation |
| --resume, -r <id> | Resume by session ID or name |
| --from-pr <PR> | Resume sessions linked to a PR (GitHub, GitLab, Bitbucket) |
| --bg | Start as a background agent and return immediately |
| --exec '<cmd>' | Run a shell command as an attachable background job (with --bg) |
| --fork-session | Create new session ID when resuming |
| --session-id <UUID> | Use specific session UUID |
| --name, -n <name> | Name session for display and resuming |
| --max-turns N | Limit agentic turns (print mode) |
| --max-budget-usd N | Max dollar spend before stopping |
| --worktree, -w <name> | Start in isolated git worktree |
| --no-session-persistence | Don't save session to disk |
| Flag | Description |
|---|---|
| --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, -p | Non-interactive: print and exit |
| --bare | Minimal: skip hooks, skills, plugins, MCP |
| --safe-mode | Start with all customizations disabled (troubleshooting) |
| Flag | Description |
|---|---|
| --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-file | Append file contents to default prompt |
| Flag | Description |
|---|---|
| --tools <list> | Restrict available tools |
| --allowedTools <list> | Tools that run without permission |
| --disallowedTools <list> | Tools removed from context |
| --dangerously-skip-permissions | Skip all permission prompts |
| --allow-dangerously-skip-permissions | Enable bypass as option |
| --permission-prompt-tool <tool> | MCP tool to handle permissions |
| Flag | Description |
|---|---|
| --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-messages | Include streaming events |
| --verbose | Full turn-by-turn logging |
| Flag | Description |
|---|---|
| --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-config | Only 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 |
| --ide | Auto-connect to IDE on startup |
| --chrome | Enable Chrome browser integration |
| --no-chrome | Disable Chrome integration |
| --betas <headers> | Beta headers for API requests |
| --disable-slash-commands | Disable all skills/commands |
| --init | Run init hooks then start |
| --init-only | Run init hooks then exit |
| --maintenance | Run maintenance hooks then exit |
| Flag | Description |
|---|---|
| --remote "task" | Create web session on claude.ai |
| --remote-control, --rc | Enable Remote Control from claude.ai |
| --teleport | Resume web session in local terminal |
| --teammate-mode <mode> | Agent team display: auto, in-process, tmux |
| --tmux | Create a tmux session for the worktree (iTerm2 panes when available) |
| --channels <list> | MCP channel notifications (research preview) |
| Flag | Description |
|---|---|
| --version, -v | Show version number |
| --debug [categories] | Debug: "api,mcp" or "!statsig,!file" |
| --debug-file <path> | Write debug logs to a specific file (enables debug mode) |
Press ? to see shortcuts for your environment. Source: interactive-mode
Enable via /config → Editor mode. Full vim-style editing. Source: interactive-mode
| Key | Action |
|---|---|
| Esc | Enter NORMAL mode |
| i / I | Insert before cursor / at line start |
| a / A | Insert after cursor / at line end |
| o / O | Open line below / above |
| Key | Action |
|---|---|
| h/j/k/l | Move left/down/up/right |
| w / e / b | Next word / end of word / prev word |
| 0 / $ / ^ | Beginning / end / first non-blank |
| gg / G | Beginning / end of input |
| f/F/t/T{char} | Jump to/before char occurrence |
| Key | Action |
|---|---|
| x / dd / D | Delete char / line / to end |
| dw / de / db | Delete word / to end / back |
| cc / C | Change line / to end of line |
| yy / Y | Yank (copy) line |
| p / P | Paste after / before cursor |
| >> / << | Indent / dedent line |
| . | Repeat last change |
| Key | Action |
|---|---|
| u | Undo last change |
| Ctrl+R | Redo (undo the undo) |
| r{char} | Replace character under cursor |
| R | Enter Replace mode (overtype) |
| J | Join current line with next |
| ~ | Toggle case of character |
| Key | Action |
|---|---|
| v | Enter visual (character) mode |
| V | Enter visual line mode |
| d / y / c | Delete / yank / change visual selection |
| Key | Action |
|---|---|
| iw / aw | Inner word / around word (includes surrounding space) |
| i" / a" | Inner / around double quotes |
| i( / a( | Inner / around parentheses |
| i{ / a{ | Inner / around curly braces |
| Key | Action |
|---|---|
| / / ? | Search forward / backward |
| n / N | Next / previous search match |
| {count}{motion} | Repeat motion N times (e.g., 3dd, 5j, 2dw) |
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 menuFull directory: claude.com/connectors (50+)
Pages, databases, views, comments, search, move, duplicate
Messages, channels, canvases, search public/private
Read messages/threads, search, create drafts, labels
SQL, edge functions, migrations, branches, projects
15 tools: read/write/search/complete/sync, bookmarks
Custom Discord bot integration
Up-to-date docs and code examples for any library
Repos, PRs, issues, CI/CD, code review
File access, search, docs
Issue tracking, project management
Issues, sprints, Atlassian ecosystem
Design files, component inspection
Payments, subscriptions
Structured data management
Natural language DB queries
Error tracking and analysis
Browser automation, scraping
Source: env-vars docs
| Variable | Description |
|---|---|
| ANTHROPIC_API_KEY | API key for direct Anthropic API access |
| ANTHROPIC_BASE_URL | Override API endpoint URL |
| CLAUDE_CODE_API_KEY | API key specifically for Claude Code |
| CLAUDE_API_KEY | Alternative API key variable |
| Variable | Description |
|---|---|
| ANTHROPIC_MODEL | Override default model selection |
| CLAUDE_CODE_USE_BEDROCK | Use Amazon Bedrock as provider (1 to enable) |
| CLAUDE_CODE_USE_VERTEX | Use Google Vertex AI as provider (1 to enable) |
| AWS_REGION | AWS region for Bedrock (e.g., us-east-1) |
| AWS_ACCESS_KEY_ID | AWS access key for Bedrock auth |
| AWS_SECRET_ACCESS_KEY | AWS secret key for Bedrock auth |
| AWS_SESSION_TOKEN | AWS session token (temporary credentials) |
| ANTHROPIC_BEDROCK_BASE_URL | Custom Bedrock endpoint URL |
| GOOGLE_CLOUD_PROJECT | GCP project ID for Vertex AI |
| CLOUD_ML_REGION | GCP region for Vertex AI |
| ANTHROPIC_VERTEX_BASE_URL | Custom Vertex AI endpoint URL |
| Variable | Description |
|---|---|
| CLAUDE_CODE_EFFORT_LEVEL | Thinking level: low, medium, high, xhigh, max, auto |
| CLAUDE_CODE_THINKING_BUDGET | Max thinking tokens per response |
| MAX_THINKING_TOKENS | Set to 0 to disable extended thinking entirely |
| CLAUDE_CODE_MAX_OUTPUT_TOKENS | Max model output tokens per response |
| CLAUDE_CODE_SAFE_MODE | Start with all customizations disabled (same as --safe-mode) |
| CLAUDE_CODE_USE_POWERSHELL_TOOL | Use PowerShell as the primary shell on Windows |
| CLAUDE_CODE_DISABLE_BUNDLED_SKILLS | Hide bundled skills and workflows from the model |
| CLAUDE_CODE_DISABLE_AUTO_MEMORY | Disable automatic memory |
| CLAUDE_CODE_SKIP_CLAUDE_MD | Skip loading CLAUDE.md files |
| CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC | Disable telemetry and non-essential network calls |
| Variable | Description |
|---|---|
| CLAUDE_CODE_THEME | Set color theme (light, dark, etc.) |
| CLAUDE_CODE_OUTPUT_STYLE | Output style: default, explanatory, learning |
| CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION | Enable/disable prompt suggestions |
| NO_COLOR | Disable colored terminal output |
| FORCE_COLOR | Force colored output even when not auto-detected |
| Variable | Description |
|---|---|
| BASH_DEFAULT_TIMEOUT_MS | Default bash timeout (ms) |
| BASH_MAX_TIMEOUT_MS | Max bash timeout (ms) |
| API_TIMEOUT_MS | API request timeout (default 10 minutes) |
| MAX_MCP_OUTPUT_TOKENS | Max tokens for MCP output (default 25000) |
| MCP_TIMEOUT | MCP server startup timeout (ms) |
| MCP_TOOL_TIMEOUT | Per-tool MCP execution timeout (ms) |
| CLAUDE_CODE_MAX_TURNS | Max agentic turns per session |
| Variable | Description |
|---|---|
| HTTP_PROXY | HTTP proxy URL for outbound requests |
| HTTPS_PROXY | HTTPS proxy URL for outbound requests |
| NO_PROXY | Comma-separated hosts to bypass proxy |
| Variable | Description |
|---|---|
| CLAUDE_CODE_DISABLE_CRON | Stop scheduled jobs |
| ENABLE_CLAUDEAI_MCP_SERVERS | Enable/disable claude.ai servers |
| CLAUDE_CODE_DISABLE_1M_CONTEXT | Disable 1M context window |
| CLAUDE_CODE_DISABLE_BACKGROUND_TASKS | Disable background tasks |
| CLAUDE_CODE_TASK_LIST_ID | Named task list shared across sessions |
| CLAUDE_CODE_ENABLE_TELEMETRY | Enable/disable usage telemetry |
| CLAUDE_CODE_DISABLE_PLUGINS | Disable all plugins |
| CLAUDE_CODE_DISABLE_WORKFLOWS | Disable dynamic multi-agent workflows |
| ENABLE_TOOL_SEARCH | MCP tool deferral: true, auto, auto:N, false |
| CLAUDE_CODE_ENABLE_AWAY_SUMMARY | Show a session recap when you return |
| DISABLE_AUTOUPDATER | Disable automatic updates |
| DISABLE_UPDATES | Block ALL update paths, including manual claude update |
| Variable | Description |
|---|---|
| CLAUDE_CODE_DEBUG | Enable debug output (categories: api, mcp, etc.) |
| CLAUDE_CODE_LOG_LEVEL | Log verbosity: error, warn, info, debug |
| USE_BUILTIN_RIPGREP | Use bundled ripgrep (0 to use system install) |
| CLAUDE_PROJECT_DIR | Project root path (set by Claude Code for hooks/MCP servers) |
| CLAUDE_CODE_SESSION_ID | Session ID (exported to subprocesses and MCP servers) |
Source: MCP docs
| Command | Description |
|---|---|
| claude mcp | Interactive MCP setup wizard |
| claude mcp list | List 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 sse | Add SSE transport server (deprecated — use HTTP) |
| claude mcp add --transport http | Add HTTP transport server |
| claude mcp add-json <name> '<json>' | Add from raw JSON config |
| claude mcp add-from-claude-desktop | Import from Claude Desktop config |
| claude mcp remove <name> | Remove a configured server |
| claude mcp reset-project-choices | Reset approval choices for project-scoped servers |
| claude mcp serve | Run Claude Code as an MCP server |
Patterns that produce the best results. Source: best-practices
| Practice | Why & How |
|---|---|
| Give Claude a way to verify its work | The single highest-leverage thing you can do. Provide tests, screenshots, or expected outputs so Claude can self-check. |
| Explore first, plan, then code | Use 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 context | Reference 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 tasks | Long sessions with mixed topics fill context with irrelevant info. Fresh context = better results. |
| Course-correct early and often | Press 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 investigation | Subagents explore in separate context windows. "Use subagents to investigate how auth handles token refresh" keeps your main context clean. |
| Write an effective CLAUDE.md | Keep 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 you | For 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 sessions | Don't mix unrelated tasks in one session. Context gets polluted with irrelevant info. Use /clear or start a new session. |
| Scale with parallel sessions | Run multiple Claude sessions in worktrees, use Writer/Reviewer pattern, or fan out across files with claude -p in a loop. |
Quick reference for everyday tasks. Source: common-workflows
| Workflow | Example 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 images | Drag/drop or Ctrl+V to paste screenshots. "Here's the error screenshot. What's causing it?" |
| Plan complex changes | Enter Plan Mode (Shift+Tab) → "I need to add OAuth2. What files change?" → Switch to Normal → "Implement the plan" |
| Use as Unix utility | cat 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 |
Run multiple Claude agents working together. Source: sub-agents
| Concept | Description |
|---|---|
| --teammate-mode <mode> | Display mode for agent teams: auto, in-process (inline), tmux (separate panes) |
| Shared Task Lists | Set CLAUDE_CODE_TASK_LIST_ID to share a named task list across multiple sessions |
| Agent Config Files | Define agents in .claude/agents/*.md with frontmatter (name, model, tools, system prompt) |
| Writer / Reviewer Pattern | One agent writes code, another reviews in clean context. Use worktrees for isolation. |
| Fan-Out Pattern | claude -p in a loop: process multiple files in parallel with separate agent instances |
Control how Claude formats responses. Set via /config or CLAUDE_CODE_OUTPUT_STYLE env var.
| Style | Description |
|---|---|
| Default | Concise, action-oriented responses. Minimal explanation. |
| Explanatory | Includes reasoning and context behind decisions. Good for code review and learning why. |
| Learning | Detailed explanations with concepts, analogies, and background. Best for beginners and unfamiliar domains. |
Monitor and control token usage. Source: costs
| Tool | Description |
|---|---|
| /cost vs /usage | /cost = session tokens & estimated cost. /usage = plan limits & rate limit status. |
| --max-budget-usd N | Set 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 Selection | Haiku 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 Impact | Lower effort = fewer thinking tokens = lower cost. Use /effort low for simple tasks. |
Use Claude Code in automated systems that test and deploy code. Source: GitHub Actions
| Pattern | Description |
|---|---|
| GitHub Actions | Use claude -p in workflow YAML. Set ANTHROPIC_API_KEY as repo secret. Use /install-github-app for PR review. |
| GitLab CI | Add claude -p steps to .gitlab-ci.yml. Same flags and env vars as local usage. |
| --print Mode | Non-interactive output for automation. Pair with --output-format json for structured results. |
| --dangerously-skip-permissions | Skip permission prompts in CI. Requires --allow-dangerously-skip-permissions first. |
| Cost Controls | Use --max-turns N and --max-budget-usd N to cap CI agent runs. |
Most common issues and fixes. Full guide: troubleshooting
| Problem | Fix |
|---|---|
| "command not found: claude" | Add ~/.local/bin to your PATH. See /doctor for diagnostics. |
| 403 Forbidden after login | Check subscription at claude.ai/settings. Unset ANTHROPIC_API_KEY if it overrides your sub. |
| OAuth error: Invalid code | Retry quickly. Press c to copy URL if browser doesn't open. Check if remote/SSH opened on wrong machine. |
| Repeated permission prompts | Use /permissions to allowlist specific tools. Or use Shift+Tab to switch to Accept Edits mode. |
| High CPU / memory usage | Use /compact regularly. /clear between tasks. Add build dirs to .gitignore. |
| Command hangs or freezes | Ctrl+C to cancel. If unresponsive, close terminal and restart. |
| Search / @file not working | Install system ripgrep: brew install ripgrep (mac), apt install ripgrep (linux), winget install BurntSushi.ripgrep.MSVC (win) |
| Esc key not working in JetBrains | Settings → Tools → Terminal → uncheck "Move focus to editor with Escape" |
| WSL installation issues | Ensure node/npm point to Linux paths (/usr/), not Windows (/mnt/c/). Use nvm for node management. |
| Reset all settings | rm ~/.claude.json && rm -rf ~/.claude/ (removes all settings, MCP configs, session history) |
| TLS / certificate errors | Check proxy or corporate cert config. Set NODE_EXTRA_CA_CERTS to your CA bundle path. |
| ECONNREFUSED on MCP server | Ensure MCP server process is running. Check port/path. Run claude mcp list to verify config. |
| Context window exceeded | Use /compact to compress history, /clear between tasks, or start a new session. Check /context for usage. |
Every key term you'll encounter when using Claude Code, sorted alphabetically.
| Term | Definition |
|---|---|
| Adaptive Reasoning | Recent 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 Loop | Claude 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. |
| Alias | An 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 Key | A 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 Mode | A 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 Task | A command or process running behind the scenes while you continue working. Start with Ctrl+B or the & prefix. Check status with /tasks. |
| Bash / Shell | The 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 Token | An 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. |
| Checkpoint | An 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.md | A 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). |
| Compaction | Compressing 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. |
| Connector | A 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 Window | The 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 Task | A 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. |
| Diff | A visual comparison showing what changed between two versions of code. Green = added, red = removed. Claude shows diffs before applying edits. View with /diff. |
| Effort Level | Controls 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 Thinking | When 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 Mode | Makes 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. |
| Flag | An 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." |
| Frontmatter | Metadata 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. |
| Git | Version 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 Mode | Running 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. |
| Hook | A 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. |
| Model | The 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.js | A 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. |
| OAuth | An 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. |
| PATH | A 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 Mode | Controls 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 Mode | A 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. |
| Plugin | An installable package that bundles skills, hooks, agents, and MCP servers into one unit. Install from marketplace with /plugin. Community and Anthropic-official plugins available. |
| Prompt | The 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 Limit | A 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 Control | Feature 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). |
| Sandbox | An 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. |
| Session | A 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. |
| Skill | A 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 Command | A 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-agent | A 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 Prompt | Hidden 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). |
| Terminal | The 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. |
| Token | The 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. |
| Tool | A 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. |
| Ultrathink | A 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 / Workflows | Include "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 Mode | Shows 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. |
| Worktree | An 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. |
Where Claude Code stores its settings. Source: settings
| File | Purpose |
|---|---|
| ~/.claude/settings.json | User settings: permissions, hooks, model overrides. Applies to all projects. |
| .claude/settings.json | Project settings. Check into git to share with team. |
| .claude/settings.local.json | Local project settings. NOT committed to git. |
| ~/.claude.json | Global state: theme, OAuth tokens, MCP servers. |
| ~/.claude/CLAUDE.md | Global memory: instructions that apply to ALL sessions. |
| ./CLAUDE.md | Project memory: conventions, rules for this repo. Check into git. |
| .mcp.json | Project 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.md | Personal project instructions. NOT committed (gitignored). |
| ~/.claude/keybindings.json | Custom keyboard shortcut bindings. |
| AppData/Roaming/Claude/claude_desktop_config.json | Claude Desktop config: MCP servers, preferences. (Windows path shown) |
The repos, docs, blogs, and communities every Claude Code user should know. Star counts & member counts verified June 10, 2026.
| Resource | What It Is |
|---|---|
| Official Docs | code.claude.com/docs — the canonical documentation for every Claude Code surface |
| Changelog / Release Notes | Version-by-version release notes — what's new in every update |
| Claude Code Best Practices | The canonical Anthropic engineering post on agentic coding workflows |
| Building Agents with the Claude Agent SDK | How to build custom agents on the engine that powers Claude Code |
| How Anthropic Teams Use Claude Code | Real internal usage stories — lawyers, marketers, and engineers alike |
| How We Built Auto Mode | Anthropic engineering post on safer permission-skipping (March 2026) |
| Connectors Directory | Official MCP connector directory — browse 50+ verified integrations |
| Plugin Marketplace | Official web directory of 150+ plugins with install counts & verified badges |
| Repo | Why 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 | What 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 |
| ClaudeLog | Independent knowledge base of Claude Code guides & mechanics |
A plain-language overview of what Claude Code is, how it works, and what you need to know.
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 →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:
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 →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 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.
Claude Code has several permission modes that control how much autonomy Claude has:
Press Shift+Tab to cycle between modes during a session.
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 →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.
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.
Claude Code can use different AI models:
Switch with /model or Alt+P. Fast Mode (/fast, Opus only) makes the model output up to 2.5x faster at a higher cost.
Sources: commands | cli-reference | interactive-mode | changelog | connectors — verified against Claude Code v2.1.170, June 10, 2026