gfroy.com

Getting started with Claude Code

TL;DR

It’s not magic. Claude Code is an LLM. It generates code based on the code that’s already there and on what you tell it. It doesn’t understand the story; you have to. Read the story, understand what you’re building, and judge every line it writes.

Start slow. Ignore the people online who claim to make thousands of commits a month with five agents at once. Work on one story at a time, and keep reviewing your code against the requirements yourself, for now. My main concern at this point is keeping the quality up.

Claude Code generates code, and it can help you think. But you have to understand what you’re building, and you’re responsible for what gets merged. Work in small slices you can demo, review and commit each one yourself, and keep the setup vanilla.

How it works

An agent, not a chat

In the chat on claude.ai, you paste code in, Claude guesses at the rest of your project, and you copy the answer back.

Claude Code is an agent: it runs on your machine, in your repository, and acts as you. It works with whatever it finds on your PC, through a shell (bash), the same way you would in a terminal. It can:

Because it works in your repository, it works from your actual code instead of a guess, so it picks up your conventions, good and bad. And because it can run commands, it can check its own work, as long as you give it something to check with: a build, tests, a linter.

It acts as you

It runs with your permissions and your logins: your git credentials, your SSH keys, your kubectl context. Whatever you can do from a terminal, it can do too. So it can also commit, push, and delete branches. Be careful what you wish for: “clean up the old branches” means exactly that.

Conversations and context

Claude forgets everything by default. You work with it in conversations, and every new conversation starts empty: nothing from the previous one carries over. When you start one, Claude Code loads a few things into it, so Claude knows something about your project before you type anything: its own instructions, your CLAUDE.md, its memory, and the descriptions of your skills. Everything else, it finds itself, by searching and reading your code.

Everything in a conversation (what was loaded at the start, your messages, the files it read, the output of its commands) is its context. It’s measured in tokens, pieces of words. The longer a conversation gets, the worse Claude gets at paying attention to it, and the faster you use up your subscription, which allows only so many tokens every five hours and every week.

My take

Gotchas

Example

A first session on a small task:

  1. Install Claude Code and log in, following the official setup guide.
  2. Run claude in the root of the repository.
  3. “Add X. Work in slices I can demo, and stop after each slice so I can review and commit.”
  4. Read the diff and try it. Commit it, or tell Claude what’s wrong.
  5. Ask for the next slice.

Later

Once that feels normal, in this order: