Day 1 of 5
⏱ ~60 minutes
Claude Code Mastery — Day 1

Setup and First Agentic Edit

Claude Code is not a chatbot with code syntax highlighting. It's a CLI agent that reads your files, understands your project, writes changes, and runs your tests — without you describing every line. Today you'll install it and see what "agentic" actually means in practice.

What Claude Code Actually Is

Most AI coding tools work like this: you paste code → AI suggests edits → you copy-paste back. You're the integration layer between AI output and your actual files.

Claude Code flips that. It runs in your terminal with access to your file system. When you give it a task, it:

  1. Reads the relevant files in your project (automatically)
  2. Plans what changes need to happen
  3. Makes the edits directly to your files
  4. Runs your test suite to verify the changes work
  5. Tells you what it did and asks if you want to continue

You're not copy-pasting. Claude Code is pair programming — it just happens to be on your side of the keyboard.

ℹ️
Built by Anthropic. Claude Code is the official CLI from Anthropic, the company behind Claude. It uses the same Claude models under the hood. You pay API costs (not a separate subscription) — most developers spend $10-30/month on typical usage.

Installation

You need Node.js (v18+) and an Anthropic API key. If you don't have an API key, get one at console.anthropic.com — free tier gives you $5 of credits to start.

Terminal — Install
# Install Claude Code globally
npm install -g @anthropic-ai/claude-code

# Verify installation
claude --version

# Set your API key (first-time setup)
export ANTHROPIC_API_KEY=sk-ant-your-key-here

# Or add it permanently to your shell config
echo 'export ANTHROPIC_API_KEY=sk-ant-your-key-here' >> ~/.zshrc
source ~/.zshrc
💡
First run will ask you to log in. Run claude in any terminal and it will walk you through authentication. If you use the API key approach above, you skip this step.

Your First Agentic Command

Navigate to any existing project — it can be anything: a React app, a Python script, a Node API. Then run:

Terminal — First Command
cd your-project

claude "explain this codebase to me in 3 sentences"

Watch what happens. Claude Code doesn't ask for a file. It reads your project structure — package.json, entry points, directory layout — and synthesizes an explanation. It didn't need you to paste anything.

Now try something that requires actual changes:

Terminal — First Edit
claude "add a dark mode toggle to the header component"

Claude Code will:

  1. Find your header component file
  2. Read it
  3. Determine what dark mode implementation makes sense given your existing styles
  4. Show you the planned changes (before making them)
  5. Ask for confirmation
  6. Apply the edits
claude "add a dark mode toggle to the header component"
I'll add a dark mode toggle to your header component.
Reading: src/components/Header.tsx
Reading: src/styles/globals.css
Plan:
1. Add a theme toggle button to Header.tsx
2. Add CSS variables for dark/light themes in globals.css
3. Use localStorage to persist preference
Proceed? [y/n]
y
✓ Modified src/components/Header.tsx
✓ Modified src/styles/globals.css

Agentic Mode vs. Asking Mode

Claude Code has two modes you'll use constantly:

Agentic mode (default)

Give it a task. It reads files, plans, edits, and runs commands autonomously. It will ask for confirmation before making changes unless you use --dangerously-skip-permissions (more on that in Day 4). Best for: adding features, refactoring, fixing bugs.

Interactive mode

Just run claude with no arguments to open an interactive session. You can ask questions, get explanations, and then decide whether to let it make changes.

Terminal — Interactive Mode
# Start interactive session
claude

# Inside the session, you can type naturally:
> How is the authentication currently implemented?
> What files would I need to change to add OAuth?
> Go ahead and add GitHub OAuth

# Exit with
> /exit

Understanding What Claude Code Sees

Claude Code reads your project by looking at:

It does not read every file in your project by default — that would be wasteful and expensive. It reads what it needs, when it needs it.

⚠️
It won't read your .env file. Claude Code respects .gitignore and will not read files with secrets. If you need to give it database connection info for testing, use .env.example with placeholder values.
💻 Day 1 Exercise
Add a Feature to an Existing Project Using Only Natural Language

Use a real project you're working on, or clone any open-source project from GitHub. You're going to use Claude Code to add one small feature without writing a single line of code yourself.

  1. Install Claude Code and set up your API key following the steps above.
  2. Navigate to your project directory in terminal.
  3. Run claude "explain this codebase to me" — verify it understands your project.
  4. Pick one small feature to add: a loading spinner, a form validation message, a new API endpoint, a unit test — anything real.
  5. Describe the feature in plain English: claude "add [your feature description]". Review the plan before approving.
  6. After it makes changes, look at the diff. Understand what it changed. Would you have written it the same way?
💡
Review every change. Claude Code is confident and fast. That's mostly good. But you're still the engineer — review every diff like you'd review a junior developer's PR. The first week, this habit saves you from accepting changes that work but don't fit your architecture.

Day 1 Summary

  • Claude Code is a CLI agent — it reads your files, plans edits, and applies them. You're not copy-pasting AI output into your editor.
  • Install with npm install -g @anthropic-ai/claude-code. Set your API key. Navigate to your project. Run claude "task".
  • Claude Code reads your project structure automatically — you don't need to paste files unless you want to be explicit.
  • Always review the plan and diff before confirming. You're the engineer. Claude Code is your pair programmer, not your replacement.
Challenge

Find the most tedious, repetitive code change you've been putting off — the kind of thing that's obvious what needs to happen but annoying to actually do. Add a TODO file, a new API response format across 10 endpoints, consistent error handling — something real. Give it to Claude Code. See how far it gets without you needing to intervene. That gap between "it got most of it" and "it got all of it" is what you'll close over the next 4 days.