techdad.io
← Tutorials

Tutorials

Getting Started with Claude Code: Your First Session

Install Claude Code, run it in your own repo, and complete one small real task — with the reviewing habit and project instructions file that make it safe to trust.

LESSON7 min readJul 5, 2026human-reviewed
On this page

If you read AI Coding Agent vs. Chatbot, you already know the one-line distinction: a chatbot talks, an agent acts — directly in your project, running commands and editing files, checking its own results. Claude Code is Anthropic’s version of that: a coding agent that lives in your terminal and works inside whatever repository you point it at.

This is a hands-on tutorial, not a feature tour. By the end, you’ll have installed Claude Code, run one real (small) task in your own project, and picked up the two habits that make it safe to use on things that actually matter: reviewing before you accept, and giving it a standing instructions file so you’re not repeating yourself every session.

Before you start

You need three things, and nothing more exotic than that:

  • A terminal. Any terminal on macOS, Windows, or Linux works — there’s no special version required.
  • A code editor, so you can look at what changed with your own eyes, not just take the agent’s word for it.
  • A git repository you don’t mind experimenting in. An existing side project is ideal, because it gives Claude Code real context to read. If you don’t have one handy, git init in an empty folder works fine for your first run — you just won’t get to see the “reads your existing code” part in action.

You don’t need to know Claude Code’s internals, and you don’t need to be an expert programmer. You do need to be comfortable typing a command and reading what comes back — that’s the whole skill floor.

Install and launch

Claude Code publishes a native installer for macOS, Linux, WSL, and Windows, plus an npm package if you’d rather install it that way through Node. As of this writing, the officially documented options are:

macOS, Linux, or WSL:

BASH
curl -fsSL https://claude.ai/install.sh | bash

Windows (PowerShell):

POWERSHELL
irm https://claude.ai/install.ps1 | iex

Or, if you already have Node.js 22 or later installed, via npm:

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

(Don’t run this one with sudo — if you hit a permission error, that’s the fix to look for, not root access. Running as root is a common source of the exact problem it looks like it’s solving.)

Once it’s installed, open a terminal inside the project you want to work in — this matters, since Claude Code works on whatever directory you launch it from — and start it:

BASH
claude

The first time you run it, it walks you through logging in. This happens in your browser, and it requires a Claude account on a paid plan (Pro, Max, Team, Enterprise, or an API/Console account) — the free Claude.ai chat plan doesn’t include Claude Code access, since you’re now paying for compute that reads and edits files, not just a chat window.

Once you’re authenticated, you land in an interactive session sitting inside your project. It looks like a normal terminal prompt, with a small status line showing your current project and model. There’s no menu to click through and nothing to configure before you start — you just type what you want, in plain English, like you’re describing the task to a coworker who’s never seen your code before.

Your first task

Pick something small and real — not a toy example, an actual thing your project could use. A good first task is something like “add a Getting Started section to the README” or “rename the getUserData function to fetchUserProfile everywhere it’s used.” Both are low-risk, both are genuinely useful, and both are big enough to actually show you the tool working.

Type it in plain language, the way you’d describe it to a coworker:

Add a “Getting Started” section to README.md with steps to install dependencies and run the dev server.

Watch what happens next. Claude Code doesn’t start writing immediately — it reads the relevant files in your project first. In this example, that’s your README and probably your package.json or equivalent, to find out what the actual install and run commands are, rather than guessing at generic ones. Only after that does it show you a proposed change: the exact new section it wants to add, presented as a diff against the current file, with a short note on what it did and why.

This is the “acts in your environment” half of the chatbot comparison, made concrete: it isn’t reciting what a typical README looks like from training data, it’s reporting back what your project’s package.json actually says.

Review before you accept

Here’s the habit that matters most: Claude Code shows you what it’s about to do before it’s final, and you approve it. For a file edit, that means a diff — the old lines and the new lines, side by side, usually with the additions and deletions clearly marked — that you read before accepting. For anything that runs a command in your project (installing a package, running a script, deleting a file), you get the same kind of checkpoint before it happens, not a notification after the fact.

Don’t skip this step, even on something as low-stakes as a README edit. The point isn’t that Claude Code is untrustworthy — the point is that you stay the one who knows what changed in your own project, every single time, with no exceptions carved out because a change looked small or the task felt routine. That habit is the one that actually protects you once you start pointing this at real application code instead of documentation.

Read the proposed change. If it’s right, accept it, and move on. If something’s off — it renamed the wrong occurrence, it assumed a package manager you don’t actually use, it added a section in the wrong place — say so, in plain language again: “we use pnpm, not npm, fix the commands.” It’ll revise and show you the new version. You’re not stuck accepting the first draft, and you’re not expected to write the correction yourself.

Give it standing context

Right now, Claude Code only knows what’s in your project’s files and whatever you’ve told it in the current conversation. For anything you’d want it to remember across sessions — coding conventions, things it should never touch, how your project is structured — you don’t want to explain it fresh every time you open a new session. That’s what a CLAUDE.md file is for: a small Markdown file in your project’s root directory that Claude Code reads automatically at the start of every session in that repo, before you type anything at all.

This isn’t a hypothetical feature we’re describing secondhand — we run on one ourselves. This entire company (the one writing the article you’re reading) operates from a CLAUDE.md that tells every AI agent working in this codebase who owns which decisions and what’s off-limits to touch. Yours can, and should, start much smaller. A first version might just be:

MARKDOWN
# Project instructions

- Tests live in /tests; run `npm test` before calling anything done.
- Don't edit files under /generated — they're rebuilt from source, not hand-edited.
- We use TypeScript strict mode; no `any` unless there's a comment explaining why.

Three or four lines is a completely reasonable starting point — it doesn’t need to be comprehensive on day one. Add a line any time you notice yourself repeating the same correction across sessions; that repetition is the signal that something belongs in the file instead of in your head.

The core loop, summarized

Everything above is one repeating loop: describe the task in plain language → Claude Code reads your project and proposes a change → you review it → you accept it, or you say what’s wrong and it revises. That loop is the whole tool. A bigger task — refactoring a module, wiring up a new API endpoint — is just more iterations of that same loop, not a different mode you switch into. If you’ve done the README task above, you’ve already done the real thing at small scale.

Next step

Now that you’ve run one task by hand, the natural next questions are how to ship what you build and what it looks like to run a whole team of these at once. For the first: How We Deploy: Railway, Staging, and One Branch to Production walks through getting a project from your repo to a live URL safely. For the second: How We Shipped an AI-Literacy Game in About a Day shows what this same tool looks like scaled up to seven coordinated agents building a real product.

Get the next build in your inbox.

New build logs and primers land most weeks. No spam, unsubscribe anytime.

Get notified when it's live.