Quick answer
- Install
- npm install -g @anthropic-ai/claude-code
- Auth
- Claude subscription or Anthropic API key
- Models
- /model fable · opus · sonnet · haiku, routed by task
- Scaling path
- One session → plan mode → MCP → parallel worktrees → orchestration
Install and Sign In
Claude Code is a CLI, so the whole setup is a package install and a login. You need Node.js and a terminal; macOS, Linux, and Windows all work. Install it globally, then start it from inside a git repository, the tool is dramatically more useful when it can see a real project:
npm install -g @anthropic-ai/claude-code
cd your-project
claudeOn first run, Claude Code walks you through authentication. You have two options: sign in with a Claude subscription (usage counts against your plan's limits, which we break down in Claude Code usage limits), or use an Anthropic API key and pay per token. Subscriptions are simpler for individuals; API billing suits teams that want metered spend. Either way, once you see the interactive prompt, you are in a session.
Your First Session: Talk, Approve, Repeat
There is no special syntax to learn. You describe what you want in plain language, and Claude Code explores the repo, proposes changes, and asks before doing anything consequential. Good first tasks are small and verifiable:
> explain what this repo does and how it's structured
> fix the failing test in src/utils/date.test.ts
> add a --verbose flag to the CLI entry pointThe rhythm of a session is propose, approve, verify. When the agent wants to edit a file, it shows you the diff and waits; when it wants to run a command, it shows you the command and waits. Read what it shows you, especially early on, this is how you calibrate how much to trust it and where it needs guidance. If it goes down a wrong path, interrupt with Escape and redirect. Sessions are conversations, not one-shot prompts: follow-ups like “now add a test for that” or “that broke the build, fix it” are the normal way to work.
CLAUDE.md: Give Every Session a Memory
Every new session starts blank, except for one file: CLAUDE.md, which Claude Code reads automatically at startup. It is where you put everything you would otherwise repeat in every session. Generate a first draft from inside a session:
> /initThree kinds of content earn their place in the file:
- 1
Build and test commands
Exactly how to install, build, run tests, and lint in this repo, so the agent verifies its own work instead of guessing at commands. - 2
Conventions
Code style, naming, directory structure, error-handling patterns, anything a new team member would need to know to write code that fits. - 3
Boundaries
What the agent must not touch: generated files, migrations, vendored code, secrets. Explicit exclusions prevent the most annoying category of mistake.
Keep it short, a bloated CLAUDE.md becomes noise the agent skims past. If you want a structured starting point instead of a blank page, our free AGENTS.md / CLAUDE.md generator builds one from a few questions about your stack.
Plan Mode: Think Before Editing
For anything bigger than a one-file fix, switch to plan mode (toggle with Shift+Tab). In plan mode, Claude Code researches the codebase and writes a plan, files to change, approach, order of operations, without editing anything. You review the plan, push back on the parts you disagree with, and approve it before implementation starts.
This one habit prevents most bad agent outcomes, because bad outcomes usually come from a bad plan executed quickly. It is also the gateway drug to a stronger discipline: writing the plan down as a spec with acceptance criteria before any code exists, which is covered in spec-driven AI development. The rule of thumb: if the task would take you more than an hour by hand, it deserves plan mode; if it would take a day, it deserves a spec.
Ship your first agent today
Download AIDEN free and point it at your existing Claude Code or Codex setup. No credit card, running in minutes.
Download AIDEN freeFree to start · macOS 12+ · No credit card required
Pick the Right Model with /model
Claude Code can run any current Claude model, and the /model command switches mid-session using short aliases. Routing by task is one of the easiest cost and quality wins available, numbers below verified July 18, 2026:
| Model | Alias | Price per MTok | Use it for |
|---|---|---|---|
| Claude Fable 5 | /model fable | $10 in / $50 out | Hardest cross-cutting refactors; requires Claude Code v2.1.170+, not the default |
| Claude Opus 4.8 | /model opus | $5 in / $25 out | Anthropic's recommended starting point for complex agentic coding |
| Claude Sonnet 5 | /model sonnet | $3 in / $15 out (intro $2/$10 through Aug 31, 2026) | Routine features, tests, refactors; 1M context standard |
| Claude Haiku 4.5 | /model haiku | $1 in / $5 out | Quick mechanical edits, triage, cheap subagents |
A sensible default: start sessions on Opus 4.8, drop to Sonnet 5 for routine work, and reach for Fable 5 only when a task is genuinely hard, it leads the published SWE-bench Verified leaderboard at 95.0%, but costs twice Opus per token. The full decision guide, with benchmarks and per-task recommendations, is in best Claude model for coding.
Extend It with MCP Servers
Out of the box, Claude Code can read files and run commands. MCP servers (Model Context Protocol) extend that reach to everything else: your database, your browser, GitHub, issue trackers, documentation sources. You add them with the claude mcp command family, for example:
claude mcp add --transport http github https://api.githubcopilot.com/mcp/Resist the urge to install ten servers on day one. Each server's tool definitions consume context in every session, so start with the one or two that remove a real manual step (most people start with GitHub or a browser-automation server) and grow from there. Which servers are actually worth installing, and how to configure them, is the subject of MCP servers for AI coding.
Permissions and Reviewing Diffs
Claude Code's permission prompts are the safety system, and how you handle them decides whether the tool is a power tool or a hazard. The defaults are sensible: file edits and shell commands require approval, and you can allowlist specific commands you trust (your test runner, your linter) so repeated approvals do not become clicking fatigue.
Two habits matter more than any setting. First, actually read diffs before approving them, an agent that is 95% right is wrong once every twenty edits, and the review moment is where you catch it. Second, be deliberately conservative with anything that leaves your machine or destroys state: pushes, deploys, database commands, rm. Approving those reflexively is how vibe coding accidents happen. Skipping permissions entirely (the “yolo” flag) belongs only in disposable sandboxes, not on a repo you care about.
Going Parallel: Worktrees and Multiple Sessions
Once one session feels natural, the obvious next move is running two or three at once, one fixing a bug, one building a feature, one writing tests. The failure mode is just as obvious: two agents editing the same working copy will trample each other's files. The fix is git worktrees, which give each session its own directory and branch backed by the same repository:
git worktree add ../project-feature-auth feature/auth
cd ../project-feature-auth && claude
# or let Claude Code create the worktree for you:
claude --worktree feature-authEach agent now works in isolation, and each branch merges back through a normal PR. The complete pattern, including cleanup and the scripts that make it painless, is in parallel agents with git worktrees. What worktrees do not solve is the tracking problem: which session is doing what, which one is stuck, which one is done. Strategies for that, from terminal tabs up, are in managing multiple Claude Code sessions.
Where the Tutorial Ends and Orchestration Begins
Everything above scales to about three parallel sessions run by hand. Past that, the bottleneck stops being Claude Code and becomes you: writing task descriptions, creating worktrees, checking on sessions, opening PRs, remembering state. That coordination layer is what orchestration tools exist for, and it is covered in Claude Code orchestration.
AIDEN is our take on that layer: a macOS desktop app that runs your existing Claude Code CLI (same auth, same limits) on a kanban board, where every card gets a drafted spec you approve, an automatic worktree, and a one-click PR. You do not need it to use anything in this tutorial, but if you find yourself juggling five terminal tabs and a sticky note of branch names, that is the problem it removes.