What Is Claude Code? The Complete Guide for 2026

Claude Code Mastery
20 parts- 1Claude Code: The Future of Coding?
- 2What Is Claude Code? The Complete Guide for 2026Current
- 360 Claude Code Tips and Tricks for Power Users
- 4Claude Code Sub Agents: Parallel AI Development
- 5Claude Code Worktrees: Parallel Development Without the Chaos
- 6Building Multi-Agent Workflows in Claude Code: A Practical Tutorial
- 7The Ralph Loop: Running Claude Code For Hours Autonomously
- 8Self-Improving Skills: Claude Code That Learns From Every Session
- 9Claude Code Usage Limits in 2026: The Practical Playbook for Pro and Max Teams
- 10Progressive Disclosure: How Claude Code Cut Token Usage by 98%
- 11Claude Code + Chrome: AI Agents That Use Your Browser
- 12Interview Mode: Let Claude Code Ask the Questions First
- 13Claude Code: Remote Control, Auto Memory, Plugins & More
- 14Claude Code Hooks Explained
- 15How to Use Claude Code with Next.js
- 16Claude Code Channels: Telegram, Discord, iMessage, and Webhooks
- 17How to Migrate from GitHub Copilot to Claude Code
- 18Building a SaaS with Claude Code: End-to-End Guide
- 19Create Beautiful UI with Claude Code: The Style Guide Method
- 20Claude Code Loops: Recurring Prompts That Actually Run
TL;DR
Claude Code is Anthropic's AI coding agent for terminal, IDE, desktop, and browser workflows. Learn what it does, how it works, pricing, setup, MCP, skills, hooks, and subagents.
Claude Code is Anthropic's AI coding agent. The official docs frame it as an agentic coding tool that can read a codebase, edit files, run commands, and connect to development tools across terminal, IDE, desktop, and browser surfaces. If you have heard the name on engineering Twitter and wondered whether to install it, this is the guide.
Last updated: June 24, 2026. Verify current install steps, plan limits, and surface availability against the official sources before you commit.
Official Sources#
| Source | What to verify |
|---|---|
| Claude Code overview | Product surfaces, core capabilities, and high-level positioning |
| Claude Code getting started | Install steps, required versions, and first-session workflow |
| Anthropic pricing | Current plan names, limits, and billing routing details |
| Claude status | Current service health and incident history |
If you only need the fastest decision path:
- Pricing and plan limits: /pricing
- Usage and quota planning: Claude Code Usage Limits in 2026
- Reliability and outage fallback: Claude Outages Are a Workflow Design Problem
- Skills and security review: Cybersecurity Skills for AI Agents and Prompt Injection Role Confusion
- Long-running workflow comparison: Codex-Maxxing: How to Run Long-Running Codex Workflows
- Head-to-head comparisons: /compare
- Cursor migration intent: Migrating from Cursor to Claude Code
May 2026 Update: Claude Code has evolved significantly since March. Key developments: Claude Opus 4.7 shipped with a new
xhigheffort level for maximum reasoning depth. The Agent SDK lets you build custom agents powered by Claude Code's tools. Routines enable scheduled and event-triggered cloud agents./ultrareviewprovides cloud-based multi-agent code review. The native installer (below) is now the recommended installation method over npm.
This post is for developers who have not used Claude Code before. We will go from zero to a working first session, cover the primitives that actually matter (CLAUDE.md, skills, hooks, MCP, subagents, plan mode), compare it honestly to the alternatives, and finish with five things to do after you install it. Every feature, command, and pricing number in this post is pulled from Anthropic's official documentation. Sources are listed at the end.
The 30-second primer#
Claude Code is an AI pair programmer that runs across five surfaces: a CLI in your terminal, a VS Code extension, a JetBrains plugin, a native desktop app for macOS and Windows, and a browser version at claude.ai/code. The surfaces share the same Claude Code engine, so your CLAUDE.md files, settings, and MCP servers carry across them.
For the day-to-day operating loop after this primer, read 60 Claude Code Tips and Tricks for Power Users, Claude Code Sub Agents: Parallel AI Development, and How to Write CLAUDE.md: The Complete Guide.
The important distinction: the terminal CLI is not an IDE plugin. It is a long-running agent process. You start it in a project directory with claude, describe what you want, and the agent reads, writes, edits, runs tests, and makes commits. Think of it as a teammate that can type into your shell, with the context you give it in a file called CLAUDE.md.
How it actually works#
Claude Code runs an agent loop. You send a message, the model decides which tool to call, the harness executes it, and the result feeds back into the model. It keeps going until the task is done or it needs you to answer a question.
At the start of every session, the agent loads memory. Anthropic's docs describe two complementary memory systems:
- CLAUDE.md files: markdown you write with persistent instructions (coding standards, architecture, commands).
- Auto memory: notes Claude writes itself about things like "build commands, debugging insights, architecture notes, code style preferences, and workflow habits." Auto memory requires Claude Code v2.1.59 or later and lives under
~/.claude/projects/<project>/memory/.
CLAUDE.md files are loaded from a hierarchy: managed policy, project (./CLAUDE.md or ./.claude/CLAUDE.md), user (~/.claude/CLAUDE.md), and local (./CLAUDE.local.md). The docs recommend keeping each file "under 200 lines" because longer files "consume more context and reduce adherence."
Auto memory loads the first 200 lines or 25KB of MEMORY.md into every session. Topic files like debugging.md or patterns.md are not loaded at startup; Claude reads them on demand.
Install and first session#
Per the official setup page, Claude Code runs on:
- macOS 13.0+
- Windows 10 1809+ or Windows Server 2019+
- Ubuntu 20.04+, Debian 10+, Alpine Linux 3.19+
- 4 GB+ RAM, x64 or ARM64
The native installer command from the docs:
curl -fsSL https://claude.ai/install.sh | bash
For Windows PowerShell:
irm https://claude.ai/install.ps1 | iex
Homebrew and WinGet are also supported:
brew install --cask claude-code
winget install Anthropic.ClaudeCode
Native installations "automatically update in the background." Homebrew and WinGet do not.
For a detailed walkthrough of installation, first session, and project configuration, see the Getting Started with Claude Code guide.
After install, verify with claude --version, then go to any project and run claude. First launch opens a browser to log in. Anthropic's docs note that Claude Code "requires a Pro, Max, Team, Enterprise, or Console account. The free Claude.ai plan does not include Claude Code access." You can also authenticate through Amazon Bedrock, Google Vertex AI, or Microsoft Foundry.
Core features in 2026#
Claude Code in 2026 is not just "a CLI with a chat loop." It has an ecosystem of primitives. Here are the ones documented on code.claude.com.
CLAUDE.md and project memory#
The single most important file in any Claude Code project is CLAUDE.md. Run /init inside a project and Anthropic's docs say Claude "analyzes your codebase and creates a file with build commands, test instructions, and project conventions it discovers."
CLAUDE.md files can import other files with @path/to/import syntax, with a maximum import depth of five hops. For large projects, you can scope rules to specific file paths with .claude/rules/ files using YAML frontmatter with a paths glob. This is the official way to keep project memory organized without bloating context.
Skills#
Skills are the 2026 replacement for custom slash commands. Per the docs: "Custom commands have been merged into skills. A file at .claude/commands/deploy.md and a skill at .claude/skills/deploy/SKILL.md both create /deploy and work the same way."
A skill is a directory with a SKILL.md file containing YAML frontmatter and markdown instructions. Frontmatter fields documented in the skills reference include name, description, disable-model-invocation, user-invocable, allowed-tools, model, effort, context, agent, hooks, paths, and shell.
Example from the docs:
---
name: explain-code
description: Explains code with visual diagrams and analogies. Use when explaining how code works.
---
When explaining code, always include:
1. **Start with an analogy**
2. **Draw a diagram** using ASCII art
3. **Walk through the code** step-by-step
4. **Highlight a gotcha**
Claude Code also ships with bundled skills like /simplify, /batch, /debug, /loop, and /claude-api. Skills live at four scopes in priority order: enterprise, personal (~/.claude/skills/), project (.claude/skills/), and plugin.
Hooks#
Hooks are shell commands, HTTP calls, prompts, or subagents that run at specific points in Claude's lifecycle. The docs describe four hook types:
- Command hooks (
type: "command") run shell commands - HTTP hooks (
type: "http") POST JSON to a URL - Prompt hooks (
type: "prompt") ask a model for a yes/no decision - Agent hooks (
type: "agent") spawn a subagent to validate
Documented lifecycle events include SessionStart, SessionEnd, UserPromptSubmit, PreToolUse, PostToolUse, Stop, Notification, SubagentStart, SubagentStop, PreCompact, PostCompact, WorktreeCreate, and more.
A typical use: run Prettier after every file edit, or block destructive rm -rf commands before they run. Hooks are configured in settings.json:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [
{
"type": "command",
"command": "./scripts/validate.sh"
}
]
}
]
}
}
Model Context Protocol (MCP)#
MCP is "an open standard for connecting AI tools to external data sources." In Claude Code, you add servers with claude mcp add. The docs show three installation scopes:
| Scope | Loads in | Shared with team | Stored in |
|---|---|---|---|
| Local | Current project only | No | ~/.claude.json |
| Project | Current project only | Yes, via version control | .mcp.json in project root |
| User | All your projects | No | ~/.claude.json |
Add a server with a single command (examples from the docs):
claude mcp add --transport http stripe https://mcp.stripe.com
claude mcp add --transport http sentry https://mcp.sentry.dev/mcp
Then use /mcp inside a Claude Code session to authenticate and manage connections. MCP supports stdio, SSE, HTTP, and WebSocket transports, with OAuth 2.0 for remote servers.
Subagents#
Subagents let a task run in its own isolated context window. Claude Code ships with built-in subagents including Explore, Plan, and general-purpose. Per the docs:
- Explore: "A fast, read-only agent optimized for searching and analyzing codebases." Uses Haiku for speed.
- Plan: "A research agent used during plan mode to gather context before presenting a plan." Read-only.
- General-purpose: "A capable agent for complex, multi-step tasks that require both exploration and action."
You can also create your own. Subagents are markdown files with YAML frontmatter, stored in .claude/agents/ (project) or ~/.claude/agents/ (user). Documented frontmatter fields include name, description, tools, disallowedTools, model, permissionMode, maxTurns, skills, mcpServers, hooks, memory, effort, background, isolation, and color.
Use /agents inside Claude Code to manage them interactively.
Plan mode#
Plan mode is a read-only planning pass before Claude makes changes. Per the docs: "Plan Mode instructs Claude to create a plan by analyzing the codebase with read-only operations, perfect for exploring codebases, planning complex changes, or reviewing code safely."
Three ways to enter plan mode:
- Press
Shift+Tabtwice during a session. You will see⏸ plan mode onat the bottom. - Start a session with
claude --permission-mode plan. - Run a headless query with
claude --permission-mode plan -p "Analyze the auth system and suggest improvements".
Press Ctrl+G to open the proposed plan in your text editor for direct editing.
Agent teams and the Agent SDK#
Subagents coordinate within a single session. For cross-session coordination, Anthropic documents agent teams. For fully custom agents built on Claude Code's internals, there is the Agent SDK, which the docs describe as letting you "build your own agents powered by Claude Code's tools and capabilities, with full control over orchestration, tool access, and permissions."
How Claude Code compares#
The AI coding tool space in 2026 is crowded. Honest comparisons based on what each tool's docs actually say:
Claude Code vs Cursor#
Cursor is an IDE (a fork of VS Code). Claude Code is primarily a CLI, with an IDE extension as an alternative surface. If your workflow is IDE-first and you want deep editor integration (inline tab completion, visual diffs on every keystroke, @-mentions), Cursor is built for that. If you live in the terminal and want to pipe, script, and chain coding tasks like Unix utilities ("Pipe logs into it, run it in CI, or chain it with other tools," per the Claude Code docs), Claude Code is built for that.
Claude Code also ships a VS Code extension that "provides inline diffs, @-mentions, plan review, and conversation history directly in your editor," so you do not have to choose one or the other.
Claude Code vs Codex CLI#
OpenAI's Codex CLI is the closest shape match: also a CLI, also agentic, also runs on your machine. The differences are model lineage and the ecosystem around the CLI. Claude Code's docs document plugins, skills, hooks, MCP, subagents, agent teams, GitHub Actions integration, GitLab CI/CD integration, scheduled routines, and the Agent SDK as first-party features. Pick based on model preference and which ecosystem you want to build on.
Claude Code vs Aider#
Aider is an open-source terminal coding assistant with strong git integration. Similar surface, different philosophy. Aider has been around longer and has a simpler, more opinionated feature set. Claude Code's docs describe a broader surface area: four install targets, IDE plugins, a web interface, Bedrock/Vertex/Foundry support, and the plugin ecosystem. Aider is lean and focused, Claude Code is a platform.
Pricing#
Pulled from claude.com/pricing:
- Free: $0. Does not include Claude Code.
- Pro: $17/month annual or $20/month monthly. Claude Code is included.
- Max: From $100/month. Pro features plus "5x or 20x more usage than Pro," higher output limits, early access, and priority during high traffic.
- Team: $20/seat/month annual or $25/seat/month monthly (standard seat). Premium seat is $100/month annual or $125/month monthly. Includes Claude Code, SSO, admin controls.
- Enterprise: Seat price ($20) plus usage at API rates. Adds SCIM, audit logs, role-based access, compliance API, custom data retention, IP allowlisting, and a HIPAA-ready offering.
The setup docs confirm: "Claude Code requires a Pro, Max, Team, Enterprise, or Console account. The free Claude.ai plan does not include Claude Code access."
Five things to do after you install it#
Based on the official docs, here is a sensible onboarding sequence.
1. Run /init to generate CLAUDE.md#
The docs say /init "analyzes your codebase and creates a file with build commands, test instructions, and project conventions it discovers." Refine from there. If you want a structured template, we built a CLAUDE.md generator that walks you through the sections your project needs.
2. Try plan mode before shipping anything#
Press Shift+Tab twice at the start of any non-trivial task. The docs are explicit: "A two-phase approach with planning produces better results than jumping straight to code." Plan mode uses read-only tools, gathers requirements, and proposes a plan you approve before execution.
3. Connect an MCP server#
Pick one external tool you use every day (GitHub, Sentry, Linear, Stripe, a database) and connect it with claude mcp add. The difference between an agent that can only touch your filesystem and one that can read your production error logs is large. Browse the MCP Directory for curated servers.
4. Save a workflow as a skill#
The moment you catch yourself pasting the same 10-line playbook into chat twice, convert it to a skill. Either create the directory manually at .claude/skills/<name>/SKILL.md or use our Skill Builder to scaffold one from a short description. Skills you want to keep in your back pocket can live in the Skills Directory.
5. Configure at least one hook#
Start with something small. A PostToolUse hook that runs Prettier or ESLint after edits. A PreToolUse hook that blocks writes to production.env. A SessionEnd hook that logs session duration. The muscle memory of writing hooks unlocks the whole extensibility model.
Where it falls short#
Being honest about limitations, based on what the docs say and do not say.
Cost for heavy users. Pro at $20/month includes usage caps. Heavy users hit Max at $100/month or more. For teams using it as a primary coding tool, costs scale with seat count and usage.
Context is finite. Even with auto memory, CLAUDE.md, and subagents to preserve main-conversation context, you will hit limits on large codebases. The docs mention /compact and re-injection patterns, but long sessions still require care.
Terminal-first bias. The CLI is the most feature-complete surface. The VS Code extension, JetBrains plugin, desktop app, and web version all exist, but the CLI gets features first. If your whole team lives in JetBrains, you may feel one step behind.
Plan mode does not prevent bad plans. It prevents file changes during planning, but if the plan is wrong, you are still responsible for catching it. The docs say "a two-phase approach produces better results" and that is true on average, but not a free pass to stop reading what the agent proposes.
Non-Anthropic models are not drop-in. You can run Claude Code on Bedrock, Vertex, or Foundry, but those are alternate Claude deployments, not arbitrary models. If you want to run Claude Code against GPT, Gemini, or an open model, that is not what the docs describe.
Start here#
If you got this far and have not installed it, here is the install command one more time:
curl -fsSL https://claude.ai/install.sh | bash
Then cd into a project and run claude. Let /init write a first pass of CLAUDE.md. Ask it to explain your codebase. Watch the agent loop run.
If you want to go deeper:
- The CLAUDE.md Generator scaffolds a project memory file from a short description.
- The MCP Directory catalogs MCP servers you can plug in.
- The Skills Directory collects shareable skills.
- The Skill Builder turns a one-line prompt into a SKILL.md you can drop into
.claude/skills/.
The fastest way to understand Claude Code is to give it a real task you would otherwise do yourself and watch what it does. Start there.
FAQ#
Is Claude Code free?#
No. Claude Code requires a paid Anthropic account. Per the official pricing page, the free Claude.ai plan does not include Claude Code access. You need at least a Pro subscription ($17/month annual or $20/month monthly). Team, Enterprise, and Max plans also include Claude Code with additional features and higher usage limits.
What is the difference between Claude Code and Claude?#
Claude is Anthropic's large language model - the AI that powers conversations and reasoning. Claude Code is a coding agent built on top of Claude. While Claude answers questions in a chat interface, Claude Code is an agentic tool that can read your codebase, edit files, run terminal commands, make git commits, and integrate with external services through MCP. Think of Claude as the brain, Claude Code as the hands.
Can Claude Code work offline?#
No. Claude Code requires an internet connection to communicate with Anthropic's API. The agent runs locally on your machine and executes tools locally, but reasoning happens on Anthropic's servers. This is true for all installation methods (CLI, VS Code extension, JetBrains plugin, desktop app, and web).
How do I give Claude Code context about my project?#
Create a CLAUDE.md file in your project root. Run /init inside a Claude Code session to auto-generate one based on your codebase structure. This file should contain build commands, test instructions, coding conventions, and architecture notes. Keep it under 200 lines for best results. For larger projects, use .claude/rules/ files with path-scoped instructions.
Does Claude Code support languages other than JavaScript/TypeScript?#
Yes. Claude Code is language-agnostic. It works with any language you can develop locally: Python, Go, Rust, Java, C++, Ruby, PHP, Swift, Kotlin, and more. The agent reads and writes files, runs terminal commands, and adapts to your project's tooling. If you can build and test it from the command line, Claude Code can work with it.
How does Claude Code compare to GitHub Copilot?#
Different tools for different workflows. GitHub Copilot is an autocomplete tool that suggests code as you type inside your editor. Claude Code is an agentic assistant that takes multi-step instructions, makes changes across multiple files, runs tests, and commits code. Copilot is inline completion, Claude Code is a conversation with a capable developer who can touch your whole project.
Can I use Claude Code with my own API key?#
Yes. You can authenticate through Anthropic directly (with a Pro/Max/Team/Enterprise account) or through Amazon Bedrock, Google Vertex AI, or Microsoft Foundry with your own API credentials. Use claude config to set up your preferred authentication method.
What is CLAUDE.md and why does it matter?#
CLAUDE.md is a markdown file that gives Claude Code persistent context about your project. It loads automatically at the start of every session. Include your build commands, test commands, coding standards, architecture decisions, and any project-specific instructions. A good CLAUDE.md dramatically improves Claude Code's effectiveness because it does not have to rediscover your project structure every session.
References#
Every claim in this post is sourced from the following official documentation pages, fetched on 2026-04-19:
- code.claude.com/docs/en/overview: product description, surfaces (terminal, VS Code, JetBrains, Desktop, Web), and capabilities (commits/PRs, MCP, skills, hooks, subagents, schedules, Unix piping).
- code.claude.com/docs/en/setup: system requirements, install commands for macOS/Linux/Windows/Homebrew/WinGet, authentication requirements, npm install option, and auto-update behavior.
- code.claude.com/docs/en/memory: CLAUDE.md file locations, precedence, import syntax,
.claude/rules/scoping, and auto memory (v2.1.59+, 200-line/25KB load limit, storage location). - code.claude.com/docs/en/hooks: hook types (command, http, prompt, agent), lifecycle events, configuration structure, matcher patterns.
- code.claude.com/docs/en/skills: SKILL.md structure, frontmatter fields, bundled skills, skill scopes, merging of custom commands into skills.
- code.claude.com/docs/en/mcp:
claude mcp addcommands, installation scopes (local/project/user), OAuth flow, transport types. - code.claude.com/docs/en/subagents: built-in subagents (Explore, Plan, general-purpose), custom subagent frontmatter fields,
/agentscommand. - code.claude.com/docs/en/common-workflows: plan mode details (
Shift+Tabcycle,--permission-mode plan,Ctrl+Gto edit plans), worktrees, session resume. - claude.com/pricing: Free/Pro/Max/Team/Enterprise pricing and feature breakdown.
Get the next deep dive like this in your inbox
One email a week on Claude Code and the rest of the AI dev stack. Free.
Read next on Claude Code
How to Write a CLAUDE.md: The Complete 2026 Guide
CLAUDE.md is the highest-leverage file in any Claude Code project. Here's what goes in one, what doesn't, and the patterns that actually ship.
12 min readWhat Are Claude Code Skills? A Complete Beginner Guide
Skills are how you stop copy-pasting the same workflow into Claude Code every session. What they are, how to write one, and where to find hundreds ready to use. Fact-checked against Anthropic's docs.
11 min readWhat Is MCP (Model Context Protocol)? The 2026 Developer Guide
MCP is the open standard for connecting AI apps to tools and data: servers expose tools, resources, and prompts over JSON-RPC, and any client can use them. What it is, how the stateless 2026-07-28 spec works, how to install a server in Claude Code or Cursor, and how to build one with the v2 TypeScript SDK.
14 min readTechnical content at the intersection of AI and development. Building with AI agents, Claude Code, and modern dev tools - then showing you exactly how it works.








