◂ All guides

Claude Code · by Anthropic · About 90 min

Claude Code, properly understood

Claude Code is Claude with hands: it reads the files in a folder you choose, makes and changes them, and runs small jobs on your computer. This guide gets you started, then explains the ideas behind it, from CLAUDE.md to skills, subagents and the context window, so you know what you are actually doing.

0 of 17 steps

Before you start

You need one of these:

  • a paid Claude plan: Pro, Max, Team or Enterprise
  • an Anthropic Console account with credit

The free Claude plan does not include Claude Code. It runs on a Mac, Windows or Linux computer.

No coding knowledge is needed. Where a step mentions a command, it shows you exactly what to type.

Chapter 1 of 3

Get started

Pick the right Claude for the job, install Claude Code, and watch it make something with your permission.

  1. Step 1 of 17

    Chat, Cowork or Claude Code?

    Anthropic gives you the same Claude in several places, and the difference is what it is allowed to touch:

    • Claude chat (claude.ai and the Claude apps) talks with you. It works with what you paste or upload into the conversation.
    • Claude Cowork, inside the Claude desktop app, uses the same engine as Claude Code but needs no terminal. It is built for everyday work on your documents and research: it can work with local files, your connected apps and your browser.
    • Claude Code is the one built for working inside a folder or project: reading every file, changing them, running commands and checking its own work. It runs in a terminal, in the desktop app's Code tab, in code editors and on the web.

    Rule of thumb:

    • a question or a draft: chat
    • a task across your documents: Cowork
    • building or changing something made of files (a website, a script, a tidy folder): Claude Code

    Think of it like…

    One expert, three rooms. In chat you talk across a desk. In Cowork they sit at your computer and work on your documents. In Claude Code they are in your workshop with the tools.

    You’re done with this step when

    You can say which of the three you would use to: ask a question, sort a folder of reports, and build a small website.

  2. Step 2 of 17

    Install the Claude desktop app

    The gentlest way into Claude Code is the Claude desktop app. No typing commands.

    1. Download it from claude.com/download and install it like any other app.
    2. Open it and sign in with your Claude account.
    3. Switch to the Code tab.

    You’re done with this step when

    The desktop app is open, you are signed in, and you can see the Code tab.

    For the curious

    Claude Code also runs in a terminal, in VS Code and JetBrains editors, and on the web at claude.ai/code. The web version works on GitHub repositories in the cloud, not on folders on your computer.

    To install the terminal version on a Mac or Linux:

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

    On Windows, in PowerShell:

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

    Then go into a folder and type claude.

  3. Step 3 of 17

    Give it a practice folder

    Claude Code works inside the folder you hand it, so start with one where nothing can go wrong.

    1. Make a new, empty folder on your Desktop called claude-practice.
    2. In the Code tab, choose Local, meaning your own computer.
    3. Click Select folder and pick claude-practice.

    Keep important folders out of it until you have finished this guide.

    You’re done with this step when

    A Code session is open on your empty claude-practice folder.

  4. Step 4 of 17

    Let it make something, and approve it

    Ask for something you can see. Before it writes a file, Claude Code tells you what it wants to do. Read it, then allow it.

    When it finishes, open the folder and double-click the new file. It opens in your web browser.

    Try this

    Make a one-page website called index.html about my favourite hobby: a title, three short paragraphs and a list of tips. Make it look tidy on a phone too.

    You’re done with this step when

    index.html is in the folder and opens in your browser.

  5. Step 5 of 17

    Change your mind

    You can always say no or go back.

    • If it proposes something you do not want, decline it and say what you would rather it did.
    • If it already made a change you dislike, tell it: "Undo that last change."
    • To stop it mid-task, use the stop button, or press Esc in the terminal.

    Try this

    Change the page to a dark background. Actually, I preferred it before. Undo that last change.

    You’re done with this step when

    You saw a change happen and then get undone.

Questions people ask

Is Claude Code only for programmers?

No. It is built for working with files, and plenty of useful jobs are not programming: tidying a folder, turning notes into a document, making a simple web page. You describe what you want in plain English, and it asks before it acts.

What's the difference between Claude Code and Cowork?

They run on the same engine. Cowork lives in the Claude desktop app and is aimed at everyday work on your documents and research, with no terminal anywhere. Claude Code is built for working inside a project folder: reading every file, running commands and checking its own work.

If you are making or changing something made of files, use Claude Code. If you want help with documents and research, Cowork is the gentler fit.

Do I need to use the terminal?

No. The Code tab in the Claude desktop app gives you Claude Code without typing commands. The terminal version has extra power-user features, but you can learn everything in this guide without it.

Does it send my files anywhere?

Your files stay on your computer, but whatever Claude reads or writes during a session is sent to Anthropic so the model can work on it. Keep anything you would not share out of the folder you give it.

Can it break my computer?

It works only in the folder you choose, and in the default mode it asks before changing files or running commands. That is why this guide starts with an empty practice folder. Keep copies of anything important, and read each request before allowing it.

Chapter 2 of 3

How it actually works

The ideas people use every day without knowing their names. Once these click, Claude Code stops feeling unpredictable.

  1. Step 6 of 17

    The context window: what Claude can see right now

    Claude has no memory of its own between moments. Everything it is working with right now sits in its context window. That means:

    • your conversation
    • every file it has opened
    • the output of every command it ran
    • your standing instructions

    Context is measured in tokens, chunks of text of roughly three-quarters of a word. Current Claude models hold about 1 million tokens, around 750,000 words. That is a lot, but a long session that reads many big files does fill it.

    This is the single most useful idea in this guide. When Claude "forgets" something you said an hour ago, or gets vaguer in a very long session, the context window is why.

    Think of it like…

    A whiteboard. Everything Claude is thinking about must be written on it. When it fills up, something has to be wiped or squeezed down to make room.

    Try this

    /context

    You’re done with this step when

    You ran /context and saw what is taking up space in your session.

    For the curious

    What loads automatically at the start of a session:

    • the built-in instructions
    • your CLAUDE.md files
    • a short slice of auto memory
    • the names of connected tools

    Everything else arrives as you work.

    Skills and subagents (chapter 3) exist partly to keep this whiteboard clean.

  2. Step 7 of 17

    When the whiteboard fills: compact, clear, start fresh

    As the context window nears its limit, Claude Code compacts on its own:

    1. It first clears out old command output.
    2. Then it summarises the earlier conversation.
    3. Your requests and key details are kept.

    Summaries lose detail, though, which is why very long sessions slowly drift. You have two controls:

    • /compact squeezes the history now. You can say what to keep, like /compact keep the colour decisions.
    • /clear wipes the whiteboard and starts a clean conversation in the same folder.

    The habit that saves most frustration: one task per conversation. Finished the website? /clear before starting the spreadsheet.

    Think of it like…

    Tidying a desk. Compacting is filing old papers into a summary folder. Clearing is putting everything away and starting the next job on a clean desk.

    Try this

    /compact keep the decisions about the website design

    You’re done with this step when

    You know when you would use /compact and when /clear.

  3. Step 8 of 17

    Sessions and history: picking up where you left off

    Every conversation is saved as a session, so closing the app does not lose your work.

    • /resume shows your past sessions and lets you jump back into one.
    • /rename gives the current session a name you will recognise later.
    • /rewind (or Esc pressed twice in the terminal) goes back to an earlier point. You can restore the conversation, the files Claude changed, or both.

    Resuming brings back the conversation, so it brings back the full whiteboard too. If an old session got muddled, starting fresh is often better than resuming.

    Think of it like…

    Saved games. You can load an old save, name your saves, and go back to the moment before things went wrong.

    Try this

    /rename hobby-website

    You’re done with this step when

    Your session has a name, and you know how to find it again with /resume.

    For the curious

    From a terminal:

    • claude --continue reopens your most recent session in that folder.
    • claude --resume lets you pick one.
    • /branch copies the conversation so you can try a different approach without losing the original.

    Rewind checkpoints cover Claude's own file edits, not everything a command did. Keep real work in Git as well.

  4. Step 9 of 17

    CLAUDE.md: the house rules it reads every time

    Because each conversation starts with a clean whiteboard, anything you want Claude to always know belongs in a file called CLAUDE.md. It is a plain text note that Claude Code reads at the start of every session in that folder.

    Good things to put in it:

    • what the project is
    • your preferences ("British spelling", "explain like I'm new to this")
    • rules ("never delete files without asking")
    • how to check the work

    Keep it short. Every line takes space on the whiteboard in every session.

    The easiest start is to let Claude write one for you with /init, then edit it.

    Think of it like…

    House rules on the fridge. A house-sitter reads them on arrival, so you do not repeat yourself every visit.

    Try this

    /init

    You’re done with this step when

    Your practice folder has a CLAUDE.md, and you added one rule of your own to it.

    For the curious

    CLAUDE.md can live in several places, and they combine:

    • ~/.claude/CLAUDE.md: your rules for every project
    • CLAUDE.md or .claude/CLAUDE.md in a project: shared rules for that project
    • CLAUDE.local.md: your personal notes for one project

    A CLAUDE.md can pull in another file with @path/to/file.md. /memory lists the files in use.

    If a project has an AGENTS.md (the file Codex and some other tools use) and no CLAUDE.md, Claude Code reads AGENTS.md instead.

  5. Step 10 of 17

    Memory: the notes Claude keeps for itself

    Separately from CLAUDE.md, which you write, Claude Code can keep its own auto memory: short notes about things it learned while working with you, such as how you like things done or a decision you made.

    A small part of those notes is loaded into new sessions, so useful lessons carry over. You can look at and edit them. /memory shows your memory files and opens the auto-memory folder.

    Two rules of thumb:

    • Put rules you insist on in CLAUDE.md.
    • Let auto memory handle preferences it notices.

    Think of it like…

    CLAUDE.md is the rulebook you hand a new colleague. Auto memory is the colleague's own notebook of things they picked up on the job.

    Try this

    /memory

    You’re done with this step when

    You opened /memory and know where both kinds of memory live.

  6. Step 11 of 17

    Permission modes: how much it does without asking

    Claude Code works in one of a few modes:

    • Default asks before each file change or command.
    • Accept edits changes files without asking but still asks about commands.
    • Plan only investigates and proposes a plan, changing nothing. Use it before anything big.
    • Auto lets a built-in safety check approve routine actions and stop risky ones. Recent versions start in this mode in the terminal and in code editors.

    Choose on purpose. While learning, Default or Plan keeps you in the loop.

    Think of it like…

    Trust levels for a new hire: check everything with me, handle routine paperwork yourself, just make a plan, or use your judgement within limits.

    Try this

    Use plan mode: propose how you would add a photo gallery to the page, but do not change anything yet.

    You’re done with this step when

    You know which mode you are in and how to switch.

    For the curious

    In the terminal, Shift+Tab cycles through the modes.

    There is also bypass permissions, which skips every check. Never use it outside a throwaway sandbox.

    Rules that pre-approve specific commands live in .claude/settings.json.

Questions people ask

Is the context window the same as memory?

No. The context window is what Claude can see right now, in this conversation. Memory means notes that carry over into future conversations: CLAUDE.md, which you write, and auto memory, which Claude writes. When a conversation ends or is cleared, the context window empties, but memory stays.

What's the difference between CLAUDE.md and a prompt?

A prompt is what you type now, for this task. CLAUDE.md holds standing instructions that Claude reads at the start of every session in that folder. If you find yourself typing the same request twice, it probably belongs in CLAUDE.md.

What's the difference between CLAUDE.md and auto memory?

You write CLAUDE.md: the rules you insist on. Claude writes auto memory: things it noticed while working with you. Put anything that must always apply in CLAUDE.md, and let auto memory handle preferences.

Why did Claude forget something I said earlier?

Most likely the conversation got long and was compacted, which means summarised to make room, and the detail was lost. Or you started a new session. Put lasting facts in CLAUDE.md, and keep one task per conversation.

What's a token?

The unit AI models count text in: a chunk of roughly three-quarters of a word. Context windows and usage are both measured in tokens.

What's the difference between /clear and /compact?

/compact keeps working in the same conversation but squeezes the history into a summary. /clear starts a clean conversation in the same folder. Use /compact mid-task, and /clear between tasks. Your old conversation is still saved, so you can /resume it.

Chapter 3 of 3

Make it yours

The features that turn Claude Code from a clever helper into your own system: reusable know-how, specialist helpers, connections to your other tools, and automatic routines.

  1. Step 12 of 17

    Skills: teach it a job once

    A skill is a folder with a file called SKILL.md: written instructions for one particular job, such as "how we write release notes" or "how to turn a meeting transcript into minutes".

    The clever part: Claude does not read every skill up front. It sees only each skill's name and one-line description, and opens the full instructions when a task matches. So you can have dozens of skills without filling the whiteboard.

    You can also run one yourself by typing a slash and its name, like /minutes.

    Skills are not only for Claude Code. They work in the Claude apps too on paid plans.

    Think of it like…

    A recipe box. The cook does not memorise every recipe; they see the labels and pull out the right card when someone orders that dish.

    Try this

    Create a skill called minutes that turns any meeting notes I give you into: decisions, action items with owners, and open questions. Save it as a personal skill.

    You’re done with this step when

    You have a skill, and typing /minutes with some notes uses it.

    For the curious

    Personal skills live in ~/.claude/skills/<name>/SKILL.md. Project skills live in .claude/skills/<name>/SKILL.md.

    The file starts with a short header holding the name and description. The description decides when Claude reaches for the skill, so write it as "use this when…".

  2. Step 13 of 17

    Subagents: helpers with their own whiteboard

    A subagent is a separate Claude that your main Claude hands a piece of work to. It works with its own context window and sends back only a short report.

    That is the point: if a task means reading fifty files or digging through a long log, the subagent's whiteboard fills up, not yours, and you get the conclusion without the clutter.

    Claude Code already uses built-in helpers like this for searching. You can also define your own specialist, such as a "proof-reader" or a "researcher", with its own instructions and tools.

    Think of it like…

    Sending an assistant to the archive. They come back with a one-page summary instead of carrying every box onto your desk.

    Try this

    /agents

    You’re done with this step when

    You opened /agents and can explain why a subagent keeps your main conversation clean.

    For the curious

    A custom subagent is a markdown file at .claude/agents/<name>.md (project) or ~/.claude/agents/<name>.md (personal).

    A header gives its name and description, and optionally which tools and model it may use. The body is its instructions.

    Subagents run as separate requests, so they count toward your usage.

  3. Step 14 of 17

    Connectors and MCP: plugging into your other tools

    On its own, Claude only sees your folder. Connectors let it reach your other tools: Google Drive, Slack, Notion, GitHub, your calendar and more.

    They are built on MCP (the Model Context Protocol), an open standard for plugging AI into tools. One standard means one plug fits many sockets.

    • In the Claude apps and Cowork, you add connectors from settings.
    • In Claude Code, you can add MCP servers too.

    A connector acts with your access, so only connect what a task needs. Be wary of servers from sources you do not trust.

    Think of it like…

    A universal adapter. Instead of a different plug for every country, one standard socket that any tool can be wired to.

    You’re done with this step when

    You can explain what a connector does, and you know where to add one.

    For the curious

    In the terminal, claude mcp add adds a server. A project can share its servers in a .mcp.json file. /mcp shows what is connected.

    To keep the whiteboard small, connected tools are described briefly and looked up when needed.

  4. Step 15 of 17

    Hooks: things that happen automatically

    A hook is a rule that runs on its own at a particular moment. Examples:

    • "after every file edit, tidy the formatting"
    • "when Claude finishes, play a sound"
    • "before any command runs, check it against my list"

    Unlike an instruction in CLAUDE.md, which Claude tries to follow, a hook always runs, because it is your computer doing it, not Claude deciding to.

    Think of it like…

    A doorbell wired to the door. Nobody has to remember to ring it; opening the door does it.

    You’re done with this step when

    You can name one thing you would want to happen automatically every time.

    For the curious

    Hooks are set in .claude/settings.json under hooks. They fire on events such as:

    • PreToolUse and PostToolUse: before and after a tool runs
    • UserPromptSubmit: when you send a message
    • Stop: when Claude finishes
    • SessionStart and SessionEnd
    • Notification

    Each runs a command you choose. Because hooks run commands on your machine, only add ones you understand.

  5. Step 16 of 17

    Plugins and models

    Plugins bundle all of the above (skills, subagents, connectors and hooks) into one install. That is how a team shares a whole way of working at once. Type /plugin to browse them.

    Models are the different versions of Claude. /model switches between them:

    • Larger models reason more carefully but use your allowance faster.
    • Smaller ones are quicker and lighter.

    Some models can also think before answering. That is slower, but better on hard problems.

    A good default: a capable mid-size model for everyday work, and the larger one when a task is subtle or keeps going wrong.

    Think of it like…

    Plugins are a full toolkit in one case. Models are colleagues with different strengths: one quick, one meticulous.

    Try this

    /model

    You’re done with this step when

    You know which model you are using and how to change it.

  6. Step 17 of 17

    Put it together on a real job

    Pick one small, real task from your week: tidying a folder of downloads, turning notes into a summary, or making a simple page for a club or a small business.

    Use what you learned:

    1. Start a fresh session in a copy of the folder.
    2. Add a CLAUDE.md with your rules.
    3. Ask for a plan first.
    4. Approve the steps.
    5. /clear when you move on to something else.

    Try this

    Look at the files in this folder and suggest a tidier way to organise them. Show me the plan first and wait for my OK before moving anything.

    You’re done with this step when

    Claude Code finished a small job you actually needed, the way you set it up.

Questions people ask

What's the difference between a skill and a prompt?

A prompt is a one-off message. A skill is a saved, named set of instructions, and it can include example files and scripts. Claude pulls it out whenever a task matches, or when you type its name. Write a skill when you keep explaining the same procedure.

What's the difference between a skill and CLAUDE.md?

CLAUDE.md is read at the start of every session, so it costs space every time. A skill is loaded only when it is relevant: Claude sees just its name and one-line description until then. Keep CLAUDE.md for rules that always apply, and use skills for procedures you need now and then.

What's the difference between a skill and a subagent?

A skill is know-how: instructions Claude follows itself, in your conversation. A subagent is a separate worker with its own context window, which does the job and reports back a summary. Use a skill to teach how; use a subagent to keep a big, messy job out of your main conversation.

What's the difference between MCP and connectors?

MCP (Model Context Protocol) is the open standard: the shape of the plug. An MCP server is the program on the other end that offers a tool, like reading your Google Drive. A connector is a ready-made MCP connection you switch on from the Claude apps' settings, with no setup.

In Claude Code you can also add any MCP server yourself.

What's the difference between a plugin and a skill?

A skill is one piece of know-how. A plugin is a package that can bundle several skills, subagents, hooks and MCP connections, so a whole way of working installs in one go.

What's the difference between a hook and an instruction in CLAUDE.md?

Claude tries to follow an instruction in CLAUDE.md, using its judgement. A hook always runs, because your computer runs it at a set moment rather than Claude deciding to. Use a hook for anything that must happen every single time.

Which model should I use?

Start with the everyday default. Switch to a larger model with /model when a task is subtle or keeps going wrong. Larger models think more carefully but use your allowance faster.

Worth knowing

  • It can be confidently wrong. Read what it proposes before you approve it, especially anything that deletes or sends.
  • Never paste passwords, bank details or API keys into the chat. If it needs one, put it in a file yourself and tell Claude where it is.
  • Everything in a session is sent to Anthropic to be processed, and usage counts toward your plan. Long sessions and subagents use more.

Where this comes from

Checked against the sources on 2026-10-08. These tools change quickly.