Claude Code: The Complete Guide
Master Anthropic's agentic coding tool - from basic setup in the terminal or the desktop app to advanced MCP servers, subagents, Git workflows, and IDE integrations.
01 What is Claude Code?
- Updated: Current models: Claude Opus 5.5, Sonnet 5.5, Haiku 5.5 and Fable 5.2, all with a 1M-token context window, plus their aliases and API prices
- Added: The Claude desktop app and its Code tab: download links, parallel sessions, plan mode and pull request tracking, with two video walkthroughs
- Expanded: Install options (CMD, npm, Linux package managers), authentication accounts and the Pro, Max and Ultra plans
- Added (August 2026): Effort levels for cost control
- Added: Agent teams, background agents, and Claude Code on the web and desktop
- Added: Auto memory — Claude now maintains persistent per-project notes automatically
- Added: Plugins ecosystem and path-scoped
.claude/rules/files - Updated: Permission modes, headless automation guidance, and hook examples current through v2.1.x
According to Anthropic's official documentation, Claude Code represents a paradigm shift in how developers interact with AI assistants. Unlike web-based chatbots, Claude Code operates within your actual development environment, understanding your codebase context and executing real actions.
Claude Code in the Claude Desktop App
Anthropic's docs say: "In the Claude Desktop app, Claude Code is the Code tab. The app also has chat and Cowork, which handles Dispatch and longer agentic work." (Desktop docs). The desktop app includes Claude Code, so the Code tab needs no separate CLI install, but a paid subscription is required. Computer use is a research preview on macOS and Windows that requires a Pro, Max, or Ultra plan, and it is not available on Team or Enterprise plans. Section 2 has the download links and section 9 covers the Code tab itself.
Why Claude Code Matters
Traditional AI coding assistants require you to copy-paste code snippets back and forth. Claude Code eliminates this friction by:
- Direct File Access: Read, write, and edit files in your project without manual copying
- Git Integration: Create commits, branches, and pull requests directly
- Terminal Execution: Run commands, tests, and build scripts
- Context Awareness: Understand your entire codebase structure
- Extensibility: Connect to external tools via MCP servers
Terminal Native
Runs in your terminal with full shell integration and command execution
Context Aware
Understands your entire codebase with up to a 1M token context window on the current models
Git Integrated
Create commits, branches, and PRs without leaving the conversation
Extensible
Connect to databases, APIs, and external tools via MCP
Claude Code vs Other AI Assistants
| Feature | Claude Code | Cursor | GitHub Copilot | Web-based AI |
|---|---|---|---|---|
| Environment | Terminal/CLI, IDE, desktop app, web | Custom IDE (VS Code fork) | IDE Plugin | Browser |
| File System Access | Full read/write | Full read/write | Read/write (agent mode) | None |
| Command Execution | Full terminal access | Integrated terminal | Via agent mode | No |
| Git Operations | Full support (commits, PRs) | Basic support | Basic (agent mode) | None |
| External Integrations | MCP servers (open standard) | MCP tools (subagents inherit the parent's tools) | Limited | None |
| Context Window | Up to 1M tokens (current models) | Varies by model | Varies by model | Varies |
| Subagents/Parallel | Multiple parallel agents | Parallel subagents | Orchestrator agent runs subagents in parallel in the Copilot app and CLI (GitHub docs) | No |
| Model Choice | Claude 5 family (Opus 5.5, Sonnet 5.5, Haiku 5.5, Fable 5.2) | Multiple (GPT, Claude, etc.) | Multi-model (GPT, Claude, Gemini) | Varies |
| Pricing | $20-200/mo or API | Free $0, Plus $8, Premium $30, Super $100, Ultra $200 per month (cursor.com/pricing, 9 Nov 2026) | Free $0, Pro $10, Pro+ $39, Max $100 per user/month (GitHub plans, 9 Nov 2026) | Free-$20/mo |
02 Installation & Setup
According to the Claude Code getting started guide, the recommended installation method is using the native binary installer, which provides the most stable experience.
System Requirements
| Requirement | Specification |
|---|---|
| Operating Systems | macOS 13.0+, Windows 10 1809+ or Windows Server 2019+, Ubuntu 20.04+, Debian 10+, Alpine Linux 3.19+ (on native Windows, Git for Windows is recommended for the Bash tool and PowerShell is the fallback; WSL 2 is needed for sandboxing) |
| RAM | 4 GB+, x64 or ARM64 processor |
| Node.js | 22+ (only for the optional npm installation) |
| Network | Stable internet connection required |
| Shell | Bash, Zsh, PowerShell, or CMD |
Installation Methods
macOS / Linux / WSL (Recommended)
curl -fsSL https://claude.ai/install.sh | bash
Windows PowerShell
irm https://claude.ai/install.ps1 | iex
Windows CMD
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd
Alternative Methods
brew install --cask claude-code
Homebrew (macOS) - Does not auto-update
winget install Anthropic.ClaudeCode
WinGet (Windows) - Does not auto-update
On Debian, Fedora, RHEL and Alpine you can also install with apt, dnf or apk (see the Linux package manager steps).
npm install -g @anthropic-ai/claude-code), which requires Node.js 22 or later and installs the same native binary. Do not use sudo with it.Prefer No Terminal? The Desktop App
Download the Claude desktop app for macOS (Intel and Apple Silicon), Windows x64 or Windows ARM64. On Ubuntu or Debian the app is in beta and installs with apt (Linux instructions). Launch Claude, sign in, and click the Code tab. The desktop quickstart says you do not need to install Node.js or the CLI to use the Code tab.
Authentication Setup
After installation, run claude to start the authentication process. Claude Code supports multiple authentication methods:
Subscribe to Claude's Pro ($20/mo, or $17/mo billed annually), Max ($100/mo) or Ultra ($200/mo) plan for unified billing (prices on the pricing page, 9 November 2026)
Connect through Claude Console with OAuth for pay-as-you-go API usage
Centralized billing and team management for organizations. The free claude.ai plan does not include Claude Code.
Configure with Amazon Bedrock, Google Cloud's Agent Platform, or Microsoft Foundry
Verify Installation
# Check installation
claude doctor
# Start Claude Code
claude
# Start with initial prompt
claude "explain this codebase"
# Resume last conversation
claude -c
Configuration Files
| File | Location | Purpose |
|---|---|---|
~/.claude/settings.json |
Home directory | User-level settings |
.claude/settings.json |
Project root | Project-specific settings (shared with team) |
.claude/settings.local.json |
Project root | Per-machine overrides (gitignored) |
~/.claude.json |
Home directory | MCP server configurations |
.mcp.json |
Project root | Project-scoped MCP servers |
03 Core Features & Commands
Claude Code provides a rich set of slash commands that enable powerful interactions. Here are the essential commands every user should know.
Essential Slash Commands
| Command | Description | Use Case |
|---|---|---|
/help |
Show all available commands | Discover features |
/init |
Scan project and create CLAUDE.md | Bootstrap new projects |
/clear |
Clear conversation history | Start fresh context |
/compact |
Summarize conversation to save context | Long sessions |
/memory |
Edit CLAUDE.md memory files | Configure project context |
/config |
Open configuration interface | Change settings |
/model |
Switch between Claude models | Opus / Sonnet / Haiku / Fable selection |
/cost (alias /usage) |
Check current token usage | Monitor spending |
/mcp |
Manage MCP server connections | External integrations |
/rewind |
Rewind to previous checkpoint | Undo changes |
/export |
Export conversation to file | Save sessions |
The Claude 5 Model Family & Effort Levels
Claude Code runs on the Claude 5 model family. Use /model to switch between them, or pass --model on the command line. Anthropic's models overview lists these four as the current models on 9 November 2026:
| Model | Alias in Claude Code | Context Window | API Pricing (per MTok in/out) | Best For |
|---|---|---|---|---|
| Claude Opus 5.5 | opus (account default) |
1M tokens | $4 / $20 | Long-running agentic coding, architecture, complex refactors |
| Claude Sonnet 5.5 | sonnet |
1M tokens | $2 / $10 | Everyday coding, speed and intelligence together |
| Claude Haiku 5.5 | haiku |
1M tokens | $0.10 / $0.50 for prompts up to 100K tokens; $0.50 / $2.50 above that | Fast, lightweight, high-volume tasks |
| Claude Fable 5.2 | fable (select it explicitly) |
1M tokens | $8 / $40 | Demanding reasoning and long-horizon agentic work (/model fable) |
Haiku 5.5 is priced by prompt length: prompts over 100,000 tokens pay the higher rates (see Anthropic's pricing page). Per the model configuration docs, default is Opus 5.5 on Pro, Max, Ultra, Team, Enterprise and the Anthropic API, and "No Fable model is the account-type default on any plan or provider." Older models such as Fable 5.1, Opus 5, Sonnet 5 and Haiku 4.5 are listed as legacy models that are still available. Claude Platform on AWS, Amazon Bedrock, Google Cloud's Agent Platform and Microsoft Foundry can map sonnet and haiku to different versions, so check the alias table for your provider.
Additional model aliases include default, best (the same model as opus), opus[1m], sonnet[1m] (long-context variants; no effect when the alias already resolves to a model with the native 1M window), and opusplan (Opus during plan mode, then Sonnet for execution).
low, medium, high, xhigh, and max — that control how much reasoning the model applies. Lower effort means faster, cheaper responses for simple tasks; higher effort improves quality on complex work. This is now the primary cost/quality lever in Claude Code.Keyboard Shortcuts
| Shortcut | Action |
|---|---|
| Escape | Interrupt Claude's current response or tool call (Ctrl+C also interrupts running work; with nothing running, the first press clears the input and a second press exits) |
| Escape + Escape | Open rewind menu / navigate previous messages |
| Up (Up Arrow) | Navigate through past chats |
| Ctrl + V | Paste images (Cmd+V also works in iTerm2 on macOS; Alt+V on Windows/WSL) |
| Tab | Autocomplete file paths and commands |
File References with @
Use the @ symbol to reference files directly in your prompts:
# Reference specific files
> Analyze @src/auth.ts and suggest improvements
# Compare multiple files
> Compare @package.json with @package-lock.json
# Reference directories
> Explain the architecture in @src/components/
# Reference with line ranges (VS Code)
> Fix the bug in @src/utils.ts:42-58
Checkpointing & Recovery
Claude Code automatically tracks file edits, allowing you to undo changes. Access the checkpointing feature by pressing Escape twice or using /rewind.
04 File Operations
Claude Code provides specialized tools for file operations that are more reliable than bash commands. Understanding these tools helps you work more effectively.
Built-in File Tools
Read
Read file contents with line numbers, supports images and PDFs
Write
Create or overwrite entire files
Edit
Make targeted string replacements in existing files
Glob
Search for files by pattern (e.g., **/*.ts)
Grep
Search file contents with regex patterns
Bash
Execute shell commands for system operations
When to Use Each Tool
| Task | Recommended Tool | Why |
|---|---|---|
| View file contents | Read |
Better than cat, includes line numbers |
| Create new file | Write |
Safer than echo/cat with heredoc |
| Modify specific lines | Edit |
Precise replacement, tracked by checkpoints |
| Find files by name | Glob |
Faster than find command |
| Search in file contents | Grep |
Regex support, better output format |
| Run git/npm/system commands | Bash |
Terminal operations that need shell |
Example Workflows
# Find all TypeScript files
> Find all .ts files in the src directory
# Search for function definitions
> Search for "function authenticate" in the codebase
# Read and analyze a file
> Read @src/auth/login.ts and explain the authentication flow
# Create a new component
> Create a new React component called UserProfile in src/components/
05 MCP (Model Context Protocol)
The Model Context Protocol (MCP) is an open standard introduced by Anthropic that allows Claude Code to connect to external tools, databases, and APIs without custom integrations.
What is MCP?
MCP Transport Types
| Transport | Use Case | Example |
|---|---|---|
| HTTP | Remote servers (recommended) | Notion, GitHub, Sentry |
| Stdio | Local processes | PostgreSQL, Airtable |
| WebSocket | Real-time remote servers (newer option) | Streaming integrations |
| SSE | Legacy (deprecated) | Older integrations |
Adding MCP Servers
HTTP Server (Recommended)
# Add Notion integration
claude mcp add --transport http notion https://mcp.notion.com/mcp
# Add GitHub integration
claude mcp add --transport http github https://api.githubcopilot.com/mcp/
# Add Sentry integration
claude mcp add --transport http sentry https://mcp.sentry.dev/mcp
Local Stdio Server
# Add PostgreSQL database
claude mcp add --transport stdio db -- npx -y @bytebase/dbhub --dsn "postgresql://user:pass@host/db"
# Add Airtable
claude mcp add --transport stdio --env AIRTABLE_API_KEY=YOUR_KEY airtable -- npx -y airtable-mcp-server
Managing MCP Servers
claude mcp list
List all configured MCP servers
claude mcp get <name>
Get details of a specific server
claude mcp remove <name>
Remove an MCP server
/mcp
Check MCP status within Claude Code
MCP Installation Scopes
| Scope | Storage File | Purpose |
|---|---|---|
local (default) |
~/.claude.json |
Private to you, current project only |
project |
.mcp.json |
Shared with team via version control |
user |
~/.claude.json |
Available across all your projects |
Popular MCP Integrations
GitHub
PR reviews, issue management, code search
Notion
Read/write pages, search databases
PostgreSQL
Query databases, schema exploration
Sentry
Error tracking, issue analysis
Figma
Design system access, component info
Slack
Channel access via Zapier MCP
06 Agents & Subagents
According to Anthropic's subagents documentation, subagents are specialized AI assistants that operate independently for specific tasks, enabling parallel execution and isolated context management.
What Are Subagents?
Built-in Subagent Types
| Subagent | Purpose | Characteristics |
|---|---|---|
| Explore | File discovery, code search, codebase exploration | Fast, read-only; inherits the session model (capped at Opus) |
| Plan | Codebase research for implementation planning | Used in plan mode, architectural decisions |
| General-purpose | Complex multi-step tasks | Both exploration and modification |
The Agent Tool
The Agent tool is how Claude delegates work to subagents (it was named the Task tool before version 2.1.63, and existing Task(...) references still work as aliases). It can run multiple agents in parallel for operations like:
- File reads: Reading multiple files in parallel
- Code searches: Searching different patterns simultaneously
- Web fetches: Gathering information from multiple sources
- Pattern matching: Finding code patterns across the codebase
How Subagents Work
Creating Custom Subagents
You can create custom subagents by placing markdown files (with YAML frontmatter) in the .claude/agents/ directory. The easiest way is to simply ask Claude to create one for you — for example, "create a subagent that reviews SQL queries for performance" — or edit the files in .claude/agents/ directly:
# Create agents directory
mkdir -p .claude/agents
# View available subagents
/agents
# Then ask Claude in plain language:
# "Create a subagent named sql-reviewer that checks queries for performance issues"
Agent Teams, Background Agents & Claude Code Everywhere
Recent releases extend the agent model well beyond single subagents:
- Agent teams: Spin up multiple named agents that collaborate on a larger task, each with its own context, and message them mid-task to course-correct
- Background agents: Long-running tasks can execute in the background while you keep working; you're notified when they finish
- Claude Code on the web and desktop: The same agentic workflows are available in the browser and in the Claude desktop app (the Code tab), in addition to the terminal and IDE integrations
07 Git Workflows
Claude Code has deep Git integration that makes version control seamless. According to the Git workflow documentation, you can manage branches, commits, and pull requests directly through natural language.
Common Git Operations
# Create and switch to a new branch
> Create a branch feature/rate-limiting and switch to it
# Implement a feature
> Implement rate limiting on auth endpoints
# Run tests
> Run the tests
# Commit changes
> Commit these changes
# Push and create PR
> Push and create a PR to main with a summary of changes
Pull Request Creation
Claude Code uses the gh CLI for GitHub operations. When you ask Claude to create a PR, it will:
Review all commits in the branch to understand changes
Create a comprehensive PR description with summary and test plan
Execute gh pr create with proper formatting
Provide the PR link for review
GitHub Actions Integration
Claude Code can be integrated with GitHub Actions for automated workflows:
# Install GitHub App
/install-github-app
Once installed, you can:
- @claude mentions: Tag Claude in PRs and issues for automated responses
- Automated reviews: Get code review feedback on pull requests
- Bug fixes: Request fixes that Claude implements directly
- Changelog generation: Automatically generate release notes
Git Worktrees for Parallel Work
Git worktrees allow checking out multiple branches in separate directories while sharing Git history. This is useful for parallel development tasks where you need to work on multiple features simultaneously.
feature/TICKET-123-description), commit message format, and common commands.Commit Best Practices
Claude Code naturally respects Conventional Commits format:
# Good commit message format
feat: add rate limiting to auth endpoints
fix: resolve memory leak in connection pool
docs: update API documentation
refactor: simplify authentication flow
test: add unit tests for user service
08 Advanced Configuration
Claude Code offers extensive configuration options through settings files, hooks, and custom commands. Understanding these enables powerful automation and team-wide conventions.
Settings Hierarchy
Settings apply in order of precedence (higher overrides lower):
Organizational/enterprise policies (highest priority, cannot be overridden)
Flags passed when launching claude - Session-specific overrides
.claude/settings.local.json - Machine-specific, gitignored
.claude/settings.json - Team conventions, checked into version control
~/.claude/settings.json - Personal defaults across all projects (lowest priority)
Sample Local Settings (Whitelist MCP & Git)
Here's a sample .claude/settings.local.json file that whitelists MCP tools and common Git operations for uninterrupted workflow:
{
"permissions": {
"allow": [
"Bash(git status)",
"Bash(git add *)",
"Bash(git commit *)",
"Bash(git push *)",
"Bash(git pull *)",
"Bash(git checkout *)",
"Bash(git branch *)",
"Bash(git merge *)",
"Bash(git log *)",
"Bash(git diff *)",
"Bash(gh pr *)",
"Bash(gh issue *)",
"Bash(npm *)",
"Bash(npx *)",
"Bash(yarn *)",
"Bash(pnpm *)",
"mcp__notion__*",
"mcp__github__*",
"mcp__postgres__*",
"mcp__sentry__*"
],
"deny": [
"Bash(rm -rf /)",
"Bash(sudo *)",
"Bash(chmod 777 *)"
]
},
"enableAllProjectMcpServers": true
}
*) in permission patterns to allow variations of commands. For example, Bash(git commit *) allows git commit -m "message" and all other commit variations.Hooks
Hooks allow you to run custom commands before or after Claude's tool execution. According to the hooks documentation, available hook events include:
| Hook Event | Description | Use Case |
|---|---|---|
PreToolUse |
Before tool execution | Validation, logging |
PostToolUse |
After tool completion | Formatting, cleanup |
SessionStart |
At session startup | Environment setup |
UserPromptSubmit |
When prompt is submitted | Input processing |
Notification |
When Claude sends notifications | Alerts, logging |
Stop |
When Claude finishes responding | Post-processing |
These are the core events — current releases document a much larger set (around 31 events), including HTTP hooks that POST event payloads to a URL instead of running a local command.
Example Hook Configuration
Hook commands receive the event details (including tool input) as JSON on stdin, so use a tool like jq to extract fields. The documented environment variable $CLAUDE_PROJECT_DIR gives you the project root:
{
"hooks": {
"SessionStart": [{
"matcher": "startup",
"hooks": [{
"type": "command",
"command": "echo \"Session started in $CLAUDE_PROJECT_DIR at $(date)\" >> ~/.claude/session.log"
}]
}],
"PostToolUse": [{
"matcher": "Write",
"hooks": [{
"type": "command",
"command": "jq -r '.tool_input.file_path' | { read -r f; prettier --write \"$f\"; }"
}]
}]
}
}
In the PostToolUse example above, jq reads the JSON payload from stdin, extracts the path of the file Claude just wrote, and runs Prettier on it automatically.
Custom Slash Commands
Create custom slash commands by adding markdown files to .claude/commands/. These still work well, though skills (.claude/skills/, covered below) are now the promoted path for packaged, reusable workflows:
# Create commands directory
mkdir -p .claude/commands
# Create a custom command
echo "Analyze this code for performance issues and suggest optimizations:" > .claude/commands/optimize.md
# Now you can use /optimize in Claude Code
Skills Structure
For more complex custom behaviors, create a skill as a directory inside .claude/skills/ (skills docs):
.claude/skills/
└── <skill-name>/
├── SKILL.md # Main instructions (required)
├── templates/ # Templates for Claude to fill
├── examples/ # Expected output examples
└── scripts/ # Executable scripts
Memory Management with CLAUDE.md
CLAUDE.md files provide persistent context that Claude remembers across sessions. The memory system uses a hierarchy:
| File Location | Scope | Purpose |
|---|---|---|
~/.claude/CLAUDE.md |
Global | Personal preferences across all projects |
/project/CLAUDE.md |
Project | Project conventions, shared with team |
/project/src/CLAUDE.md |
Directory | Directory-specific context |
/project/CLAUDE.local.md |
Personal | Machine-specific, gitignored |
/project/.claude/rules/ |
Path-scoped | Split rules into focused files, scoped to specific paths |
CLAUDE.md files can also import other files with @path/to/file syntax, letting you keep the main file short and pull in details on demand.
MEMORY.md automatically — lessons learned, project quirks, and decisions carry across sessions without any setup. To save something explicitly, just ask Claude to remember it ("remember that we deploy from the release branch"), or edit memory files anytime with /memory.09 IDE Integrations
Claude Code integrates with popular IDEs to provide a seamless development experience. The VS Code extension is the most feature-rich integration.
VS Code Extension
Installation
Launch Visual Studio Code
Press Cmd+Shift+X (Mac) or Ctrl+Shift+X (Windows/Linux)
Search "Claude Code" and click Install
Key VS Code Features
Inline Diffs
See real-time changes in the sidebar before accepting
Auto-Accept Mode
Let Claude make edits without confirmation prompts
Line Range References
Reference specific lines with @file.ts:42-58
Multiple Conversations
Open multiple Claude conversations in tabs
Permission Modes
Claude Code ships with a set of documented permission modes — press Shift+Tab to cycle through them, or set them via --permission-mode:
| Mode | Behavior | Best For |
|---|---|---|
| default (Manual) | Claude asks permission for each action | Learning, careful editing |
| acceptEdits | File edits are auto-approved; other actions still prompt | Experienced users, trusted workflows |
| plan | Claude describes a plan and waits for approval before acting | Complex changes |
| auto | Claude decides autonomously which safe actions to take | Semi-autonomous sessions |
| dontAsk | Skips prompts for allowed actions; blocked actions are denied | Pre-configured allowlists |
| bypassPermissions | All permission prompts are bypassed entirely | Trusted, isolated environments only |
Claude Code Desktop App
The desktop app is the graphical way to run Claude Code. Per the desktop docs, "each conversation is a session: it has its own chat history and project folder, independent of any other session. The sidebar lists your sessions and lets you run several in parallel." Click + New in the sidebar or press Cmd+N (macOS) or Ctrl+N (Windows). In a Git repository you can turn on Worktree before you start a session to run it in its own Git worktree, an isolated copy of the project; by default it is off.
- Plan mode: "Claude reads files and runs commands to explore, then proposes a plan without editing your source code." Once you approve the plan, switch to Accept edits or Manual to execute it.
- GitHub and pull requests: review and comment on diffs, then watch the resulting pull request through CI. Turn on Auto-fix or Merge when ready to have Claude fix failing checks or have GitHub merge the pull request. PR monitoring requires the GitHub CLI (
gh) to be installed and authenticated. - Side chat: press Cmd+; (macOS) or Ctrl+; (Windows), or type
/btw, to ask a question that uses the session's context without adding anything to the main conversation.
JetBrains Integration
Claude Code supports the entire JetBrains family including IntelliJ IDEA, PyCharm, WebStorm, and more:
Go to Settings, then Plugins, then Marketplace
Search "Claude Code" plugin
Set up authentication and preferences
CLI to IDE Connection
Connect your terminal Claude session to VS Code:
# Connect to VS Code from external terminal
/ide
10 Best Practices & Tips
Based on Anthropic's best practices guide, here are proven strategies for getting the most out of Claude Code.
Performance Optimization
Use /clear Frequently
Clear context when switching tasks to maintain performance
Use /compact
Summarize long conversations to save context window
Delegate to Subagents
Use subagents (the Agent tool) for verbose operations like tests and logs
Be Specific
Avoid vague requests; provide clear, detailed prompts
Cost Management
| Strategy | Implementation | Impact |
|---|---|---|
| Monitor usage | Use /cost (alias /usage) |
Track spending in real-time |
| Lower the effort level | Effort levels: low / medium / high / xhigh / max |
Lower costs for simple tasks; raise effort only when needed |
| Use Sonnet for most tasks | /model sonnet |
Half the API price per token of Opus 5.5 ($2 / $10 vs $4 / $20 per MTok) |
| Reserve Opus for complex work | Architectural decisions only | Optimize cost/quality tradeoff |
Subscription Options
Security Best Practices
Sandbox Mode
Enable sandbox mode for enhanced security:
/sandbox
Benefits of sandboxing:
- Filesystem isolation: Access only to specific directories
- Network isolation: Only approved servers can be reached
- Fewer permission prompts: Anthropic reports that "in our internal usage, we've found that sandboxing safely reduces permission prompts by 84%" (Anthropic's sandboxing post); your results will vary
- OS-level security: Uses Linux bubblewrap, macOS Seatbelt (not available on native Windows — use WSL2 for sandboxing)
Security Recommendations
Only grant the permissions Claude actually needs
Restrict network commands with explicit deny rules
Implement SAST/DAST scanning in your pipeline
Keep permission modes active in production environments
Effective Prompting Tips
- Use file references (
@file.ts) instead of pasting code - Be explicit about what you want: "Refactor for readability" vs "Fix this"
- Provide context: "This is a React component that handles..."
- Break complex tasks into smaller steps
- Use
/initto bootstrap project context
Running Claude Uninterrupted (Auto-Accept Mode)
For experienced users who want Claude to work autonomously without confirmation prompts, there are several ways to enable uninterrupted execution:
Method 1: Bypass Permissions (CLI Flag)
# Start Claude with all permission prompts bypassed
claude --dangerously-skip-permissions
# Equivalent documented permission mode
claude --permission-mode bypassPermissions
Method 2: Allowlist Specific Commands
A safer approach is to pre-approve specific commands in your settings file:
// .claude/settings.local.json
{
"permissions": {
"allow": [
"Bash(git *)",
"Bash(npm run *)",
"Bash(npx *)",
"Read",
"Write",
"Edit",
"Glob",
"Grep"
]
}
}
Method 3: VS Code Auto-Accept Mode
In the VS Code extension, you can enable auto-accept mode from the settings:
Click the Claude Code icon in VS Code sidebar
Find the settings icon in the panel header
Toggle "Auto-accept edits" to allow Claude to make changes without prompts
Method 4: Headless Mode for CI/CD
For automation pipelines, use headless mode with streaming output:
# Run Claude in headless mode (non-interactive)
claude -p "run tests and fix any failures" --output-format stream-json
# With permissions bypassed for full automation
claude -p "refactor auth module" --permission-mode bypassPermissions --output-format json
| Mode | Flag/Setting | Use Case | Safety Level |
|---|---|---|---|
| Full Auto | --permission-mode bypassPermissions or --dangerously-skip-permissions |
Trusted local dev | Low |
| Allowlist | permissions.allow in settings |
Team environments | Medium |
| VS Code Auto | Auto-accept toggle | IDE workflow | Medium |
| Headless | -p with --permission-mode bypassPermissions |
CI/CD pipelines | Low |
| Normal | Default (no flags) | Production, learning | High |
11 Frequently Asked Questions
Claude Code is Anthropic's agentic coding tool. It runs in your terminal, in IDE extensions, in the Claude desktop app and in the browser, providing AI-powered coding assistance with deep file system access, Git integration, and MCP server connections. Unlike a chat window, it operates in your development environment with full context of your codebase, can read and write files, execute commands, and manage Git operations without leaving the conversation.
Install Claude Code using the native installer. On macOS, Linux and WSL, run curl -fsSL https://claude.ai/install.sh | bash. On Windows PowerShell, run irm https://claude.ai/install.ps1 | iex. You can also use Homebrew (brew install --cask claude-code), WinGet (winget install Anthropic.ClaudeCode) or npm. If you prefer no terminal, download the Claude desktop app and open its Code tab. After installation, run claude doctor to verify your setup.
MCP (Model Context Protocol) is an open standard by Anthropic that allows Claude Code to connect to external tools, databases, and APIs. It eliminates custom integrations by providing a standardized way to add capabilities like Notion, GitHub, PostgreSQL, and Slack. You can add MCP servers using commands like claude mcp add --transport http notion https://mcp.notion.com/mcp.
Subagents are specialized AI assistants that operate independently for specific tasks. Claude Code has built-in subagents like Explore (for file discovery), Plan (for codebase research), and General-purpose (for complex multi-step tasks). They enable parallel execution of multiple agents simultaneously, dramatically speeding up complex workflows like codebase exploration and multi-file analysis.
Claude Code requires a Pro, Max, Ultra, Team or Enterprise subscription, or a Claude Console account; the free claude.ai plan does not include it. On 9 November 2026 the pricing page listed Pro at $20/month ($17/month with annual billing), Max at $100/month (5x Pro usage) and Ultra at $200/month (10x Pro usage). You can also use pay-as-you-go API billing through the Claude Console. Heavy users usually look at Max or Ultra for the higher usage limits; Fable models are selected explicitly with /model fable.
12 Abbreviations & Glossary
Abbreviations & Glossary
Reference guide for technical terms and abbreviations used throughout this article.