Tools · Workflow
Claude Code, from zero to your first shipped change
Try this first
To add a new guide to this very learn repo by hand, how many steps is it? Create a folder, write the HTML, edit index.html, commit, push. With Claude Code, the whole thing collapses into one sentence. The rest of this guide is about how.
Claude Code is an agentic coding tool. You run it inside one of your project folders, and instead of writing every line yourself, you describe what you want in plain language. It reads your actual files, plans the work, proposes edits and terminal commands, and once you approve, it writes the files, runs the commands, and makes the git commits. It is not autocomplete. It is a collaborator that operates your repo.
The one idea
Claude Code turns intent into committed code. You say what you want; it plans, edits your real files, runs the commands, and you approve each step along the way.
How the loop works
Every session is the same short cycle. The part worth internalizing is step three: nothing irreversible happens without your approval, so you stay in control while it does the tedious parts.
Install it (pick one)
You are on a Mac, so the native installer is the easiest path, it needs no other software. The other two options exist if you prefer them.
| Method | Command / how | Notes |
|---|---|---|
| Native installer (recommended) | curl -fsSL https://claude.ai/install.sh | bash | No Node.js needed. Auto-updates. The method Anthropic tests against. |
| npm | npm install -g @anthropic-ai/claude-code | Requires Node.js 18+. Do not use sudo; if you hit permission errors, use nvm. |
| Desktop app | Download for macOS | A graphical interface if you would rather not use the terminal at all. |
First run and sign-in
Open Terminal, move into a project, and start it:
cd ~/Developer/shawon-ch-learn
claude
The first time, it walks you through a one-time sign-in with your Anthropic account, the same Claude subscription you already use. After that, running claude in any project folder drops you into a session scoped to that repo.
The approval gate, and your safety net
When you ask for something, Claude Code shows you the exact file changes and commands before doing them, and waits for your yes. Review the diffs the first few times so you build trust in it. Your real safety net is git: because every change is a commit, anything it does can be reviewed and undone. Work in small steps and commit often, and you can never paint yourself into a corner.
CLAUDE.md is the memory
You already have a CLAUDE.md at the root of each repo. That file is how Claude Code knows your conventions without being re-told every session, your stack, your structure, your rules. It reads it automatically on startup. There is a hierarchy: a personal one at ~/.claude/CLAUDE.md, a project one at ./CLAUDE.md, and even per-folder ones, merged from general to specific. If you start a repo without one, the command /init generates a draft by inspecting your code.
A handful of commands worth knowing
| Command | What it does |
|---|---|
claude | Start a session in the current folder |
/help | List everything available in a session |
/init | Generate a CLAUDE.md for a repo that lacks one |
/clear | Reset the conversation context when you switch tasks |
claude doctor | Health check your install |
/bug | Report a problem to Anthropic from inside the session |
Getting good output fast
Three habits do most of the work. Give it one task at a time rather than a paragraph of mixed requests. Keep changes small and committed, so each step is easy to review and revert. And lean on CLAUDE.md, every rule you put there is a rule you never have to repeat. For anything large, ask it to plan first and show you the plan before it touches files.
Work one, then finish one
Worked example. In your learn repo, you open a session and type:
build and publish a guide on the
derivative as a rate of change
Claude Code reads CLAUDE.md, copies TEMPLATE.html to math-for-ai/derivative/index.html, fills in the hook, figure, worked example, and recall check, adds the card to its subject hub, and commits, pausing for your approval. You push, Cloudflare deploys, and it is live at learn.shawon.ch/math-for-ai/derivative/.
Your turn. What would you type to add a dark-mode toggle to this guide's styling? (Something like: "add a dark-mode toggle to the guide template, respecting the existing teal accent." One sentence of intent, and you review the diff.)
Why this is the engine, not a toy
This loop is the thing that makes everything else you built sustainable. Your site, your learn hub, your future apps, all of them publish by instruction now. The friction that kills most personal projects, the dozen manual steps between an idea and a live change, is exactly what Claude Code removes. Low friction is your consistency mechanism, and this is the tool that delivers it.
Recall check · no peeking
- What happens at step 3 of the loop, and why does it matter?
- What is the job of
CLAUDE.md, and when does Claude Code read it? - You are on a Mac and want the simplest install. Which method, and what does it not require?
Explain it back
In one plain sentence, tell a friend what Claude Code does that makes it different from a chatbot that just writes code for you to copy.
Source: the official Claude Code documentation at docs.claude.com/en/docs/claude-code. Commands and install methods change, so check there if something looks off.