daveshap
← all guides
guide

How to Use Claude Code

A practical walkthrough from someone who uses it every day.

guide · ~14 min read

I have watched a lot of people install Claude Code, run it once, type "build me a website," get something mediocre, and quietly decide the hype was oversold. That is the wrong first move.

Claude Code is not a vending machine you drop a wish into. It is closer to a fast, literal new engineer who has read most of the internet and remembers nothing about your project until you tell it. Once that clicks, the way you work changes. This guide gets you there without the month of fumbling I went through.


What it actually is

Claude Code runs in your terminal. It reads your files, writes new ones, edits the ones you have, runs commands, and watches what happens. That last part is the whole point. Because it can run your tests and read the errors, it can fix its own mistakes in a loop instead of confidently handing you broken code and walking away.

The chat app talks. Claude Code does the work on your machine. Same model underneath, completely different reach.


Step 1: Install it

On Mac, Linux, or WSL, paste this into a terminal:

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

On Windows, use PowerShell:

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

That is the native installer, which is what I would use today. If you live in Node already, npm install -g @anthropic-ai/claude-code still works, and there is a Homebrew cask and a WinGet package too. Any of them is fine. If you hit version or permission errors, the Claude Code setup guide walks through the fixes one by one.

You will also need a Claude plan or API credits, since the actual work runs on Anthropic's models. Most people start on a subscription. The API is easy to rack up a surprising bill on during a long session.


Step 2: Get one real thing done

Skip "build a website." Pick something small and real that you would actually use. Open a terminal inside a project folder and run:

claude

Now talk to it like you would brief a capable colleague who cannot see your screen. Be specific. Instead of "add tests," try "add unit tests for the functions in src/auth.js, using the same Jest setup the other tests use, and run them when you are done."

It will think, propose changes, and ask permission before it edits files or runs commands. Read what it wants to do. Approve it. Watch it work. The first time it writes a change, runs the test, sees a failure, and fixes it without you saying anything, the tool stops feeling like a toy.

A good first task is not glamorous. Write a missing test. Clean up a messy config file. Rename a thing everywhere it appears. Document a function nobody understands anymore. Boring tasks are where it shines and where the trust gets built.


Step 3: The one file that changes everything

Here is the single biggest difference between people who love Claude Code and people who shrug at it: a CLAUDE.md file.

It is a plain text file in your project root, and Claude reads it at the start of every session. Think of it as the briefing you would give a new hire on day one, written down once so you never repeat it. Run this to generate a first draft:

/init

Then trim it down by hand to the stuff that actually matters. Mine usually looks like this:

# Project Name
One line: what this is and who it's for.

## Stack
- Framework, language, database, anything non-obvious

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

## Conventions
- Where things live (e.g. all API routes in src/api/)
- House rules (e.g. no `any` types, prefer composition)

## Don't
- Don't touch the generated/ folder
- Don't add dependencies without asking

Keep it short. A bloated CLAUDE.md is as useless as none. The goal is the handful of things Claude keeps getting wrong because it has no way to know them. Every time you catch yourself correcting the same thing twice, that correction belongs in this file.

If you want the deeper version of why this works, it is the same idea behind context engineering: you get better output by controlling what the model knows, not by wordsmithing the prompt.


Step 4: Stay in control

The fear people have is that an AI tool will run wild and wreck their project. Claude Code is built so that does not happen by accident. It asks before it edits or runs anything, and you decide how much rope to give it.

When you want it to think before it touches anything, use plan mode. It reads the code, lays out what it intends to do, and waits for your sign-off before making a single change. I use this for anything bigger than a one-file edit. You cycle through the permission modes with Shift+Tab, or start a session in read-only planning with:

claude --permission-mode plan

The honest workflow is: plan the risky stuff, approve as you go, and let it run freely only on throwaway branches or boring chores. Treat it like a sharp junior who is fast but occasionally too confident. You would not merge their work unread either.


Commands worth knowing on day one

There are dozens of slash commands. You need about five to start. Type them inside a session:

  • /init generates your first CLAUDE.md from the project.
  • /clear wipes the conversation when you switch tasks, so old context stops leaking into new work. Use it more than you think.
  • /compact squeezes a long session down to a summary when the context gets full, instead of losing the thread.
  • /model switches models when you want more horsepower for a hard problem or more speed for grunt work.
  • /review has it look over recent changes with fresh eyes before you commit.

The rest you can pick up as you need them. Discoverability is good: type / and the list shows up.


Going further: connecting your tools

Once the basics feel natural, the next jump is letting Claude Code reach beyond your files. That is what MCP is for. It is a standard way to plug in outside tools: GitHub, a database, a browser, your issue tracker, design tools, anything with an integration. You add one like this:

claude mcp add <name> <command>

A concrete example: connect a database server and you can ask Claude to inspect your real schema and write a migration against it, instead of guessing at table names. This is the point where it stops being a coding assistant and starts being something that operates inside your actual stack. Add tools one at a time, only when you have a reason. A pile of half-used integrations is just noise. For the commands, scopes, and a security checklist, see the Claude Code MCP guide.


Where people go wrong

The failure patterns are predictable, and all of them are avoidable.

Asking for too much at once. "Rebuild the whole app" gives it nowhere to stand. Break work into steps you can check. It is faster overall, even though it feels slower.

Skipping CLAUDE.md. If you find yourself correcting the same thing every session, you skipped the one step that fixes it.

Approving without reading. The tool is good, not infallible. Read the plan. Skim the diff. The thirty seconds you spend is cheaper than the hour you spend untangling a confident wrong turn.

Never clearing context. Old conversation bleeds into new tasks and the output gets weird. When you change jobs, /clear and move on.


It is not just for code

This is the part most tutorials miss. Claude Code reads and writes files and runs commands, which means it is useful for anything that lives in files. I have used it to clean and reshape messy spreadsheets, batch-rename hundreds of documents, pull a report out of a folder of exports, and draft content from a pile of notes. If your work is files plus repetitive steps, it applies to you even if you have never opened a code editor.

That is also why I teach it to non-technical teams. The mental model, give it context, let it plan, check its work, is the same whether the output is a pull request or a quarterly report.


Where to go next

Install it, do one boring real task, write a short CLAUDE.md, and use plan mode for anything scary. That is the whole on-ramp. Everything else is repetition.

For the install details and troubleshooting, see the Claude Code setup guide. For getting better answers out of any AI tool, the three-prompt pattern and context engineering are the two ideas that carry over everywhere.


Want your team using this, not just one person on it? I run hands-on AI training where teams learn Claude Code and the AI tools they already pay for on their own real work. On-site in San Diego or virtual.