
TL;DR
Claude Code is Anthropic's AI coding agent for your terminal. What it does, how it works, how it compares to Cursor and Codex, and how to ship your first feature with it. Fact-checked against official docs.
Claude Code is Anthropic's AI coding agent. Per the official docs, it is "an agentic coding tool that reads your codebase, edits files, runs commands, and integrates with your development tools. Available in your terminal, IDE, desktop app, and browser." If you have heard the name on engineering Twitter and wondered whether to install it, this is the guide.
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.
Claude Code is an AI pair programmer that runs across four surfaces: a CLI in your terminal, a VS Code extension, a JetBrains plugin, and a native desktop app for macOS and Windows. There is also a browser version at claude.ai/code. All surfaces "connect to the same underlying Claude Code engine, so your CLAUDE.md files, settings, and MCP servers work across all of them."
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.
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/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.
Per the official setup page, Claude Code runs on:
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.
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.
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.
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 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 are shell commands, HTTP calls, prompts, or subagents that run at specific points in Claude's lifecycle. The docs describe four hook types:
type: "command") run shell commandstype: "http") POST JSON to a URLtype: "prompt") ask a model for a yes/no decisiontype: "agent") spawn a subagent to validateDocumented 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"
}
]
}
]
}
}
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 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:
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 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:
Shift+Tab twice during a session. You will see ⏸ plan mode on at the bottom.claude --permission-mode plan.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.
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."
Get the weekly deep dive
Tutorials on Claude Code, AI agents, and dev tools - delivered free every week.
The AI coding tool space in 2026 is crowded. Honest comparisons based on what each tool's docs actually say:
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.
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.
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.
Pulled from claude.com/pricing:
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."
Based on the official docs, here is a sensible onboarding sequence.
/init to generate CLAUDE.mdThe 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.
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.
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.
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.
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.
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.
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:
.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.
Every claim in this post is sourced from the following official documentation pages, fetched on 2026-04-19:
.claude/rules/ scoping, and auto memory (v2.1.59+, 200-line/25KB load limit, storage location).claude mcp add commands, installation scopes (local/project/user), OAuth flow, transport types./agents command.Shift+Tab cycle, --permission-mode plan, Ctrl+G to edit plans), worktrees, session resume.Technical 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.
Anthropic's agentic coding CLI. Runs in your terminal, edits files autonomously, spawns sub-agents, and maintains memory...
View ToolAI-native code editor forked from VS Code. Composer mode rewrites multiple files at once. Tab autocomplete predicts your...

New tutorials, open-source projects, and deep dives on coding agents - delivered weekly.
Configure Claude Code for maximum productivity -- CLAUDE.md, sub-agents, MCP servers, and autonomous workflows.
AI AgentsInstall Claude Code, configure your first project, and start shipping code with AI in under 5 minutes.
Getting StartedStep-by-step guide to building an MCP server in TypeScript - from project setup to tool definitions, resource handling, testing, and deployment.
AI Agents
In this video, discover how to build your customized voice AI agents using TEN Agent, an open-source conversational AI platform. Learn to integrate top speech-to-text models, large language...

Creating an AI-Enhanced Podcast Web App: Comprehensive Tutorial Repo: https://github.com/developersdigest/llm-podcast-engine You can obtain these API keys from the following sources: ...

In this video, I guide you through setting up the new OpenAI real-time API, which promises new interactive possibilities for developers with its web socket-based architecture. You will learn...

CLAUDE.md is the highest-leverage file in any Claude Code project. Here's what goes in one, what doesn't, and the patter...

Skills are how you stop copy-pasting the same workflow into Claude Code every session. What they are, how to write one,...

Autocomplete wrote the line. Agents write the pull request. The shift from Copilot to Claude Code, Cursor Agent, and Dev...