PATH COMPLETION0 / 45 STEPS (0%)
BACK TO LEARNING PATHTRACK 01: Agent Foundations
Step 3 of 6 in this track · 10 min

Your first working setup

This walks through Claude Code because it is the fastest to get running from nothing. The shape is the same for any harness: install it, authenticate, point it at a project, give it a task, review what it did.

Before you start

You need Node.js 18 or newer, a terminal, and a git repository you do not mind an agent touching. Use a real project rather than an empty folder, because agents are much more useful with real context, and you will learn more.

Commit or stash any work in progress first. You want a clean starting point so you can see exactly what the agent changed.

Install

npm install -g @anthropic-ai/claude-code

Then from inside your project directory:

cd ~/projects/your-project
claude

The first run walks you through authentication in a browser.

Give it a real first task

Do not start with "build me a feature". Start with something where you can verify the answer yourself:

explain what this project does and how it is structured

The agent reads your files and summarises. If the summary is wrong, you have learned something important about how much context it is getting.

Then try a small change with an obvious success condition:

add a null check to the function that parses the config file, and a test for it

Small, verifiable, easy to revert. That is the shape of a good first task.

Review before you accept

The agent will show you a diff before changing files. Read it. This is the habit that separates people who get value from agents from people who get subtle bugs.

Specifically check:

  • Did it change files you did not expect
  • Did it delete anything
  • Did it invent a function or import that does not exist
  • Does the test actually test the thing

Then run your own test suite. The agent claiming success is not evidence of success.

Add a project instructions file

Create CLAUDE.md in your project root. The agent reads it on every session, which saves you repeating yourself.

# Project

A TypeScript API using Express and Postgres.

## Commands
- `npm run dev` starts the dev server
- `npm test` runs tests
- `npm run typecheck` must pass before committing

## Conventions
- Use the existing error handling pattern in src/errors.ts
- Tests live next to the file they test
- Never commit directly to main

## Do not
- Do not modify files in src/generated/
- Do not add dependencies without asking

Keep it short and factual. This single file improves output more than almost anything else you can do early on.

Mistakes people make in the first week

Giving a huge vague task. "Refactor the auth system" produces a large diff you will not read carefully. Break it down.

Not reading diffs. The whole value depends on you catching the wrong turns.

Approving everything automatically. Permission prompts exist because some actions are hard to undo. Read them until you have a feel for what the agent asks for.

Working with uncommitted changes. If the agent and you have both edited files, untangling that is miserable. Commit first.

Assuming it remembers. Each session starts fresh apart from your instructions file. Context from yesterday is gone.

Letting it run destructive commands. Never approve a database migration, a force push, or a recursive delete without reading it fully.

When it goes wrong

If the agent is confused about your project, the usual cause is that it has not read the right files. Tell it which files matter.

If it keeps making the same mistake, put the correction in CLAUDE.md rather than repeating it every session.

If it edits the wrong thing, git checkout the file and be more specific. Small, reversible steps beat one large attempt.