Reference Board

Claude Code Cheat Sheet

Dense, current, and practical: commands, settings, skills, hooks, MCP, worktrees, routines, and setup paths in one place.

Verified against official Anthropic / Claude Code docs on April 15, 2026.
Commands → Settings →
Language
Install

Node 18+, then install and run Claude in your project.

npm install -g @anthropic-ai/claude-code
Sign in

Interactive login is the normal path. API keys override subscriptions when present.

/login
Resume

Continue the latest session or resume a specific session by ID.

claude -c
Permissions

Use /permissions or settings.json to control allow / ask / deny behavior.

/permissions
MCP

Add tool servers with claude mcp add, then inspect them with /mcp.

claude mcp add ...
Use this page like a board, not a tutorial Use the left navigation on desktop, the sticky search on mobile, and jump directly to the raw command or key you need.

Install & first run

Official install paths as of April 15, 2026:

CommandDetails
Standard NPM install
npm install -g @anthropic-ai/claude-code
Official standard install path. Avoid sudo.
Native install (beta)
curl -fsSL claude.ai/install.sh | bash
macOS, Linux, and WSL beta install path.
Windows PowerShell
irm https://claude.ai/install.ps1 | iex
Native Windows PowerShell install path.
Health check
claude doctor
Verify installation type and fix common issues.

High-signal starter prompts

Good first prompts to keep Claude useful and scoped:

Codebase orientation

Explain this project architecture, key entry points, build/test commands, and the files I should read first.

Safe implementation start

Before coding, inspect the repo, identify the relevant files, propose the smallest safe plan, then implement it and run verification.

Targeted bug hunt

Investigate this failure, find the root cause, patch it with the smallest change that fixes it, and explain the regression risk.

CLI launch patterns

Launch-time patterns worth memorizing:

CLI launch patterns

CommandPurposeCategory
claude Start interactive REPL Interactive
claude "query" Start REPL with an initial prompt Interactive
claude -p "query" One-shot query, then exit Non-interactive
cat file | claude -p "query" Pipe content into print mode Non-interactive
claude -c Continue the most recent conversation Session
claude -c -p "query" Continue via SDK / print mode Session
claude -r "<session-id>" "query" Resume a specific session by ID Session
claude update Update Claude Code to latest version Maintenance
claude mcp Configure MCP servers from the CLI MCP
claude agents List all sessions — running, blocked, or done (Agent View, research preview) Agents
claude project purge [path] Delete all Claude Code state for a project (transcripts, tasks, file history, config); supports --dry-run Maintenance
claude ultrareview [target] Run /ultrareview non-interactively from CI or scripts; prints findings to stdout Review

Flags

CommandPurpose
--verbose Verbose turn-by-turn logging
--max-turns Limit agentic turns in print mode
--model Override model for the current launch
--permission-mode Start in default / plan / auto / bypass-style mode
--permission-prompt-tool Use an MCP tool to answer permission prompts in non-interactive mode
--resume Resume a specific session by ID
--continue Resume the latest conversation in the current directory
--dangerously-skip-permissions Skip permission prompts; use with caution
--output-format json Machine-readable output for scripting

Built-in commands

Built-in commands documented in the current Commands reference:

CommandPurposeCategoryAvailability
/add-dir <path> Add a working directory for file access Context Built-in
/agents Manage agent configurations Agents Built-in
/autofix-pr [prompt] Watch a PR remotely and push fixes for CI / review feedback Automation Plan / platform specific
/batch <instruction> Parallel large-scale codebase change orchestration Bundled skill Bundled skill
/branch [name] Fork the current conversation into a branch Session Built-in
/btw <question> Ask a side question without polluting main context Context Built-in
/chrome Configure Claude in Chrome settings Platform Plan / platform specific
/claude-api Load Claude API reference for the project language Bundled skill Bundled skill
/clear Clear conversation history and free context Session Built-in
/color [color|default] Set the prompt bar color for this session UI Built-in
/compact [instructions] Compact the conversation with optional focus Context Built-in
/config Open the settings UI Settings Built-in
/context Visualize context usage and optimization hints Context Built-in
/copy [N] Copy the latest assistant response or code block Utility Built-in
/cost Show token usage statistics Usage Built-in
/debug [description] Enable debug logging and investigate session issues Bundled skill Bundled skill
/desktop Continue the session in the desktop app Platform Plan / platform specific
/diff Open the interactive diff viewer Review Built-in
/doctor Diagnose installation and settings Maintenance Built-in
/effort [low|medium|high|max|auto] Change effort level immediately Model Built-in
/exit Exit the CLI Session Built-in
/export [filename] Export the current conversation Utility Built-in
/extra-usage Configure extra usage beyond limits Usage Plan / platform specific
/fast [on|off] Toggle fast mode Model Plan / platform specific
/feedback [report] Send feedback or a bug report Utility Built-in
/goal <condition> Set a completion condition — Claude keeps working across turns until it's met; shows live elapsed/turns/tokens overlay Autonomous Built-in
/help Show help and available commands Utility Built-in
/hooks Inspect configured hooks Hooks Built-in
/ide Manage IDE integration and status IDE Built-in
/init Generate CLAUDE.md guidance for the project Setup Built-in
/insights Analyze Claude Code session patterns Usage Built-in
/install-github-app Set up the Claude GitHub Actions app Automation Plan / platform specific
/install-slack-app Install the Claude Slack app Automation Plan / platform specific
/keybindings Open keybindings configuration Settings Built-in
/login Sign in to your Anthropic account Auth Built-in
/logout Sign out from Anthropic account Auth Built-in
/loop [interval] [prompt] Run a prompt repeatedly while the session stays open Bundled skill Bundled skill
/mcp Manage MCP connections and OAuth MCP Built-in
/memory Edit memory files and auto-memory settings Memory Built-in
/mobile Show QR code for the Claude mobile app Platform Plan / platform specific
/model [model] Change the model immediately Model Built-in
/passes Share a free week of Claude Code Plan Plan / platform specific
/permissions Manage allow / ask / deny rules and working dirs Settings Built-in
/plan [description] Enter plan mode directly Planning Built-in
/plugin Manage Claude Code plugins Plugins Built-in
/powerup Interactive feature lessons Learning Built-in
/pr-comments [PR] Removed in v2.1.91; ask Claude directly instead Review Deprecated / removed
/privacy-settings Manage privacy settings Privacy Plan / platform specific
/release-notes Open the changelog picker Maintenance Built-in
/reload-plugins Reload active plugins without restart Plugins Built-in
/remote-control Expose this session to claude.ai remote control Remote Plan / platform specific
/remote-env Choose the default remote web environment Remote Plan / platform specific
/rename [name] Rename the current session Session Built-in
/resume [session] Resume a session by ID, name, or picker Session Built-in
/review Deprecated; install the code-review plugin instead Review Deprecated / removed
/rewind Rewind conversation and/or code to a checkpoint Session Built-in
/sandbox Toggle sandbox mode where supported Safety Plan / platform specific
/schedule [description] Create and manage routines Automation Built-in
/scroll-speed [value] Tune mouse wheel scroll speed with a live preview UI Built-in
/security-review Review current changes for security issues Review Built-in
/setup-bedrock Configure Amazon Bedrock auth and model pins Providers Plan / platform specific
/setup-vertex Configure Google Vertex AI auth and model pins Providers Plan / platform specific
/simplify [focus] Review recent changes for reuse and quality, then fix them Bundled skill Bundled skill
/skills List available skills Skills Built-in
/stats Show usage history, streaks, and model preferences Usage Built-in
/status Open status view with version, model, account, connectivity Settings Built-in
/statusline Configure the status line UI Built-in
/stickers Order Claude Code stickers Fun Plan / platform specific
/tasks List and manage background tasks Tasks Built-in
/team-onboarding Generate a teammate onboarding guide from usage history Team Built-in
/teleport Pull a Claude Code web session into the terminal Remote Plan / platform specific
/terminal-setup Configure Shift+Enter and terminal-specific shortcuts Settings Built-in
/theme Change theme, including daltonized and ANSI themes UI Built-in
/ultraplan <prompt> Draft a plan in a browser-backed ultraplan session Planning Plan / platform specific
/upgrade Open the upgrade page for a higher plan Plan Plan / platform specific
/usage Show plan usage and rate limits Usage Built-in
/vim Removed in v2.1.92; use /config → Editor mode Settings Deprecated / removed
/voice Toggle push-to-talk voice dictation Input Plan / platform specific
/web-setup Connect GitHub account for Claude Code on the web Remote Plan / platform specific
/mcp__<server>__<prompt> Prompt exposed dynamically by an MCP server MCP Built-in

Keyboard & input

Interactive controls from current Interactive mode docs:

ShortcutAction
Ctrl+C Cancel current input or generation
Ctrl+D Exit Claude Code
Ctrl+L Clear terminal screen, keep history
Esc Esc Edit the previous message
Shift+Tab Cycle permission modes
\ + Enter Multiline input in every terminal
Option+Enter Default multiline on macOS
Shift+Enter Works out of the box in iTerm2, WezTerm, Ghostty, Kitty
Ctrl+O Open transcript viewer
/, !, @ Slash command, Bash mode, file / resource mention

Memory, paths & scope

Where Claude stores memory and project-level behavior:

Path / keyScopeDetails
./CLAUDE.md or ./.claude/CLAUDE.md Shared project instructions Project architecture, coding standards, common workflows; committed with the repo.
./CLAUDE.local.md Personal project instructions Project-specific but not team-shared; add to .gitignore.
~/.claude/CLAUDE.md User instructions Your personal defaults across every project.
.claude/settings.json Shared project settings Team-visible settings such as permissions, hooks, shared MCP behavior.
.claude/settings.local.json Local project settings Personal preferences for this repo; automatically gitignored when Claude creates it.
~/.claude/settings.json User settings Applies to all projects on your machine.
~/.claude.json Global config Holds global keys like editor mode and IDE auto-connect, not regular settings.json keys.
.mcp.json Shared MCP project config Project-scoped MCP server definitions shared with the repo.
~/.claude/skills/<name>/SKILL.md Personal skills Reusable skills across all projects.
.claude/skills/<name>/SKILL.md Project skills Repo-local skills for the current codebase.
~/.claude/agents/ and .claude/agents/ Subagent definitions User-wide and project-wide custom subagents.

Settings & permissions

The settings system is hierarchical. Put team defaults in shared files, personal tweaks in local or user scope.

Hierarchy

  • ~/.claude/settings.json User settings across every project
  • .claude/settings.json Shared project settings
  • .claude/settings.local.json Personal settings for one repo
  • managed-settings.json Enterprise policy, highest precedence

Core top-level settings

  • autoMode Classifier rules for auto mode
  • autoUpdatesChannel stable vs latest update stream
  • availableModels Restrict selectable models
  • cleanupPeriodDays Session retention and orphan cleanup
  • defaultShell Shell for ! commands
  • effortLevel Persist low / medium / high effort
  • env Environment variables applied to each session
  • fastModePerSessionOptIn Require /fast each session
  • fileSuggestion Custom script for @ autocomplete
  • language Preferred response language
  • model Default model override
  • modelOverrides Map Anthropic IDs to provider-specific IDs
  • outputStyle Default / Explanatory / Learning / custom style
  • plansDirectory Store generated plans elsewhere
  • prefersReducedMotion Accessibility and reduced animation
  • respectGitignore Apply .gitignore to @ picker suggestions
  • statusLine Custom status line command / renderer
  • useAutoModeDuringPlan Auto-mode semantics during plan mode
  • viewMode Default transcript view mode
  • voiceEnabled Push-to-talk voice dictation

Security / policy settings

  • permissions allow / ask / deny / additionalDirectories / defaultMode
  • disableAllHooks Turn off hooks and custom status line
  • disableAutoMode Forbid auto mode entirely
  • disableDeepLinkRegistration Disable claude-cli:// handler registration
  • disableSkillShellExecution Block inline shell execution inside skills
  • enableAllProjectMcpServers Auto-approve all project MCP servers
  • enabledMcpjsonServers Allowlist specific .mcp.json servers
  • disabledMcpjsonServers Reject specific .mcp.json servers
  • deniedMcpServers Managed denylist for MCP servers
  • forceLoginMethod Restrict to claude.ai or console login
  • forceLoginOrgUUID Require membership in specific org UUIDs
  • httpHookAllowedEnvVars Allowlist vars interpolated into HTTP hooks

Global config in ~/.claude.json

  • autoConnectIde Auto-connect to IDE from external terminal
  • autoInstallIdeExtension Install IDE extension automatically
  • editorMode normal or vim input mode
  • showTurnDuration Display per-turn duration
  • terminalProgressBarEnabled Enable progress bar in supported terminals
  • teammateMode How agent-team teammates are displayed

Worktree settings

  • worktree.symlinkDirectories Symlink large directories like node_modules
  • worktree.sparsePaths Use sparse checkout for large monorepos
  • .worktreeinclude Copy gitignored files such as .env into new worktrees

Permission modes

  • default Normal interactive behavior
  • acceptEdits Good for trusted repo edits with fewer interruptions
  • plan Planning first, implementation only after approval
  • auto Classifier-driven auto mode where available
  • dontAsk Aggressive reduced prompting
  • bypassPermissions Highest-risk mode; can be disabled by policy

Permission rule patterns

  • Bash(git diff *) Allow safe inspection commands
  • Bash(git push *) Ask before pushes
  • Read(./.env) Hide secrets completely
  • Read(./secrets/**) Hide secret directories completely
  • Skill(deploy *) Deny risky deployment skills unless explicit
  • WebFetch Disable outbound fetches if policy requires it

Useful environment variables

  • ANTHROPIC_API_KEY Override subscription auth with API usage
  • ANTHROPIC_BASE_URL Route requests through a proxy or gateway
  • CLAUDE_CODE_NEW_INIT Interactive /init flow with memory, skills, and hooks
  • CLAUDE_CONFIG_DIR Use a different config directory for a second account / profile
  • CLAUDE_ENV_FILE Persist environment variables across Bash commands
  • CLAUDE_CODE_USE_BEDROCK Use Amazon Bedrock provider
  • CLAUDE_CODE_USE_VERTEX Use Google Vertex AI provider
  • CLAUDE_CODE_USE_POWERSHELL_TOOL Enable native PowerShell tool on Windows
  • CLAUDE_CODE_TASK_LIST_ID Share a task list across sessions
  • CLAUDE_CODE_NO_FLICKER Enable fullscreen rendering research preview
  • CLAUDE_CODE_SYNTAX_HIGHLIGHT Disable syntax highlighting if terminal colors misbehave
  • CLAUDE_ENABLE_STREAM_WATCHDOG Abort hung streams in automation scenarios

Hooks

Hooks are lifecycle automations defined in settings JSON. Keep SessionStart fast; use CLAUDE.md for static context.

EventWhen it firesNotes
SessionStart On new or resumed session Only command hooks; keep it fast. Prefer CLAUDE.md for static context.
PreToolUse Before a tool runs Can allow, deny, escalate, mutate input, or inject extra context.
PermissionRequest When Claude needs approval Can answer permission prompts programmatically.
PostToolUse After a tool finishes Good for logging, async checks, and post-processing.
PreCompact Before compaction Can block manual or auto compaction.
PostCompact After compaction React to the new compacted state.
SessionEnd When the session closes Cleanup, logging, finalization; cannot block exit.
Elicitation When an MCP server asks for user input Hooks can answer instead of showing a dialog.
SubagentStop When a subagent finishes Stop hooks inside subagents are converted here.

Skills

Skills are reusable prompt workflows. Claude can invoke them automatically unless you disable model invocation.

Bundled skills

  • /batch Parallel large codebase migration / transformation with isolated worktrees and PRs
  • /claude-api Bring in Claude API reference material for SDK work
  • /debug Turn on debug logging and inspect session logs
  • /loop Repeat a prompt while the current session stays open
  • /simplify Parallel quality pass over recently changed files

SKILL.md frontmatter

  • name Slash-command name; defaults to directory name
  • description When the skill should be used; most important field
  • disable-model-invocation Prevents Claude from auto-loading the skill
  • allowed-tools Restrict tools available while the skill runs
  • context Can run inline or in a fork / subagent context
  • shell Use PowerShell for ! blocks on Windows where supported
  • $ARGUMENTS / $0 / $1 Argument substitution inside SKILL.md

Tools, subagents & tasks

Claude’s built-in tools matter because permissions, hooks, and subagents all reference these exact names.

Built-in tools

Tool / conceptPurposePermission
Agent Spawn a subagent with separate context No
AskUserQuestion Gather requirements or disambiguate No
Bash Run shell commands Yes
Edit Make targeted file edits Yes
Write Create or overwrite files Yes
Read / Glob / Grep Read and search the repo No
LSP Definitions, references, warnings, type errors No
Monitor Watch logs or status in background Yes
EnterWorktree Create or enter isolated git worktree No
TaskCreate / TaskList / TaskUpdate Interactive task system No
Skill Run a reusable prompt workflow Yes
WebFetch / WebSearch Use the web where enabled Yes

Subagents & agent teams

  • Explore Fast, read-only codebase search and analysis agent (Haiku)
  • Plan Research agent used while Claude is in plan mode
  • General-purpose Multi-step agent for exploration plus modification
  • Custom subagents Markdown definitions with frontmatter and tool restrictions
  • Agent teams Experimental teammate mode controlled via settings and env flags

MCP

MCP gives Claude extra tools, prompts, and resources. Use scopes deliberately:

MCP commands

  • claude mcp add --transport stdio myserver -- npx my-mcp Add a stdio server
  • claude mcp add --transport http hubspot https://mcp.example.com Add an HTTP server
  • claude mcp list List configured servers
  • claude mcp get github Inspect one server
  • claude mcp remove github Remove a server
  • /mcp Inspect server status and handle OAuth inside Claude

MCP patterns to remember

  • --scope local Only you in the current project (new name for older project-local scope)
  • --scope project Shared with the repo via .mcp.json
  • --scope user Available across all projects for the current user
  • @server:protocol://resource/path Reference an MCP resource with @ mention
  • /mcp__<server>__<prompt> Run an MCP prompt exposed as a command
  • MCP_TIMEOUT Startup timeout for MCP servers
  • MAX_MCP_OUTPUT_TOKENS Default cap is 25,000 tokens; warning starts above 10,000
  • list_changed Dynamic refresh of tools, prompts, and resources without reconnecting
  • --channels Enable pushed channel messages from MCP servers that support them

Worktrees, remote & routines

Use isolation when parallel work would otherwise collide:

  • claude --worktree feature/name Launch Claude inside a new isolated git worktree
  • /schedule Create, update, list, or run routines conversationally
  • /tasks Inspect long-running background tasks
  • --remote Start or connect to Claude Code on the web / remote environments
  • /remote-env Choose the default web environment used by --remote
  • /teleport Pull a web session back into the terminal
  • /remote-control Let claude.ai remote-control this terminal session

IDE, web & desktop

Current official surfaces beyond the plain terminal:

  • VS Code / Cursor / Windsurf / VSCodium Run claude in the integrated terminal and the extension auto-installs
  • JetBrains IDEs Dedicated plugin with quick launch, diff viewer, selection context, diagnostics
  • Cmd+Esc / Ctrl+Esc Quick launch from supported IDE integrations
  • Cmd+Option+K / Alt+Ctrl+K Insert file reference shortcuts from the IDE
  • /ide Connect an external terminal session back to the IDE
  • Desktop app Use /desktop to continue the session in the desktop UI
  • Claude Code on the web Remote browser-based sessions with environment selection and setup scripts

Sources

Primary sources used for this sheet:

SourceFreshness
Commands Crawled 2 days ago
CLI reference Crawled 7 months ago
Settings Crawled 2 days ago
Interactive mode Crawled 7 months ago
Hooks reference Crawled 7 months ago
Skills Crawled last week
Memory Crawled 7 months ago
MCP Crawled last week
Subagents Crawled 7 months ago
Tools reference Crawled 4 days ago
Environment variables Crawled last week
IDE integrations Crawled 7 months ago
Getting started Crawled 8 months ago