← Claude Skills Browser | Beginner Guide Beginner
Getting Started

Claude Code for Beginners

Install Claude Code, run your first session, and go from zero to productive in under 15 minutes. Everything you need to know as a first-time user.

⏱ 15 min to first session 📦 5 starter projects 🔑 All essential commands Updated May 2026

Table of Contents

  1. What is Claude Code?
  2. Installation (5 minutes)
  3. Your First Session
  4. Essential Commands
  5. Setting Up CLAUDE.md
  6. 5 Beginner Projects
  7. Common Beginner Mistakes
  8. Next Steps
  9. FAQ

What is Claude Code?

Claude Code is Anthropic's official AI coding assistant that runs in your terminal. Unlike AI tools embedded in an editor (Cursor, GitHub Copilot, Windsurf), Claude Code is an autonomous agent — it can read your files, run commands, write multi-file edits, run tests, and reason about your entire project in one conversation.

The key insight for beginners: you don't paste code into a chat window. Claude Code reads your actual files directly. You just describe what you want, and Claude does the work.

What Claude Code can do out of the box

New to AI coding tools? Think of Claude Code as a junior engineer who lives in your terminal. You describe the task, they read the code, do the work, and show you the result. You review and approve. The more context you give them (via CLAUDE.md), the better the output.

Installation

1

Check prerequisites

You need Node.js 18 or later and an Anthropic account.

# Check your Node version
node --version   # must be v18.0.0 or higher

# If not installed: https://nodejs.org (LTS version)
2

Install Claude Code globally

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

This adds the claude command to your terminal path globally.

3

Log in to your Anthropic account

# Run claude in any directory to trigger login
claude

Claude Code will open a browser window to authenticate. Use your Anthropic Console account. After authenticating, the session is saved and you won't need to log in again.

Alternative: Set ANTHROPIC_API_KEY as an environment variable if you prefer API key auth.

4

Verify the install

claude --version
# claude-code/1.x.x linux-x64 node-v22.x.x
macOS users: If you get a permissions error during npm install, use sudo npm install -g @anthropic-ai/claude-code or configure npm's global prefix to a user-writable path.

Your First Session

Navigate to a real project directory (not an empty folder). Claude Code is most useful when it can read actual code.

1

Open a project and start Claude Code

cd ~/my-project
claude

You'll see an interactive prompt: >. Claude has already indexed your directory and is ready.

2

Ask Claude to describe your project

> What does this project do? Give me a brief summary of the main files.

Claude will read your files and summarize. This is a good "sanity check" to confirm it can access your code.

3

Give Claude a small task — use /plan first

> /plan Add a function to utils.js that formats a phone number as (XXX) XXX-XXXX

The /plan command makes Claude describe its approach before writing any code. Review the plan, then say "go ahead" or refine it. This is the most important habit for beginners — always plan before a big change.

4

Review the result

After Claude writes code, check the diff with:

git diff

Always review before committing. Claude is excellent but occasionally makes logic errors or misunderstands scope — a 30-second diff review prevents most surprises.

5

Commit when happy, exit the session

> Write a conventional commit message for these changes

# Then in your terminal:
git add utils.js
git commit -m "feat(utils): add formatPhoneNumber helper"

# Exit Claude Code
> /exit   (or Ctrl+C)
Golden rule: Commit every time your tests go green — don't let Claude make 10 changes without a commit checkpoint. If something goes wrong, you can always git reset --hard HEAD to the last good state.

Essential Commands for Beginners

Claude Code has slash commands that control its behaviour. These are the ones you'll use every day:

/plan <task>

Ask Claude to describe its approach before writing any code. Use this before every substantial change. The plan is a proposal — you review and approve before execution begins.

/compact

Compress the conversation history when the context gets long. Preserves key decisions and constraints. Use when Claude's responses start getting slow or repetitive.

/clear

Start a fresh conversation without closing the session. Useful when switching to a completely different task mid-session.

/help

List all available slash commands and built-in skills. Run this in any session to see what's available.

/memory

View and edit Claude's persistent memory (CLAUDE.md files). Claude remembers project context, preferences, and constraints across sessions via this system.

Esc key

Interrupt a running action immediately. Use this if Claude is writing code in the wrong direction and you want to stop it mid-stream.

/review

Ask Claude to do a code review of the current diff. It checks for bugs, security issues, and style problems — same as asking a colleague to review your PR.

/pr

Generate a pull request description for the current branch. Creates a formatted markdown summary with what changed, why, and a test plan. Paste directly into GitHub.

/commit

Generate a conventional commit message for staged changes. Claude reads the diff and writes a clear, scoped commit message following the conventional commits spec.

Keyboard shortcuts

Setting Up CLAUDE.md — Your Project Brief

CLAUDE.md is the single most impactful thing you can add to a project. It's a plain markdown file in your project root that Claude reads at the start of every session. It's your persistent "briefing document."

Without CLAUDE.md, you re-explain your project every session. With a good CLAUDE.md, Claude knows your stack, conventions, and constraints from the first message.

Minimal CLAUDE.md template

# My Project

## What this is
A Node.js REST API for managing user accounts. Connects to a PostgreSQL database.

## Tech stack
- Node.js 22, Express 5, PostgreSQL 16
- Tests: Jest + Supertest (run: npm test)
- Linter: ESLint (run: npm run lint)

## Conventions
- Use async/await, never callbacks
- All functions must have JSDoc comments
- API errors return { error: "message", code: "ERROR_CODE" }

## Do not modify
- database/migrations/ — ask me first before changing migrations
- .env file — never read or write secrets

## Common tasks
- "Add a route" → create in routes/, add handler in controllers/, add test in tests/
- "Fix a bug" → write a failing test first, then fix, then verify test passes
Tip: Keep CLAUDE.md under 200 lines. The longer it gets, the more likely Claude is to miss key instructions. Put critical constraints (things Claude must never do) near the top.

For a complete CLAUDE.md reference and advanced memory patterns, see the memory guide.

5 Beginner Projects to Build in Your First Week

Each project is designed to teach a different aspect of Claude Code. Start with #1 and work through them in order.

Day 1 — 30 min

1. README Generator

Pick any of your existing projects that has no README. Ask Claude Code to read the codebase and write a comprehensive README.md with installation, usage, API reference, and contributing guide. You'll learn: file reading, context building, markdown generation.

Day 2 — 1 hour

2. Test Suite for Legacy Code

Take a function or module with no tests. Ask Claude to write a full test suite covering happy path, edge cases, and error cases. You'll learn: /plan for analysis, test generation, running tests from within Claude Code.

Day 3 — 1 hour

3. Refactor a Messy Function

Find a function over 80 lines in any project. Use Claude Code to characterize it, then plan and execute a refactor: better naming, smaller functions, no behavior change. You'll learn: phased planning, diff review, test-driven refactoring.

Day 4 — 2 hours

4. CLI Tool from Scratch

Build a command-line tool that solves a small problem you have (rename files, convert formats, query an API). Ask Claude to scaffold it, add argument parsing, and write tests. You'll learn: multi-file creation, full project scaffolding, CLAUDE.md setup.

Day 5 — 2 hours

5. Bug Hunt in Your Codebase

Give Claude Code a real bug report or error from your project. Walk through the full workflow: reproduce → write failing test → fix root cause → verify → commit. You'll learn: the full Claude Code bug-fix workflow from first error message to merged fix.

Common Beginner Mistakes (and How to Fix Them)

1. Skipping /plan before big changes

Mistake: "Refactor the entire auth module" → Claude rewrites 8 files in a direction you didn't want.
Fix: Always use /plan first. The plan is a proposal you control, not a commitment.

2. Not committing often enough

Mistake: Running a 2-hour session with no commits. Claude makes a mistake at the end, and you lose everything.
Fix: Every time your test suite goes green, commit. Takes 30 seconds and gives you unlimited rollback.

3. Pasting code instead of referencing paths

Mistake: "Here's my 300-line auth.js: [paste]..." → Context bloat, worse responses.
Fix: Say "Read src/auth.js and..." — Claude reads files directly. No pasting needed.

4. Asking for everything in one message

Mistake: "Add user authentication, email verification, password reset, and social login."
Fix: Break it into steps. Start with the smallest complete unit: "Add email/password login only." Build from there.

5. Ignoring failing tests

Mistake: "The tests are failing but let's move on."
Fix: Never move on with a red test suite. Ask Claude to fix the failure before continuing. Every ignored failure compounds.

6. No CLAUDE.md

Mistake: Re-explaining your stack and conventions at the start of every session.
Fix: 20 minutes setting up a CLAUDE.md saves hours across future sessions.

Permissions warning: Avoid --dangerously-skip-permissions in your primary working directories. This flag disables all safety checks. Only use it in fully sandboxed, throwaway environments.

Next Steps After the Basics

Once you're comfortable with the first-session workflow, these guides cover the next level:

FAQ

What is Claude Code and who is it for?

Claude Code is Anthropic's AI coding assistant that runs in your terminal as an autonomous agent. It reads your actual files, runs commands, and makes multi-file edits — not a chat interface. It's for any developer who wants an autonomous pair programmer: beginners learning by doing, experienced engineers handling complex tasks, solo developers who need speed.

How do I install Claude Code?

Run npm install -g @anthropic-ai/claude-code. You need Node.js 18+ and an Anthropic account. Then run claude in any project directory — the first launch will walk you through browser-based login. Total setup time: under 5 minutes.

Is Claude Code free for beginners?

There's no free tier — you pay per token via the Anthropic API. A typical light session (30–60 minutes) costs $0.50–$3. Claude Max subscribers ($100/month) get a usage quota that covers daily heavy use. See the pricing guide for a full cost breakdown by use pattern.

What are the most important Claude Code commands for beginners?

Five essentials: /plan (review intent before any write), /compact (compress long contexts), /clear (fresh conversation, same session), /help (list all commands), and Esc (interrupt a running action). Master these and you control any session.

How is Claude Code different from Cursor or GitHub Copilot?

Cursor and GitHub Copilot embed inline in a GUI editor. Claude Code lives in the terminal and acts autonomously — it reads dozens of files, runs tests, makes multi-file edits, and reasons about the whole codebase. Cursor is easier to start with. Claude Code rewards terminal-comfortable developers who want more autonomous, multi-step task handling. See Claude Code vs Cursor for a full comparison.

How do I give Claude Code context about my project?

Create a CLAUDE.md file in your project root. Include: tech stack, project purpose, naming conventions, directories to avoid, and recurring task patterns. Claude reads this at the start of every session. A 20-minute CLAUDE.md setup saves hours of re-explaining context over time.

What should beginners avoid when using Claude Code?

Five common mistakes: (1) skipping /plan before large changes, (2) not committing often — commit every time tests go green, (3) pasting code instead of referencing file paths, (4) asking for too many things in one message, (5) using --dangerously-skip-permissions in your main directories. Each of these is easy to avoid once you know about it.

Related Guides

More Claude Code Tools

⚡ Using Claude Code? 30 power prompts that 2× your output · £5 £3 first 10Get PDF £3 →