Claude Code is Anthropic's terminal-based AI coding agent: you run one command in your project, describe what you want in plain language, and the agent reads your files, plans, edits code, runs commands and checks its own work in a loop. This complete beginner guide takes you from nothing installed to a productive first session: how to install Claude Code, how to start it, the core plan-edit-run-review workflow that makes it reliable, the CLAUDE.md file that teaches it your rules, and where to go next to master subagents, hooks, skills and MCP. Everything here is current as of June 2026 and verified against the official docs.
What Claude Code is (and what it is not)
Claude Code is an agent harness: software that wraps a Claude model in a loop with tools (read files, edit files, run shell commands, search the web) and the judgement to use them toward a goal you set. It runs in your terminal, in VS Code and JetBrains, in a desktop app and on the web. It is not just autocomplete and it is not a chat window that hands you snippets to paste: it works directly in your repository, makes multi-file changes, runs your tests, and iterates until the task is done. You stay in control by reviewing what it proposes and approving the actions that matter.
- It lives where your code lives: the terminal, your editor, or a browser tab.
- It acts, not just suggests: it edits files and runs commands, then reads the results.
- You supervise: it asks permission for sensitive actions and you review its plans and diffs.
- It needs an account: a Claude Pro, Max, Team, Enterprise or Console (pay-per-token) plan. The free Claude.ai plan does not include Claude Code.
Installing Claude Code
The recommended way to install Claude Code in 2026 is the native installer, which has no Node.js dependency and auto-updates itself in the background. Run the one-line installer for your platform, then confirm it worked. If you prefer npm, the package still works and installs the same binary, but it needs Node.js 18 or later and does not auto-update as cleanly. Never install with sudo: a root-owned npm directory causes permission failures on every future install.
# macOS, Linux, WSL (recommended native installer)
curl -fsSL https://claude.ai/install.sh | bash
# Windows PowerShell
irm https://claude.ai/install.ps1 | iex
# npm fallback (needs Node.js 18+, do NOT use sudo)
npm install -g @anthropic-ai/claude-code
# Confirm it installed
claude --versionIf something looks off, run "claude doctor" for a health check of your install and configuration. On native Windows, installing Git for Windows is optional but lets Claude Code use Git Bash for shell commands.
Your first session
Open a terminal inside the project you want to work on and run "claude". The first time, it walks you through logging in via the browser. Once you are in, you are at an interactive prompt: type a request in plain English and press enter. Start small to build trust, for example "explain what this project does" or "find where the homepage hero is rendered". Claude Code reads the relevant files itself, so you do not need to paste code in. When you want to end the session, type /exit, and to resume later run "claude -c" to continue your most recent session in that folder.
# Start Claude Code in the current project
claude
# Continue your most recent session in this folder
claude -c
# Resume a specific past session from a list
claude --resumeThe core workflow: plan, edit, run, review
The single habit that makes Claude Code reliable is to plan before you let it edit. Press Shift+Tab to enter plan mode: Claude explores your codebase and proposes what it intends to do without changing a single file, so you can correct course cheaply before any code is written. Approve the plan, let it make the edits, have it run your tests or dev server, and then review the diff before you commit. This explore-plan-implement-commit loop keeps the agent honest and catches a wrong direction while it is still free to fix.
- Plan: press Shift+Tab for plan mode so Claude proposes changes before editing. Use it for anything touching several files, schema, or security.
- Edit: approve the plan and let Claude make the multi-file changes.
- Run: have it run your tests, type checker or dev server so it sees real results, not assumptions.
- Review: read the diff and commit. You are the quality gate before code is permanent.
CLAUDE.md: teaching the agent your rules
CLAUDE.md is a plain Markdown file at the root of your repo that Claude Code reads automatically at the start of every session and treats as standing instructions. It is the highest-leverage upgrade you can make: put your stack, conventions, quality gate and tone in it once, and the agent stops re-deciding them every task. Generate a starting file by running /init, which scans your project and drafts a CLAUDE.md, then trim it to the rules you actually keep correcting. Keep it tight, because it is reloaded every turn and eats the same context window your task needs.
# Project Rules
## Stack
- TypeScript only. Package manager is bun, never npm.
## Conventions
- Use rounded-sm for border-radius. Never use em dashes; use "-".
## Quality
- Before saying a task is done, run: bun run lint && bun run typecheck && bun run test.
## Tone
- Direct and concise. No filler.Go deeper: the four skills that make you a power user
Once the basics click, four features turn Claude Code from a helpful assistant into a reliable teammate. Each has its own deep-dive guide in this cluster. Subagents let you delegate noisy side work to a fresh context so your main session stays sharp. Hooks run your quality gates automatically so a broken change cannot slip through. Skills and slash commands package your best workflows into one-word triggers. And MCP connects the agent to your databases, browsers and services. Read them in any order; together they are the difference between using Claude Code and mastering it.
- Subagents: delegate research, review or testing to a specialised agent in its own context window. See the Claude Code Subagents guide.
- Hooks: fire shell commands automatically at lifecycle events to enforce formatting, tests and safety. See the Claude Code Hooks guide.
- Skills and slash commands: capture a repeated workflow as a reusable /command or Skill. See the Skills and Slash Commands guide.
- MCP: connect external tools and data through one standard protocol. See the MCP setup guide.
Step by step
Install Claude Code
Run the native installer for your platform (curl on macOS/Linux/WSL, irm in Windows PowerShell), or use npm with Node.js 18+. Confirm with "claude --version".
Start your first session
Open a terminal in your project, run "claude", and log in via the browser when prompted. Begin with a low-risk request like "explain what this project does".
Plan before you edit
Press Shift+Tab to enter plan mode. Let Claude propose its approach without touching files, then correct it cheaply before any code is written.
Let it implement and run
Approve the plan, let Claude make the edits, and have it run your tests or dev server so it works from real results rather than assumptions.
Review and commit
Read the diff, fix anything off, and commit. You are the quality gate that decides what becomes permanent.
Add a CLAUDE.md
Run /init to generate a starting CLAUDE.md, then trim it to your stack, conventions and quality-gate command so the agent follows your rules every session.
