Claude Code: Complete Guide to Anthropic's Development Agent

By Ricardo Gutierrez · · 25 min read

In this article

  1. What is Claude Code
  2. Installation and first steps
  3. CLAUDE.md: your project's brain
  4. Essential commands
  5. Memory system
  6. Skills and extensions
  7. Subagents
  8. Worktrees: parallel work
  9. Plan Mode
  10. CI/CD and headless mode
  11. Claude Code for teams
  12. Plans and pricing
  13. Claude Code vs Cursor vs Copilot
  14. Templates and configurations
  15. Managed agents
  16. For beginners
  17. All cluster articles

Claude Code is Anthropic's terminal-based development agent. It's not a code autocomplete or a chatbot with file access. It's an autonomous agent that reads your project, executes commands, edits files, creates commits and solves complex engineering problems without leaving your terminal.

In 2026, Claude Code has become the go-to tool for developers who want to multiply their productivity without giving up control. Unlike editors with integrated AI, Claude Code operates directly on your real environment: your file system, your terminal, your tools. No sandbox, no simulation.

This guide brings together everything you need to know about Claude Code, from installation to advanced architectures with subagents and CI/CD. Each section links to the specialized article where you can go deeper.

Quick summary

Definitive guide to Claude Code in 2026: installation, CLAUDE.md, commands, memory, skills, subagents, worktrees, plan mode, CI/CD, teams, pricing and comparison with Cursor and Copilot.

What is Claude Code

Claude Code is an agentic agent that runs inside your terminal. When you execute it with the claude command, it analyzes your project, understands the file structure, reads the source code and can perform real actions: create files, modify existing code, run tests, make git commits and much more.

The fundamental difference with other AI coding tools is the level of autonomy. Claude Code doesn't suggest: it executes. You describe what you want ("refactor this module to use dependency injection") and it reads the code, plans the changes, implements them and verifies the tests pass.

Full article

What is Claude Code and how to use it: definition, internal architecture, real use cases and first steps with Anthropic's agent.

Under the hood, Claude Code uses Anthropic's Sonnet and Opus models with a context window of up to 1 million tokens. This means it can read entire projects (hundreds of files) and maintain coherence throughout long work sessions.

Installation and first steps

Installing Claude Code takes less than 2 minutes. You need Node.js 18+ and an Anthropic account with a Max or Team plan. The installation command is a simple npm install -g @anthropic-ai/claude-code and then you run claude at the root of your project.

The first time you run it, Claude Code redirects you to the browser to authenticate with your Anthropic account. After that, it's ready to work. There's no mandatory additional configuration, although the real power comes when you set up CLAUDE.md (next section).

Step-by-step tutorial

How to install Claude Code step by step (2026): requirements, installation on Mac, Windows and Linux, first session, authentication and solving common errors like EACCES and authentication failed.

Claude Code works on Mac, Windows (via WSL2 or native terminal) and Linux. On Windows, the optimal experience is with WSL2, although the native terminal also works for most cases.

CLAUDE.md: your project's brain

CLAUDE.md is the most important configuration file in Claude Code. It's a Markdown file you place at the root of your project that Claude Code reads automatically at the start of each session. It works as a "persistent memory" that tells the agent what your project is like, what conventions it follows, what patterns to use and what mistakes to avoid.

A good CLAUDE.md completely transforms the quality of responses. Without it, Claude Code is a generic agent. With it, it becomes a developer who knows your stack, your conventions and your preferences.

Complete configuration guide

CLAUDE.md: complete guide to configuring Claude Code: recommended structure, real examples, file hierarchy (project, user, global), anti-patterns and ready-to-copy templates.

There are three levels of CLAUDE.md: global (~/.claude/CLAUDE.md, which applies to all your projects), project-level (at the repo root) and directory-level (for specific subfolder instructions). All three are automatically combined.

Essential commands

Claude Code has two types of commands: slash commands (typed within a session, like /help, /clear, /compact) and terminal commands (executed from your shell, like claude, claude -p "prompt", claude commit).

The most used commands daily: /compact to compress context when sessions get long, /clear to restart, claude commit to generate semantic commits automatically, and pipe mode (echo "question" | claude) for script integrations.

Complete reference

Claude Code commands: complete reference: all slash commands, CLI flags, pipe mode, keyboard shortcuts and practical examples for each command.

Memory system

Claude Code's memory works in several layers. Short-term: the current conversation context (up to 1M tokens). Medium-term: CLAUDE.md files that persist between sessions. Long-term: automatic memory that Claude Code generates when you say "remember this" or when it detects patterns it should retain.

Understanding how memory works is critical for long sessions. When the context fills up, Claude Code starts "forgetting" the first interactions. The /compact command compresses the context keeping the essentials, but it's better to have key information in CLAUDE.md than to depend on conversation context.

Advanced management

Claude Code memory: how it works and how to optimize it: memory layers, context window, automatic compression, strategies for long sessions and how to avoid quality degradation from full context.

Skills y extensiones

Skills are extensions that expand Claude Code's capabilities. You can install community skills with npx skills add name/skill or create your own as Markdown files with specialized instructions. A skill can be anything from an SEO expert to a security auditor or an optimized commit generator.

The skills system turns Claude Code into an extensible platform. Instead of having a generic agent, you can load specific skills for each task: a code review skill, a test generation skill, a technical documentation skill.

Skills ecosystem

Claude Code Skills: how to install, create and use extensions: popular skills catalog, how to create custom skills, file structure, trigger activation and practical examples.

Subagents

Subagents are Claude Code instances that the main agent can create to delegate tasks. When Claude Code needs to investigate something complex, it can launch a subagent that works in parallel with a scoped context. The subagent explores, analyzes and returns a summary to the main agent.

This pattern is fundamental for complex tasks. Instead of one agent trying to do everything (monolithic agent anti-pattern), the coordinator delegates specific subtasks: "investigate how this module works", "find all uses of this function", "analyze the dependencies of this package".

Multi-agent architecture

Claude Code Subagents: how they work and when to use them: coordinator-worker pattern, context isolation, inter-agent communication, limits and real use cases.

Worktrees: parallel work

Git worktrees allow you to have multiple working copies of the same repository in parallel. Claude Code leverages this to work on several branches simultaneously without interference. You can have one agent refactoring on one branch while another implements a new feature on another.

This capability is especially valuable in large projects where changes on one branch could break work on another. Each worktree has its own directory and its own git state, eliminating conflicts.

Parallel work

Claude Code Worktrees: parallel work across multiple branches: configuration, commands, parallel workflows, integration with subagents and best practices for teams.

Plan Mode

Plan Mode is an operating mode where Claude Code analyzes and plans before executing. Instead of going straight to editing files, it first generates a detailed plan of the changes it will make, shows it to you for approval and only then executes. Ideal for complex changes where you want to review the strategy before touching code.

You can activate Plan Mode with the Shift+Tab shortcut or configure it as default behavior. It's especially useful for large refactors, migrations and any change affecting multiple files.

Planning before execution

Claude Code Plan Mode: plan before executing: how to activate it, when to use it, differences with standard mode and strategies for complex code reviews.

CI/CD and headless mode

Claude Code can run without human intervention in CI/CD pipelines. Headless mode (claude -p "task" --headless) allows you to integrate Claude Code into GitHub Actions, GitLab CI or any automation pipeline. Use cases: automatic code review on PRs, test generation for new code, documentation updates and issue triage.

In headless mode, Claude Code receives a prompt, executes the task and returns the result via stdout. No interaction, no questions. Ideal for automations running in the background.

Pipeline automation

Claude Code in CI/CD: headless mode and automation: GitHub Actions setup, GitLab CI, permissions, environment variables, workflow examples and security best practices.

Claude Code for teams

When multiple developers use Claude Code on the same project, coordination is key. The project's CLAUDE.md file acts as the shared "source of truth": code conventions, approved patterns, anti-patterns to avoid, naming rules. All team members share the same instructions.

Anthropic's Team plans add specific features: centralized permission management, usage dashboards, security policies and control over which tools each role can use.

Team collaboration

Claude Code for teams: setup and best practices: shared CLAUDE.md, Team plan, permission management, onboarding new members and collaborative agent work patterns.

Plans and pricing

Claude Code is included in Anthropic's Max and Team plans. It doesn't have a separate price. The Max plan costs 20 USD/month (unlimited Sonnet, Opus with monthly limits). The Team plan costs 30 USD/user/month with enterprise management features.

The key question isn't how much it costs, but how much it saves. A developer using Claude Code effectively saves between 5 and 15 hours weekly. At an average cost of 40 EUR/hour, the monthly ROI is 800 to 2,400 EUR for a 20 USD subscription.

Cost and limits analysis

Claude Code free: what's included and what are the limits: available plans, usage limits by model, tokens per session, cost comparison with alternatives and strategies to optimize spending.

Claude Code vs Cursor vs Copilot

The three most-used AI development tools in 2026 are Claude Code (Anthropic), Cursor (Anysphere) and GitHub Copilot (Microsoft). Each has a different approach: Claude Code is a terminal agent with maximum autonomy, Cursor is a full IDE with integrated AI and Copilot is an autocomplete plugin for VS Code.

The choice depends on your workflow. If you prefer working in the terminal and want maximum autonomy, Claude Code. If you prefer a visual interface with integrated AI, Cursor. If you just need autocomplete without changing editors, Copilot. Many developers combine several.

Detailed comparison

Claude Code vs Cursor vs Copilot: which to choose in 2026: point-by-point comparison across 12 criteria, each tool's strengths, pricing, ideal use cases and when to combine them.

Templates and configurations

Claude Code templates are pre-made CLAUDE.md and settings configurations for different project types. A Next.js template includes App Router conventions, Server Components patterns and naming rules. A FastAPI template includes dependency injection patterns, router structure and testing conventions.

Using a good template dramatically accelerates initial setup. Instead of writing CLAUDE.md from scratch, you start from a proven configuration and adapt it to your project.

Ready-to-use templates

Best Claude Code templates (2026): templates by stack (Next.js, FastAPI, React, Python), how to customize them, where to find community templates and how to create your own.

Managed agents

Managed agents are Claude Code's evolution toward managed multi-agent systems. Instead of a single agent working on your project, you can define teams of specialized agents: one for backend, another for frontend, another for testing, a coordinator that distributes tasks. Each agent has its own scope, permissions and configuration.

This pattern is especially powerful in large projects with multiple domains. The coordinator analyzes the task, breaks it into subtasks and assigns them to the right specialized agent. It's the difference between having a junior developer trying to do everything and a senior team with defined roles.

Multi-agent orchestration

Claude Managed Agents: complete orchestration guide: coordinator-worker architecture, agent definition, permissions, inter-agent communication, delegation patterns and production examples.

For beginners

If you've never used Claude Code, the best starting point is the beginners guide. It covers everything from what you need before starting to your first productive session, including the fundamental concepts you need to understand before diving into advanced features.

First step

Claude Code for beginners: from zero to productive: prerequisites, first session, key concepts, common beginner mistakes and recommended learning path.

For specific settings configuration (tool permissions, default model, execution limits), the settings guide covers everything in detail.

Advanced configuration

Claude Code configuration: settings.json and permissions: all configuration options, tool permissions, hooks, custom behavior and security management.

All Claude Code articles

This pillar page connects the 17 articles in the Claude Code cluster. Here's the complete index to navigate to the topic you need:

  1. What is Claude Code and how to use it: definition, architecture and use cases for Anthropic's agent.
  2. How to install Claude Code step by step: requirements, installation on all operating systems and first session.
  3. CLAUDE.md: complete guide to configuring Claude Code: the key configuration file, structure and examples.
  4. Claude Code vs Cursor vs Copilot: which to choose: comparison of the 3 leading AI development tools.
  5. Claude Code commands: complete reference: slash commands, CLI flags, pipe mode and shortcuts.
  6. Claude Code for beginners: quick start guide for those starting from scratch.
  7. Claude Code configuration: settings.json: permissions, hooks, models and custom behavior.
  8. Claude Code Memory: memory layers, context window and strategies for long sessions.
  9. Claude Code Skills: extensions that expand the agent's capabilities.
  10. Claude Code for teams: shared configuration, Team plan and collaborative work.
  11. Claude Code free: limits and plans: real costs, limits by model and spending optimization.
  12. Best Claude Code templates: ready-to-copy configurations by stack.
  13. Claude Managed Agents: orchestration guide: multi-agent systems with coordinator and workers.
  14. Claude Code Plan Mode: planning before execution for complex changes.
  15. Claude Code Subagents: task delegation with secondary agents.
  16. Claude Code Worktrees: parallel work across multiple git branches.
  17. Claude Code in CI/CD: headless mode: automation in continuous integration pipelines.

Learn Claude Code from scratch

Module 03 (free) guides you from installation to your first working agent.

Access Module 03 free