Tuesday · Installation & First Session

Get Claude Code
running today

By Richard Gamarra

No more theory. By the end of today Claude Code will be installed, authenticated, and you'll have run your first real session on an actual project.

Claude Code installed and first session completed

Prerequisites & installation

Claude Code is a CLI tool installed via npm. You need Node.js 18+ and a terminal. That's it.

01
Check Node.js version
Claude Code requires Node.js 18 or higher. Run node --version in your terminal. If you see v18 or above, you're ready. If not, download the LTS version from nodejs.org.
02
Install Claude Code globally
One command installs it system-wide. You'll run this once. Upgrades happen separately when new versions release.
Terminal
$ npm install -g @anthropic-ai/claude-code
⚠ On Windows, run this in PowerShell (not CMD). If you get a permissions error, open PowerShell as Administrator and run the install again.
PowerShell
PS> npm install -g @anthropic-ai/claude-code
03
Verify the install
After installation completes, confirm it worked:
Terminal
$ claude --version claude-code 1.x.x
💡 Don't use sudo on macOS
If npm install requires sudo, your global npm directory needs fixing. Run npm config get prefix. If it's under /usr/local or /usr, follow the npm docs to change it to a user-owned directory. This saves headaches later.
01 / 05

Connect to Anthropic

Claude Code needs access to Claude's API. You have two paths depending on how you're set up.

Path A: Claude Max subscription Recommended
If you subscribe to Claude.ai's Max plan ($100/mo), Claude Code is included. No API keys needed. You authenticate with your Claude account directly. Run claude and it guides you through browser-based login.
Path B: Anthropic API key
If you're using the API directly, set your key as an environment variable before launching. You'll be billed per token used (roughly $3-15 per million tokens with Claude Sonnet 4).
macOS / Linux: .zshrc or .bashrc
export ANTHROPIC_API_KEY=sk-ant-your-key-here # Add to ~/.zshrc or ~/.bashrc so it persists
Windows PowerShell (persistent)
PS> [System.Environment]::SetEnvironmentVariable("ANTHROPIC_API_KEY", "sk-ant-your-key", "User")
Launch and confirm auth
Navigate to any project directory and type claude. On first run it confirms your authentication method. Max subscribers see a browser login prompt; API key users see a confirmation that the key is recognized.
Terminal
$ cd ~/my-project $ claude ╭──────────────────────────────────────────╮ │ Welcome to Claude Code (v1.x.x) │ │ ✓ Authenticated via Claude Max │ │ Type a message or /help to begin. │ ╰──────────────────────────────────────────╯ >
💡 The > prompt is interactive: Claude is live and waiting. Type your first message here, or press Ctrl+C to exit. You're in your own terminal, in your own repo, with full file access.
02 / 05

Your first real session

The fastest way to learn Claude Code is to use it on a real project, even a small one. Here's a proven sequence for your first 20 minutes.

"The first thing I ask Claude Code is always: summarize this codebase and tell me anything surprising you find."

Common first-session workflow from experienced Claude Code users
01
Orient Claude to your project
Start with a high-level question. Claude will read your files and come back with a real understanding of what it's looking at.
First prompt Paste this exactly
"Give me a 5-bullet summary of what this project does, what the main files are, and flag anything that looks unusual or worth knowing."
02
Ask it to find something specific
Now test its codebase search. Pick a function, a bug, or a question you already know the answer to, then verify it can find and explain it correctly.
Second prompt Adapt to your project
"Where is authentication handled in this codebase? Walk me through the flow from login request to session creation."
03
Make a small, safe edit
Pick something trivial: a comment, a console.log, a minor copy change. Watch Claude propose the diff and ask for approval before writing. This is the confirm-before-action pattern you'll rely on daily.
Third prompt Low-risk first edit
"Add a JSDoc comment to the main function in [filename].js explaining what it does and what it returns. Show me the diff before writing."
Key pattern Always review diffs before accepting
Claude Code shows you what it wants to change and asks permission. Get comfortable with this back-and-forth. It's your main control surface. You can say "looks good", "undo that", or "adjust X and try again" in plain language.
Slash commands Built-in shortcuts
Type /help to see all commands. Key ones for today: /clear resets context, /undo reverts the last file change, /diff shows what changed, /exit ends the session. These work in any conversation state.
03 / 05

CLAUDE.md: teach Claude your project

Every time Claude Code starts a session it reads CLAUDE.md from your project root. This is how you give it persistent, project-specific knowledge that survives across sessions.

What goes in CLAUDE.md
Commands it needs to know (npm run dev, test commands, deploy scripts), architectural decisions that aren't obvious from the code, things it should never do (don't modify this file, always use this pattern), and context about the team or domain.
CLAUDE.md: starter template
# CLAUDE.md # This file is read by Claude Code at the start of every session. ## Commands - `npm run dev` → Start dev server (localhost:3000) - `npm run test` → Run test suite - `npm run build` → Production build - `npm run lint` → ESLint check ## Architecture - Next.js 14 app, React 18, Tailwind v3 - Auth via NextAuth.js (app/api/auth/) - Data: PostgreSQL via Prisma (schema.prisma) - All API routes live under app/api/ ## Important rules - Never commit .env files - Always run lint before committing - Migrations go in prisma/migrations/ only - Use existing Tailwind classes before writing custom CSS ## Context - Multi-tenant SaaS. `tenantId` is always required in DB queries. - We use soft deletes: never use DELETE, always set deletedAt.
Let Claude write the first draft
You don't have to write CLAUDE.md from scratch. Claude Code can analyze your project and draft it for you, then you edit and refine.
Prompt Run this in your project
"Analyze this project and create a CLAUDE.md file at the root. Include the main dev commands, the tech stack, key architectural decisions, and any rules I should enforce in future sessions. Keep it concise, under 60 lines."
💡 CLAUDE.md is also how you share context across a team. Commit it to Git and every developer using Claude Code on the project gets the same starting context. Think of it as onboarding documentation that Claude reads automatically.
Pro tip Nested CLAUDE.md files
You can also create a CLAUDE.md inside any subdirectory. Claude reads both the root one and the directory-specific one when you're working in that folder. Useful for monorepos where each package has different rules.
04 / 05

Practice prompts & day checklist

Three more prompts to try today, then check off what you completed.

Exploration Good for any codebase
"List all the places in this project that make external API calls. For each one, tell me what API it's calling and what error handling exists."
Documentation Safe, no risk of breaking things
"Find the three functions in this project with the most complex logic and add clear JSDoc comments explaining what each parameter does and what the function returns."
Git workflow Try on a real branch
"Look at my current git diff and write a conventional commit message for it. Then show me what the commit would look like. Don't commit yet, just show me."
Session notes
What you'd do differently
  • Installed Claude Code with npm install -g @anthropic-ai/claude-code
  • Verified the install with claude --version
  • Authenticated (Max subscription or API key) and reached the > prompt
  • Ran the codebase summary prompt on a real project
  • Made at least one small edit and reviewed the diff before accepting
  • Created or drafted a CLAUDE.md file for my project
  • Tried at least one slash command (/help, /clear, or /undo)
05 / 05

Day 02 complete

You're installed, authenticated, and have a real session under your belt. Tomorrow is Day 03: Reading & Understanding Code. You'll learn the prompts that make Claude a genuine codebase expert on your project.

Keep CLAUDE.md open in your editor. You'll be adding to it throughout the 30 days.