Two weeks ago I ran claude for the first time. Since then it has built
this whole site while I mostly watched. This
post is the order I’d set things up in if I started again: basics first,
then letting it run on its own, then the habits that keep it sharp.
My actual files are in the setup post. This one is the walkthrough. Every tip has the exact setting folded underneath.
1. The first ten minutes
This post assumes a Mac and a paid Claude plan (Pro or above; the free plan
doesn’t include Claude Code). Open the TerminalThe text window where you type commands instead of clicking. app
(Cmd+Space, type “Terminal”, press Enter), install it with the line under
“show the install”, go to a project folder with cd (“change directory”)
and type claude. It works in that folder and asks before reaching outside
it.
The biggest change from the chat app is how you talk to it. In the chat you ask for code and paste it somewhere. Here you say what you want to happen, and it reads the files, makes the change and runs the commands itself. So say the goal, not the steps: “the post list should show a reading time”, not “open PostList.astro and add a function”.
Then say how to check it: “run the build and fix anything that fails”, or “take a screenshot and compare it with the old one”. With a check it can run, it finds its own mistakes. Without one, finding them is your job.
Next, type /init into Claude, not the terminal: once claude is running,
everything you type goes to it. Words starting with / are built-in
commands; type / alone to see the list. /init reads the project and
writes a CLAUDE.md file: how to run it and how the code is laid out. That
file is the next section.
2. Standing rules: CLAUDE.md
Every session starts knowing nothing. CLAUDE.md is what it reads first, so
anything it should always know goes there. There are two you’ll use:
~/.claude/CLAUDE.mdapplies to every project. Put how you like to work here: how much to explain, when to ask, what to never do.CLAUDE.mdin the project is about that project: commands, layout, and rules like “ask before adding a dependency”.
/init writes the project one. The global one you write yourself, and it
matters more. Mine says, roughly: do things yourself instead of handing me
steps, keep replies short, and ask before anything destructive, public or
costly. “Write” can mean dictate: tell it “create my global CLAUDE.md with
these rules” and paste the starter below. Keep both files short, under
about 200 lines: all of it is loaded into every session, and a long file
gets followed less closely.
The file is read when a session starts (and again after it compacts, see section 7). Change a rule mid-session and the running session won’t notice unless you tell it.
3. Let it run more on its own
How often it stops to ask you depends on its permission mode. Recent versions start in auto mode. Press Shift+Tab to cycle through the others; the current one shows at the bottom of the screen:
- Auto: a second model reviews each action before it runs and blocks anything risky or beyond what you asked. If it blocks too often, it goes back to asking you. It’s what I use.
- Manual: asks before every edit and command. Slow, but you see everything, which is good while learning.
- Accept edits: edits files freely (and runs simple file commands like
mkdirandmv), still asks before other commands. - Plan: explores and writes a plan, and edits nothing until you approve it. The docs suggest it unless you could describe the change in one sentence: reading a plan takes a minute, undoing a wrong approach takes longer. I haven’t used it much yet; I write the plan in a shared file instead (section 6).
The other half is an allow-list: commands that never need asking, like your
buildA step that runs once, before anyone visits, and turns your files into plain HTML, CSS and JavaScript. or a git commit. (Read-only commands like ls
or git status never ask anyway.) Pick “yes, and don’t ask again” on a
prompt and it adds one for you. /permissions shows and edits the whole
list.
Keep asking for the things you can’t take back: pushing to the live site,
deleting, anything that costs money. Put those in CLAUDE.md as rules even
if the permission allows them. The permission says it can; CLAUDE.md
says when.
Auto mode lowers the risk, but the docs are clear that it isn’t a guarantee. To keep it away from files with passwords and keys, add deny rules: a deny always wins over an allow.
The safety net: rewind and git
Letting it run is safer than it sounds: there’s an undo. I haven’t had to
use it yet, but it’s the first thing I’d reach for. Press Esc twice
with the input box empty (or type /rewind) to go back to an earlier
message and restore the files, the conversation, or both.
Rewind only covers its own file edits, though. Edits by a subagent, a file deleted by a shell command, a push, or anything sent to a website stay done. That’s what git is for. Git saves snapshots of your project (each one is a “commit”), so you can go back to any of them. If your folder isn’t using git yet, ask it to “set up git here”. Then ask it to commit after each working step, and any mistake is one step back.
4. Eyes and hands: browser and Mac
Most of my “can you do X” moments weren’t about code. Change a setting in a web dashboard. Save a key. Install something that needs my password.
- The browser. With the Claude in Chrome extension, it drives my own Chrome in its own tab: clicks through a dashboard, fills a form, reads the browser’s error log (the console) when a page breaks. It uses my existing sign-ins, and it leaves my other tabs alone. Most of this site’s setup went through it: the Google sign-in settings, the database, the email sender, the newsletter. I only pasted the secrets.
- Admin prompts. Instead of telling me to run a
sudocommand (one that needs my Mac password), it runs it throughosascript(a built-in Mac tool that can show system dialogs), and macOS shows its normal password dialog. I type my password there; it never sees it. - Desktop apps. Computer use lets it see the screen and click around
Mac apps. I haven’t tried it yet. It needs a Pro or Max plan and is off
until you turn on
computer-usein/mcp. The docs call it “the broadest and slowest” option: it tries a connector, then the terminal, then the browser, and only then your screen. - What stays mine: passwords, payments, CAPTCHAs, accepting terms. When it hits a login page or a CAPTCHA, it stops and asks. It should set everything up first so my part is one click.
5. A chime when it needs you
Once it runs on its own, you stop watching. Then you miss the moment it finishes or gets stuck on a question.
A hookA command Claude Code runs automatically at a fixed moment, like when it finishes a turn. It always runs, whatever the model decides. fixes that. Hooks are commands Claude Code runs
at fixed moments, every time, whatever the model thinks. Mine plays a soft
chime on two of them: Stop (it finished its turn) and Notification (it
needs me).
You don’t have to write that yourself. Ask “play a sound when you finish or
need me” and it will set up the hook. /hooks lists the ones you have.
The same trick works for rules that must never be skipped. A hook can run
a check that catches certain code mistakes (a type check) after every edit, or refuse a command like
git push --force before it runs. A rule in CLAUDE.md is advice; a hook
always runs.
6. Two Claudes: chat and Code
I talk about design in the claude.ai app, often on my phone. Claude Code builds on my Mac. They can’t see each other’s conversations, so they share a file.
For the site, that’s docs/plan.md in the repo: the roadmap, decisions and
a log of where the build departed from the plan. For this post, it was a
Claude Doc that both sides read and edit. The chat wrote the outline; Claude
Code read it at the start of the session.
The rule that makes it work: whoever changes direction updates the shared file first. The first post has the details.
7. Context: why long sessions get worse
Everything in a session, every message, file it read and command output, sits in its contextEverything the model can see in a session: your messages, its replies, files it read and command output. It is reread on every reply.. Each new reply rereads all of it. So a long session gets slower, costs more, and gets worse at remembering the details from the start.
Four tools keep it small:
/clearempties the context and starts fresh in the same window. Use it between unrelated tasks. It costs nothing, and the old conversation isn’t lost:/resumebrings it back. Text you type after/clearon the same line names the old conversation; it isn’t sent as a request, so send the next request on its own./compactreplaces the conversation so far with a summary. Use it when you’re mid-task and don’t want to lose the thread. It has to read the whole conversation to summarise it, so compacting a huge session is itself a big request./contextshows what’s taking up space, as a coloured grid.- Subagents. Ask it to “send a subagent to look through X”. The subagent reads the files in its own context and reports back a summary, so the main session stays small.
And for a quick side question, /btw answers without adding the question
or the answer to the conversation.
Here’s what that looks like in my own session logs. A fresh session starts
at about 50,000 tokensThe unit AI models read and write in. Roughly ¾ of a word., before I type anything. Less
than a tenth of that is my own CLAUDE.md files and memory; the rest is
Claude Code’s own instructions and the list of tools it can use. Subagents
start smaller, at about 40,000.
Each tool call (a file read, a command) adds about 1,000. One request of mine, a single task with lots of file reads, took a session from 58,000 to 169,000. My longest day went from 55,000 to 715,000 tokens in about four hours. By the end, a one-line question carried 715,000 tokens of history with it.
The habit that matters most: one session per task. Starting fresh with a link to a spec, like this post did, beats dragging a three-hour session into a new job.
/usage shows what you’ve used of your plan’s limits. On a subscription,
its dollar figure is what the session would cost if you paid per token
(API prices), not your bill. The limit bars are the number that matters. What those sessions
would have cost at API prices is in
the building post.
8. Memory
CLAUDE.md is what you write down. Memory is what it notices: when you
correct it, or say “always do X”, it saves a short note in a folder outside
your project and reads the index at every start.
Each note says why, not just the rule, which lets it handle cases the rule doesn’t name. Mine has ten now, from “delete merged branches” to “end turns with buttons so I can tap from my phone”.
/memory opens the notes and has a switch to turn memory off. They’re plain
text files, so if one goes stale, tell it to forget it or edit the file
yourself.
9. Tips that saved me time
- Let it check its own work. Ask for screenshots before you look. It catches broken layouts before you do.
- Turn up the effort for hard problems.
/effort highmakes it think longer on every reply. Writing “think hard” in a prompt no longer does anything special. !runs a command yourself. Type! git statusand the output lands in the conversation, so it sees what you saw.- Ctrl+B sends a slow command to the background so you can keep
talking.
/taskslists what’s running. - Connect your hosting first. ConnectorsModel Context Protocol: a standard way to plug outside tools, like your hosting account, into an AI agent. plug your
accounts in, and
/mcpshows which are connected. The one I use most is Vercel, where this site lives. It watches a previewA private copy of the site, with its own link, built from a branch so you can check it before it goes live. build and opens it when it’s ready, adds DNSThe internet's address book: records that say which servers handle a domain's website and email. records, and reads the server logs. When comments broke with an error, the logs showed a missing key. - Let it buy things only on your yes. It found my domain, showed me the price for the first year and after, and waited until I typed “buy shrey.cloud”. The first payment failed. It knew because the tool said so, not because it guessed. It opened the billing page, I fixed my card, and the second try went through.
- No connector? The browser is the connector. Any dashboard without one it can drive in Chrome (section 4).
- Get a second opinion from a different model. I asked Codex, OpenAI’s coding agent, to review the whole project. It found a hole in the limit on how many comments one reader can post, which Claude had built that same week. The session that wrote the code didn’t see it.
- Give the reviewer the same access, or read its “not verified” lines. That review also flagged that the contact form had no rate limit. A firewall rule in Vercel already limited it, but the reviewer couldn’t see Vercel. A reviewer only knows what you give it.
- Carry on from your phone.
/remote-controlconnects the Claude app on your phone to the session on your Mac.
10. Mistakes to avoid
- Approving without reading. The prompt says exactly what it’s about to run. Read it, especially when it touches anything outside the project.
- One session for everything. It gets slower and forgetful (section 7).
- Pasting long lists of steps. Say the goal, and let it work out the steps. It often finds a better route than the one I’d have written.
- Following old tutorials. Claude Code changes every week, and plenty of advice from 2025 no longer works.
11. A day-one checklist
Each line links back to its section.
- Install,
cdto a project, runclaude. - Run
/init, and tell it how to check its work. - Write
~/.claude/CLAUDE.mdwith how you like to work. - Allow your build and git commits.
- Learn Shift+Tab and Esc Esc (rewind).
- Give it a browser: install Claude in Chrome.
- Add the chime hook.
- Keep a shared plan file if you use the chat app too.
- One task per session;
/clearbetween. - Commit often, so any mistake is one step back.
Get new posts by email
My next AI experiment by email: what I built, what broke, and the honest result.
One email per new post, a few a month at most. No spam, unsubscribe anytime.
You'll get an email to confirm. Or follow along via RSS.

Comments · Sign in to start the discussion
Comments
Sign in to comment