Getting Started with Claude Code¶
Claude Code is Anthropic's agentic coding tool. It runs in your terminal (and in VS Code, JetBrains, the desktop app, and the browser) and works directly inside your project: it reads your codebase, edits files, runs commands, and integrates with your tools — all with your approval. Instead of copying snippets into a chat window, you tell Claude what you want and it does the work where the work actually lives.
This page is the on-ramp. It covers what the tool is, how to install and sign in, the core loop you'll repeat all day, and the handful of essentials that make the difference between fighting the tool and flying with it. If you read one section, read Plan mode.
Who this is for. This section of the knowledge base leans technical — engineers adopting the tool — but you don't need to be an expert to start. The first session below takes about ten minutes.
What Claude Code actually is¶
Claude Code is an AI agent that understands your whole codebase and can act across many files and tools to get a task done. You describe an outcome in plain language ("add pagination to the orders endpoint and write tests"); it plans an approach, edits the relevant files, runs the tests, and reports back. It works with git, can open pull requests, and connects to external systems through MCP.
The key mental shift: you are no longer the one typing every line. You are the one who sets intent, reviews the work, and approves the risky steps. The model is fast and capable, but it doesn't deliberate over days or carry lessons between sessions on its own — so you own the direction and the verification. (More on that in Plan and Design First.)
Install and authenticate¶
Installation and login are quick, and the official docs stay current — follow them rather than any command copied here.
- Install (macOS / Linux / WSL), the recommended native installer:
Homebrew (
brew install --cask claude-code), WinGet, and Linux package managers (apt/dnf/apk) are also supported. See the official Setup and Quickstart guides under Sources. - Start it in any project:
- On first run you're prompted to log in. Most surfaces require a Claude subscription or an Anthropic Console account. Sign in once and you're ready.
VS Code, JetBrains, the desktop app, and the web (claude.ai/code) all connect to the same engine, so your CLAUDE.md files, settings, and MCP servers follow you across surfaces.
The core loop¶
Almost everything in Claude Code is a variation on this cycle:
- You describe a goal in natural language.
- Claude investigates — reads files, searches the codebase, runs read-only commands to understand the situation.
- Claude proposes and acts — edits code, runs builds and tests, makes commits — pausing to ask your permission before anything consequential.
- You review — read the diff, run the tests, accept or redirect.
- Repeat until the task is done.
The thing to internalize: Claude does real work on your machine, but you stay in the loop at the approval points. How often it pauses is controlled by permission modes.
The essentials a newcomer needs first¶
Permission modes¶
When Claude wants to edit a file, run a shell command, or hit the network, it pauses for approval. Permission modes set how often that pause happens. Cycle them mid-session with Shift+Tab; the active mode shows in the status bar.
| Mode | Runs without asking | Reach for it when |
|---|---|---|
default |
Reads only | Getting started, or sensitive work you want to watch |
acceptEdits |
Reads + file edits + common filesystem commands | Iterating on code you'll review via git diff after |
plan |
Reads only (will not edit) | Exploring or designing before any change — see below |
auto |
Most things, with background safety checks | Long tasks where you trust the direction (availability varies by plan/model) |
dontAsk |
Most things; pauses only for the highest-risk actions | You trust the task and want fewer prompts, but not a full bypass |
bypassPermissions |
Everything | Isolated containers/VMs only — no safety prompts |
Start in
default. Let Claude earn looser modes as you build trust on a given task. In every mode exceptbypassPermissions, writes to protected paths like.git/,.claude/, and.mcp.jsonare never auto-approved.
You can also pre-approve specific commands so they never prompt — see the permissions allowlist in MCP and Config. For the full picture on modes, allow/deny rules, and sandboxing, see Security, permissions & sandboxing.
Plan mode (start here for anything non-trivial)¶
Plan mode tells Claude to research and propose an approach without making changes. It reads code and runs read-only commands, then writes a plan and stops. You read the plan, correct it, and only then approve — turning "review 300 lines of code" into "review one paragraph."
- Enter it with Shift+Tab, by prefixing a prompt with
/plan, or by launchingclaude --permission-mode plan. - When the plan is ready, Claude asks how to proceed: approve and start editing, approve and accept edits, approve and review each edit manually, or keep refining with your feedback.
- Press
Ctrl+Gto open the proposed plan in your editor and tweak it directly before Claude proceeds.
Make plan mode your default for anything that isn't a one-liner. It is the cheapest quality lever you have. Why this matters is the whole argument of Plan and Design First — read it next.
The CLAUDE.md memory file¶
Each session starts with a fresh context window. CLAUDE.md is how you carry knowledge across sessions: a plain-markdown file Claude reads at the start of every session. Put build commands, conventions, architecture notes, and "always do X" rules in it.
- Project:
./CLAUDE.mdor./.claude/CLAUDE.md— shared with your team via git. - Personal:
~/.claude/CLAUDE.md— your preferences across all projects. - Local/private:
./CLAUDE.local.md— gitignored, just for you on this repo. - Run
/initto generate a startingCLAUDE.mdfrom your codebase; use/memoryto list and open the memory files currently loaded (and edit them), with an on/off toggle for auto memory (notes Claude writes for itself across sessions).
Keep it concise (target under ~200 lines) and specific — "Use 2-space indentation," not "format code nicely." Full guidance and patterns live in Memory and Project Rules.
Within a session, when the context window fills with stale detail, reset it with /clear (wipe and start fresh) or /compact (summarize and keep going) — see Knowing When to Reset and Context Management.
Running tests and builds¶
Claude doesn't just write code — it can run your test suite and build, read the output, and fix what broke. Tell it the commands (or record them in CLAUDE.md) and let it iterate: "run the tests and fix any failures." This closes the loop so you're reviewing working code, not hopeful code. Insisting on this is the heart of Verification and Review.
Reviewing diffs¶
Treat Claude's output the way you'd treat a teammate's pull request. Read the diff before accepting (git diff, or the inline diff view in the IDE extensions). In default mode you approve edits as they happen; in acceptEdits you review afterward. Either way, the review is yours — never merge what you haven't read.
Your first session¶
A short walkthrough to feel the loop end to end:
- Open the project.
cd your-project && claude. - Orient. Ask: "Give me a high-level tour of this codebase — main entry points, how it's structured, how tests run." Claude reads around and summarizes. No changes yet.
- Switch to plan mode (Shift+Tab until the status bar shows plan) and state a real task: "Add input validation to the signup endpoint. Plan it first."
- Read the plan. Correct anything off — "we use zod for validation here," "don't touch the legacy handler." Then approve.
- Let it build, then verify. "Implement it, then run the tests and fix any failures." Watch the approvals; read the diff.
- Commit. "Commit this with a clear message." Review the staged diff and the message before you confirm.
That's the whole game, scaled up: orient, plan, build, verify, review. Everything else in this guide makes each step sharper.
Where to go next¶
- Skills, Plugins, Slash Commands, and MCP — extend Claude with the tools this team actually has installed.
- Superpowers and Workflows — the disciplined brainstorm → plan → execute → verify chain.
- MCP and Config — connect external tools and tune
settings.jsonto cut down on prompts. - Codex and OpenCode — other agentic CLIs, and how the same habits carry over to them.
- Foundations: Plan and Design First · Memory and Project Rules · Verification and Review
Sources¶
- Claude Code overview — https://code.claude.com/docs/en/overview
- Quickstart — https://code.claude.com/docs/en/quickstart
- Permission modes — https://code.claude.com/docs/en/permission-modes
- Memory (CLAUDE.md and auto memory) — https://code.claude.com/docs/en/memory
- Settings — https://code.claude.com/docs/en/settings