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 | bashWindows (PowerShell):
irm https://claude.ai/install.ps1 | iexIf 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-codeOn 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:
claudeThe 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.
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.
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:
| Command | What it’s for |
|---|---|
/help | The full command list. Type / alone to browse and filter. |
/init | Generate or improve the project’s CLAUDE.md (above). |
/memory | Edit CLAUDE.md and toggle auto memory. |
/clear | Start a fresh conversation when you switch tasks — keeps context clean and costs down. |
/model | Switch the model for this session or as your new default. |
/context | See how much of the context window you’re using. |
/compact | Summarize a long conversation to free up context without losing the thread. |
/exit | Leave 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.
5. Context is not memory
One distinction is worth getting straight early, because it quietly shapes how well everything above works.
Context is the current conversation’s working memory — everything Claude can “see” right now. It’s finite, and the fuller it gets, the worse things go on two fronts. Cost: every new message re-sends the entire conversation, so a long session quietly burns more tokens with each turn — you pay for all that history over and over. Accuracy: a crowded window makes the model more likely to lose the thread and hallucinate — confidently inventing a detail instead of tracking what’s actually there. That’s why /clear between tasks and /compact on a long one aren’t housekeeping — they keep answers both cheaper and sharper. Treat them as reflexes, not options: new task, fresh context.
Memory is the opposite instinct: the durable notes that persist across conversations — your CLAUDE.md and auto memory. That, you let grow.
So the rule of thumb is prune context, cultivate memory — keep each conversation tight and scoped, and let the long-term notes accumulate.
Where to go next
Three good next steps:
- LeaderOS: Your Second Brain — grow that memory into a second brain for your whole job, not just code.
- AI-Native Engineering — how to reinvent the software development lifecycle (SDLC) around AI-led work.
- Leading AI-Adopting Teams — helping your whole team pick up these tools well.
📚 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.
- Claude Code Beginner to Pro: Agentic Coding for DevelopersA paid, project-based Udemy course that takes you from beginner to genuinely productive — you build a real Next.js app with Claude Code, start to finish. About ten hours all in, course plus tinkering, and a fast on-ramp if you'd rather learn by shipping something.
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.