How to use Claude Code: a beginner’s guide

How to use Claude Code step by step: install, log in, run a first task, write a CLAUDE.md, pick permission modes, use slash commands and plan mode, and stay in limits.

Solviera Teknoloji 9 min read

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.

PlatformCommand
macOS, Linux, WSLcurl -fsSL https://claude.ai/install.sh | bash
Windows PowerShellirm 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:

CommandWhat it does
claudeStart 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 -cContinue the most recent conversation in this folder
claude -rPick 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:

FileScope
./CLAUDE.md or ./.claude/CLAUDE.mdThe project, shared with your team via git
~/.claude/CLAUDE.mdYou, in every project
./CLAUDE.local.mdYou, 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.

ModeWhat runs without askingGood for
Manual (default)Reading filesLearning, sensitive code
Accept editsReads, file edits, simple filesystem commandsWork you’ll review in the diff anyway
Plan modeReads only; no edits to your sourceExploring and designing before coding
Auto modeMost actions, checked by a safety classifierLonger 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:

CommandWhat it does
/helpShow help and commands
/initCreate or improve CLAUDE.md
/clearStart a fresh conversation (the old one stays in /resume)
/compactSummarize the conversation so far to free up context
/contextSee what’s filling your context window
/modelSwitch model; arrow keys adjust effort
/planEnter plan mode, optionally with a task
/permissionsManage allow, ask and deny rules
/rewindGo back to an earlier point in the conversation and code
/resumeReopen an earlier conversation
/mcpManage MCP servers (extra tools)
/usageSee your plan’s usage limits
/reviewReview your current changes
/memoryEdit 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 api pass” 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 /clear when 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 /clear between unrelated tasks.
  • Use /compact in long sessions, optionally with what to keep: /compact keep the API decisions.
  • Use /context to 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.

Questions

Do I need a paid plan to use Claude Code?

Yes. Claude Code needs a Claude Pro, Max, Team or Enterprise plan, or a Claude Console account with API credits. It can also run through Amazon Bedrock, Google Cloud or Microsoft Foundry. The free Claude.ai plan does not include it.

Does Claude Code work on Windows?

Yes. Install it from PowerShell with the native installer or with WinGet. It also runs inside WSL. Commands like /init, plan mode and permissions work the same on every platform.

What is CLAUDE.md for?

CLAUDE.md is a Markdown file of project instructions that Claude Code reads at the start of every session: build and test commands, code style, things to avoid. Run /init to generate a first version, then keep it short and edit it as you go.

How do I stop Claude Code from changing files without asking?

Press Shift+Tab until you are in Manual mode (or plan mode, which doesn’t edit at all until you approve a plan). You can also add ask and deny rules with /permissions, for example to always ask before git push.

What should I do when Claude Code hits its usage limit?

Check /usage to see when the window resets. Use /clear between unrelated tasks and /compact in long sessions so each message carries less context. If you have more than one Claude account, you can switch with /login.

Bring your agents to one desk.

Download AgentVera for free; your installed CLIs are ready to go.

More posts