To use Claude Code, install it with one command, run claude inside a project folder, log in with your Claude account in the browser, and then describe what you want in plain English. Claude reads the code it needs, proposes edits and commands, and asks before it does anything you haven’t allowed.
That’s the whole loop. The rest of this guide covers the parts that make it work well: a CLAUDE.md file, permission modes, a handful of slash commands, plan mode and a few habits that keep you inside your usage limits.
What Claude Code is
Claude Code is Anthropic’s coding agent. It runs in your terminal (and also in VS Code, JetBrains, a desktop app and the web), works on the files in the folder you start it from, and can run shell commands like your tests, linters and git. Unlike a chat window, it doesn’t need you to paste code in. It goes and reads what it needs.
Step 1: install Claude Code
The native installer is the recommended way. It updates itself in the background.
| Platform | Command |
|---|---|
| macOS, Linux, WSL | curl -fsSL https://claude.ai/install.sh | bash |
| Windows PowerShell | irm https://claude.ai/install.ps1 | iex |
| macOS (Homebrew) | brew install --cask claude-code |
| Windows (WinGet) | winget install Anthropic.ClaudeCode |
Homebrew and WinGet installs don’t update themselves, so upgrade them now and then with your package manager. Check that it worked:
claude --version
Step 2: log in
Go to a project folder and start it:
cd your-project
claude
The first time, Claude Code opens your browser to log in. You can use:
- a Claude Pro, Max, Team or Enterprise subscription, which is the usual choice;
- a Claude Console account, billed per token from prepaid credits;
- a cloud provider: Amazon Bedrock, Google Cloud or Microsoft Foundry.
Your login is saved, so you only do this once. If you have more than one account, /login switches between them.
Step 3: your first task
Start with something small and real, not “build me an app”. Good first tasks:
- “Explain how authentication works in this project.”
- “Run the tests and tell me why the failing one fails.”
- “Add input validation to the signup form, with a test.”
Type it and press Enter. Claude reads files, then proposes changes or commands. Depending on your permission mode it either asks first or goes ahead, and it shows you each edit as a diff. Read them. You’re still the one shipping the code.
You can also start with a task directly:
claude "find where we parse dates and list the formats we accept"
Other useful ways to start:
| Command | What it does |
|---|---|
claude | Start an interactive session |
claude "task" | Start a session with a first message |
claude -p "task" | Run once, print the answer and exit (good for scripts) |
claude -c | Continue the most recent conversation in this folder |
claude -r | Pick an older conversation to resume |
Step 4: write a CLAUDE.md
Every session starts with a fresh context window. CLAUDE.md is how Claude remembers your project: a Markdown file it reads at the start of every session.
Run this in a session:
/init
Claude looks through the codebase and writes a first CLAUDE.md with your build commands, test commands and conventions it found. If a CLAUDE.md already exists, it suggests improvements instead. Then edit it yourself. Good things to put in:
- how to build, run and test (
pnpm test, not “run the tests”) - conventions that aren’t obvious from the code
- things to avoid (“never edit generated files in
src/gen/”) - where the important parts live
Keep it short; Anthropic suggests staying under about 200 lines per file. Long files use up context and get followed less reliably. You can split things up with @path/to/file imports.
There are a few places a CLAUDE.md can live:
| File | Scope |
|---|---|
./CLAUDE.md or ./.claude/CLAUDE.md | The project, shared with your team via git |
~/.claude/CLAUDE.md | You, in every project |
./CLAUDE.local.md | You, in this project only (keep it out of git) |
If your repo already has an AGENTS.md for other agents, recent versions of Claude Code read it when there’s no CLAUDE.md, and you can import it from a CLAUDE.md with @AGENTS.md.
Step 5: understand permissions
Claude Code asks before it does anything risky. How often it asks depends on the permission mode. Press Shift+Tab to cycle through them; the current one shows at the bottom of the screen.
| Mode | What runs without asking | Good for |
|---|---|---|
Manual (default) | Reading files | Learning, sensitive code |
| Accept edits | Reads, file edits, simple filesystem commands | Work you’ll review in the diff anyway |
| Plan mode | Reads only; no edits to your source | Exploring and designing before coding |
| Auto mode | Most actions, checked by a safety classifier | Longer tasks with fewer prompts |
Recent versions start in auto mode by default; older ones start in Manual. In auto mode a second model reviews each action and blocks things that look risky or off-task, but it isn’t a guarantee, so keep an eye on what it does.
For finer control, /permissions lets you add allow, ask and deny rules, such as “always allow npm test” or “always ask before git push”. On macOS, Linux and WSL2, /sandbox runs Bash commands inside a sandbox.
There’s also --dangerously-skip-permissions, which never asks. Anthropic’s own docs say to use it only inside a container or virtual machine. Don’t use it on your main machine while you’re learning.
Step 6: the slash commands worth knowing
Type / in a session to see every command. These are the ones you’ll use most:
| Command | What it does |
|---|---|
/help | Show help and commands |
/init | Create or improve CLAUDE.md |
/clear | Start a fresh conversation (the old one stays in /resume) |
/compact | Summarize the conversation so far to free up context |
/context | See what’s filling your context window |
/model | Switch model; arrow keys adjust effort |
/plan | Enter plan mode, optionally with a task |
/permissions | Manage allow, ask and deny rules |
/rewind | Go back to an earlier point in the conversation and code |
/resume | Reopen an earlier conversation |
/mcp | Manage MCP servers (extra tools) |
/usage | See your plan’s usage limits |
/review | Review your current changes |
/memory | Edit your CLAUDE.md files |
/rewind is the one beginners miss. If Claude goes down the wrong path, rewind to before it started instead of arguing it back.
Step 7: use plan mode for anything bigger
For changes that touch more than a file or two, ask for a plan first. Press Shift+Tab until you see plan mode, or type:
/plan add rate limiting to the public API
In plan mode Claude reads the code, asks clarifying questions and writes a plan, but it doesn’t edit your source. You read the plan, push back on the parts you don’t like, and approve it when it’s right. Then it switches to editing and works through the plan.
This costs a few minutes and saves a lot of undoing. You can also start a session in plan mode with claude --permission-mode plan.
Good prompting habits
Claude Code follows clear instructions well. Most bad results come from vague ones.
- Say how to check the work. “Add the endpoint and make
pnpm test apipass” is better than “add the endpoint”. - Point at files. Mention the file or function by name, or type
@to reference a file. - One task per conversation. Use
/clearwhen you switch to something unrelated. - Give examples. “Follow the pattern in
users.service.ts” beats a paragraph of description. - Ask it to explain first when you don’t know the code: “How does X work? Don’t change anything yet.”
- Interrupt early. Press Esc to stop it if it heads the wrong way, then correct it.
- Put repeated corrections in CLAUDE.md. If you’ve said it twice, write it down.
Limits and how to stay inside them
Subscription plans have usage limits: a rolling 5-hour window and a weekly limit, with higher plans getting more. Long conversations use more, because each message carries the whole context with it.
- Check where you stand with
/usage. - Use
/clearbetween unrelated tasks. - Use
/compactin long sessions, optionally with what to keep:/compact keep the API decisions. - Use
/contextto see what’s taking up space, such as large files or many MCP tools. - Pick a lighter model for simple work with
/model.
More on this in Claude Code usage limits and how to cut Claude Code token usage.
When one terminal isn’t enough
Once you’re comfortable, you’ll want a second Claude working while the first one runs the tests. Two agents in the same folder will step on each other’s files, so each needs its own git worktree. That’s the point where a single terminal gets awkward.
AgentVera is a desktop app for macOS, Windows and Linux that runs Claude Code (and other CLI agents) in real terminals, side by side. It uses the Claude Code login you already have.
- Workspace: a grid of agents per project, from 1×1 to 5×4. Each agent gets its own name, model, effort and Role and instructions, and comes back to its conversation after a relaunch.
- Worktrees: in the Git panel, create a worktree and start an agent in it with one click, so parallel agents never share files.
- Permissions per agent: in the New agent dialog, choose Ask, Auto or Full access. Auto uses Claude Code’s own auto mode.
- Checkpoints and replay: the last 60 turns per agent are kept, and you can replay a session.
- Context at a glance: each pane shows its live context size, and auto-compact kicks in before the window fills.
All of the above is on the free plan. Auto approval, which lets safe reads and tests through while still asking before things like git push or rm, is on Pro and Team.
When you get there, read how to run multiple Claude Code agents and download AgentVera for free.
Keep the Claude Code commands cheat sheet open while you learn, and if you work in VS Code, see the VS Code extension setup.
Wrapping up
Install, run claude, log in, and start with a small real task. Run /init and keep your CLAUDE.md short. Use Shift+Tab to pick how much Claude may do, plan mode for anything bigger, /rewind when it goes wrong, and /clear and /compact to stay inside your limits. That covers most of what you need for the first few weeks.