N claude code in 3 steps: install, prompt, anchor - Netscape _ ×
Back Forward Home Reload Guides Sign
URL: http://www.nicnonac.com/guides/claude-code-setup-guide/
claude code in 3 steps: install, prompt, anchor - nicnonac guides _×

← back to guides

claude code in 3 steps: install, prompt, anchor

Stacks · 5 min read · posted Apr 27, 2026, 9:24 am

If this landed in your DMs, welcome. This is the guide I wish someone had handed me before I spent my first month with Claude Code doing everything the slow way. Three steps: install it, learn the three prompts that do most of the work, and set up the one file that gives it memory. Ten minutes of setup that pays you back every session after.

your ai has amnesia

Every time you open Claude Code, it starts from zero. No memory of your project. No idea which files matter. No clue about the conventions you argued with it about yesterday. So you spend the first five minutes of every session re-explaining who you are and what you're building.

Ten sessions a day, that's fifty minutes of re-onboarding. You are paying an onboarding tax to your own tool, daily, forever. The three steps below cancel it. Set up once, Claude remembers every time.

step 1: install it (2 minutes)

Run this in your terminal:

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

Then type claude to launch. First run asks you to log in to Anthropic. Claude Pro is twenty dollars a month and bundles Claude Code with it. You now have an agent in your terminal that can read your files, run commands, edit code, and commit changes.

The mistake everyone makes in the first hour: treating it like ChatGPT in a terminal. Chat answers questions. An agent does jobs. Don't ask "how would I add auth to this app?" Say "add auth to this app, use the existing session middleware, don't touch the database schema." Same tool, completely different output.

step 2: the three prompts that do most of the work

The recon prompt. "Read the project, summarize what each module does, flag anything that looks broken." First prompt on every repo, yours or someone else's. It shows you what Claude actually understands before you trust it with changes. Bonus: the thing it flags as broken is often the bug you came to fix.

The refactor template. "Refactor X to do Y. Keep the existing tests green. No new dependencies." Most refactors fit this shape. The two constraints at the end kill most of the bad output before it happens.

The debugger. "Debug this stack trace. Walk me through what you check first." Far more accurate than "fix the bug," because it forces stepwise reasoning instead of a confident guess.

Why these work: constraints. Without them, Claude fills every gap in your prompt with assumptions, and some of those assumptions will be wrong. Compare:

Weak: "make the login page better"

Strong: "the login form submits with an empty password. Add client-side validation, match the error style the signup form already uses, no new libraries."

The second one isn't more work. It's the same fifteen seconds of thinking you were going to do anyway, after the first attempt came back wrong.

step 3: CLAUDE.md, the file that gives it memory

Drop a file called CLAUDE.md at the root of every repo. Claude Code reads it automatically at the start of every session, before you type a word. This single file kills most of the "why does it keep doing the wrong thing" problem. What goes in it:

  • What the project is, in three sentences
  • The file map (which folders matter)
  • Conventions you follow
  • Things to never touch (generated files, secret configs, vendored libraries)
  • The test command

Here's a starter template:

# Project Name

One-line description of what this project does.

## Tech Stack
- Framework: Next.js 16 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS v4

## Structure
- `app/`: pages and layouts
- `components/`: shared UI components
- `lib/`: utilities and helpers

## Conventions
- Use server components by default, "use client" only when needed
- Prefer named exports
- No barrel files

## Do Not Touch
- `node_modules/`, `.next/`, `dist/`
- Any `.env` files
- Auto-generated types in `generated/`

## Commands
- `npm run dev`: start dev server
- `npm run build`: production build
- `npm run test`: run tests

What stays out matters as much as what goes in. Don't paste your whole README. Don't write an essay about code quality. Every line in this file competes for the agent's attention, and a bloated CLAUDE.md is how you end up with an agent that ignores all of it.

The acceptance test: open a fresh session and ask "what does this project do, and what should you never touch?" If it answers correctly without spelunking through half the repo first, you're anchored. This file also works in Cursor, Codex, Copilot, and Gemini CLI, so the ten minutes transfers if you ever switch tools.

mistakes i made so you don't have to

  • I accepted a 40-file change without reading the plan. Then spent two hours doing archaeology on my own repo. Now the rule is plan first, approve, then code. Say "show me the plan before writing anything" and mean it.
  • I kept one giant session alive all day and wondered why it got dumber every hour. The context window fills up and quality drops. New task, new session.
  • I wrote a CLAUDE.md, watched it work, and stopped updating it. Three weeks later half of it was stale and Claude was confidently following outdated rules. It's code. Maintain it.

the whole setup, as a checklist

  1. Install: npm install -g @anthropic-ai/claude-code
  2. Run claude inside a real project and log in
  3. Fire the recon prompt and read what comes back
  4. Save the three prompts somewhere you can paste from
  5. Write your CLAUDE.md from the template above
  6. Fresh session, run the acceptance test

That's the whole thing. Ten minutes, and every session after this one starts warm instead of cold.

where to go next

This guide gets you a working setup. These three take it further, in the order I'd read them:

← all 52 guides

Done nicnonac.com 56.6k