How to code with Claude Code: a practical getting-started guide
AI changes very quickly. This guide was written to the best of our knowledge as of October 23, 2026; some of it may now be outdated or no longer apply.
Claude Code is Anthropic's AI coding tool. Unlike a chat assistant that answers and waits, it reads your project, edits files, runs commands and checks its own work. This guide shows how to install it, how to use it day to day, and how to stay in control of what it does.
In short
- You need a Claude subscription (Pro, Max, Team or Enterprise), a Claude Console account or access through a cloud provider.
- Install it with one command, then type
claudein your project folder. - A
CLAUDE.mdfile gives it your project's rules;/initwrites a first draft. - The method that works: explore, plan, code, then have tests check the result.
- You remain responsible for the code: review it, test it, and use Git so you can roll back.
What is Claude Code?
Claude Code is a coding agent. You describe what you want in plain language; it explores the code, proposes an approach, edits several files if needed, runs the tests and fixes what fails. It also works with Git: creating a branch, writing a commit message, opening a pull request.
It runs in several places that share the same engine and settings:
- the terminal, the most complete version;
- VS Code (and Cursor) and JetBrains IDEs, with changes shown in the editor;
- the Claude desktop app, Code tab, for macOS and Windows (Linux in beta);
- the web, at claude.ai/code (opens in a new tab), with nothing to install.
What you need
- An account: a Claude Pro, Max, Team or Enterprise subscription (recommended), or a Claude Console account (API access with prepaid credits). Companies can also go through Amazon Bedrock, Google Cloud or Microsoft Foundry, in the terminal and IDEs only.
- A project: a code folder, ideally tracked with Git.
- A terminal: on Windows, Git for Windows is recommended so Claude Code can use Bash; otherwise it uses PowerShell.
Install Claude Code
The native install is the recommended method; it updates itself.
macOS, Linux or WSL
curl -fsSL https://claude.ai/install.sh | bashWindows (PowerShell)
irm https://claude.ai/install.ps1 | iexHomebrew (brew install --cask claude-code) and WinGet (winget install Anthropic.ClaudeCode) also work, but don't update automatically. Then open a new terminal and check the install:
claude --versionYour first session
Go to your project folder and start Claude Code. The first time, it asks you to sign in through your browser.
cd path/to/my-project
claudeStart with questions, without changing anything. Claude Code reads the files it needs on its own:
what does this project do?
what technologies does it use?
explain the folder structureThen ask for a small change. It shows you the change and, depending on the mode, asks for your approval before applying it:
add input validation to the sign-up formCommands worth knowing
| Command | What it does |
|---|---|
claude | Start an interactive session |
claude "task" | Start with a first request |
claude -p "question" | Ask without an interactive session (scripts, CI) |
claude -c | Continue the folder's most recent conversation |
claude -r | Pick a previous conversation to resume |
/help | Show available commands (inside a session) |
/clear | Start over with an empty conversation |
Esc | Stop Claude mid-action to redirect it |
Give it your project's rules: CLAUDE.md
CLAUDE.md is a text file at the root of your project that Claude Code reads at the start of every session. That's where you write what it can't guess from the code: build and test commands, team conventions, architecture decisions, known pitfalls.
The /init command analyzes your project and writes a first draft; refine it from there. Keep it short: a file that's too long dilutes the instructions that matter. For each line, ask whether removing it would cause a mistake. If not, cut it.
# Commands
- Build: npm run build
- Test a single file: npm test -- path/to/test
# Conventions
- ES modules (import/export), no require
- Always run the type check after a series of changesPersonal preferences that apply to all your projects go in ~/.claude/CLAUDE.md. If your repository already has an AGENTS.md file for other tools, Claude Code only reads it when there is no CLAUDE.md; if you have both, add the line @AGENTS.md to your CLAUDE.md.
Stay in control: permission modes
The permission mode decides what Claude Code can do without asking you. Switch between the available modes with Shift+Tab; the active mode is shown under the prompt.
| Mode | What it does without asking | Best for |
|---|---|---|
| Manual | Reads only | Approving every action yourself |
| Accept edits | Reads, file edits and common file commands inside the project | Iterating on code you're reviewing |
| Plan | Reads and explores, without editing code | Understanding and planning before touching anything |
| Auto | Almost everything, with an automatic safety check that blocks risky actions | Long tasks with fewer interruptions |
In recent versions, Claude Code starts in Auto mode in the terminal and in VS Code. To approve every action yourself, switch to Manual mode with Shift+Tab.
Other modes exist for scripts and isolated environments. Only bypass permissions inside a throwaway container or virtual machine with no internet access, never on your own machine or a production server.
The method that gets good results
- Explore. In Plan mode, ask it to read the relevant part of the code and explain it to you.
- Plan. Ask for a detailed plan: files touched, steps, risks. Fix the plan before moving on.
- Code. Approve the plan and let it work, asking it to check itself along the way.
- Validate and ship. Review the result, then ask it to commit with a clear message and, if needed, open a pull request.
For a small, obvious fix, skip the plan: if you can describe the change in one sentence, just ask for it.
Give it a way to check its work
This is the single most useful tip. Without a check, Claude Code stops when the work "looks done". With tests, a build or a screenshot to compare, it works, checks, fixes and repeats until it passes.
write a validateEmail function. Test cases: name@example.com is valid,
name@.com is not. Run the tests after writing it and fix any failures.Be specific
Name the files, the scenario and what "fixed" means. "Fix the login bug" does worse than "login fails after the session expires; look at token refresh in src/auth, write a test that reproduces the issue, then fix it". You can point to a file with @, or paste a screenshot or an error message.
Manage the context
Everything in a session, messages, files read, command output, takes up the AI's "context window". As it fills, quality drops. A few habits:
/clearbetween unrelated tasks;- after two failed corrections on the same issue, start over with
/clearand a more precise request; /compactto summarize a long session while keeping what matters;Esctwice (with an empty prompt), or/rewind, to go back to an earlier point in the conversation, the code, or both.
These rollbacks don't replace Git: commit often.
Going further
- MCP: an open standard for connecting Claude Code to other tools (task trackers, databases, documents).
- Skills:
SKILL.mdfiles that describe know-how or a reusable procedure, invoked for example with/skill-name. - Hooks: commands that run automatically at specific moments, such as formatting every edited file. Unlike
CLAUDE.md, they always apply. - Subagents: specialized assistants working in their own context, for example for a security review.
- Non-interactive mode:
claude -pin a script or CI pipeline.
How we use it at NRX3
We build with Claude Code every day, but the tool never ships on its own. Every project has written rules, every change goes through automated tests, and a person reviews, understands and approves the code before it reaches the client. AI speeds up the work; responsibility stays human.
Anthropic's official documentation goes much further: it's the reference to follow, and it changes often. The links are below.