Skip to content

Claude Code 101

Claude Code is an agentic coding tool that runs in your terminal and works across a whole repository, not just the file you happen to have open. This page is the fast path from “installed nothing” to “productively pairing on an existing codebase.” It’s the practical companion to AI-Assisted Engineering — that page is the why and the when; this one is the how.

1. Install it

The recommended install is the native script — it self-updates, so you’re not chasing versions later.

macOS, Linux, or WSL:

curl -fsSL https://claude.ai/install.sh | bash

Windows (PowerShell):

irm https://claude.ai/install.ps1 | iex

If you’d rather manage it through a package manager, Homebrew works too — just know it won’t auto-update, so you’ll upgrade it yourself:

brew install --cask claude-code
# later: brew upgrade claude-code

On native Windows, install Git for Windows alongside it so Claude Code can use Bash; without it, it falls back to PowerShell.

2. Start it and log in

Run it from anywhere:

claude

The first session opens your browser to log in. You’ll need one of:

  • A Claude subscription (Pro, Max, Team, or Enterprise), or
  • An Anthropic Console account with pre-paid API credits, or
  • Access through a cloud provider (Amazon Bedrock, Google Cloud, Microsoft Foundry).

Credentials are stored locally and persist across sessions. If you ever need to switch accounts, run /login from inside a session.

💡
For a team rollout, decide the billing path before people install. A Max subscription is the simplest per-seat story for engineers who’ll live in the tool; Console/API billing gives you central spend visibility but needs someone to own the credits. Sorting this out first saves a round of “why won’t it log me in” tickets.

3. Point it at an existing repo with /init

This is the step people skip and then wonder why the results feel generic. Open a session inside your project directory and run:

/init

/init reads through the codebase and generates a starter CLAUDE.md in the project root — a short markdown file capturing your build commands, how tests run, and the conventions it can infer. Claude reads that file at the start of every future session, so it stops re-discovering your project each time. If a CLAUDE.md already exists, /init suggests improvements rather than clobbering it.

Treat the generated file as a first draft. Skim it, fix anything it guessed wrong, and add the two or three house rules a new hire would need to know — the lint command you actually use, the directory that’s off-limits, the pattern you always follow. That hand-editing is where most of the leverage comes from. You can reopen it any time with /memory.

💡
Commit CLAUDE.md to the repo. It’s shared team context, not personal config — the same way a good README is. When someone tightens a convention in review, it belongs here too, so the next person (and the next session) inherits it automatically.

4. The commands worth knowing on day one

You don’t need the whole reference to be productive. These are the ones that earn their keep immediately:

CommandWhat it’s for
/helpThe full command list. Type / alone to browse and filter.
/initGenerate or improve the project’s CLAUDE.md (above).
/memoryEdit CLAUDE.md and toggle auto memory.
/clearStart a fresh conversation when you switch tasks — keeps context clean and costs down.
/modelSwitch the model for this session or as your new default.
/contextSee how much of the context window you’re using.
/compactSummarize a long conversation to free up context without losing the thread.
/exitLeave the session (Ctrl+D also works).

Plan mode is worth a mention too: ask Claude to plan a change before it touches files, and you get a reviewable approach up front instead of a surprise diff. It’s the single habit that most reliably keeps generated work inside the rails.

💡
Reach for /clear far more often than feels natural. A long, sprawling conversation costs more and drifts more; a tight one scoped to the task at hand gives sharper results. New task, new context — make it a reflex.

Where to go next

Once the mechanics feel routine, the interesting problems are human, not technical: what “AI wrote it” does to code review and ownership, and how to get a whole team to adopt these tools without losing rigor. That’s covered in AI-Assisted Engineering and Leading AI-Adopting Teams.

📚 Go Deeper

Courses

  • Claude Code 101Anthropic's free intro course — a guided, hands-on walkthrough for anyone who learns better by doing than by reading docs.

Tools

  • Claude Code quickstartThe official install-and-first-session walkthrough. Start here if anything below has drifted — the tool moves fast.
  • Claude Code memory & CLAUDE.mdHow /init, CLAUDE.md, and auto memory work — the mechanism that makes Claude actually understand your project.
  • Claude Code commands referenceThe full slash-command list. Worth a skim once the basics click, so you know what's there when you need it.
Last updated on