After this lesson, you will be able to: Use Claude Code from the terminal to read, write, and refactor code across an entire project, and know when to drive it manually vs. agentically.
Claude Code is Anthropic's terminal-based AI coding agent. It can read your whole project, edit multiple files at once, run commands, and iterate based on what it sees. This lesson walks through installing it, using it well, and avoiding the mistakes most beginners make.
Claude Code is a CLI tool, installs in one command if you have Node.js.
Install Node.js (nodejs.org) if you don't have it
In a terminal, run: npm install -g @anthropic-ai/claude-code
Navigate into a project: cd ~/projects/my-website
Run: claude
Follow the prompt to authenticate with your Anthropic account
Claude Code reads your code, plans, edits files, and runs commands, the same way a human developer would. It's an agent, not just an autocomplete. When you ask it to add a feature, it explores the codebase, makes a plan, edits multiple files, and reports back. You confirm or redirect.
The more context you give, the better the result. Be specific.
# Bad, too vague"add a login page"# Better, specific, scoped"Add a /login page that posts to /api/auth/login. Use the existingstyles.css. Show validation errors inline. Don't change the navbar."# Best, references real files and behavior"In src/app/login/page.tsx, build a login form that calls/api/auth/login. Match the visual style of /signup. On success,redirect to /dashboard. On 401, show the inline error from the response."
Great for: scaffolding boilerplate, refactoring, fixing TypeScript errors, writing tests, explaining unfamiliar code, generating migrations. Less great for: architectural decisions, deeply contextual business logic, security-critical code, anything where the wrong choice has consequences you can't easily reverse.
Open the bio page from wd-08 in Claude Code and use it for a real task.
cd into your bio-page project
Run claude to start a session
Ask: "Read styles.css and refactor it to use CSS variables for the color palette. Don't change any visual styles."
Review the diff before accepting
Ask a follow-up: "Now add a dark-mode toggle that swaps the variables when a button is clicked."
Test the result in the browser
Hint: even good agents are not perfect.
Sign in and purchase access to unlock this lesson.