Claude Code tutorial for beginners
Table of content
by Ray Svitla
you’ve heard about Claude Code. maybe someone on Twitter called it “the future of coding” or “the end of programming as we know it.” it’s neither. it’s a very good tool that makes certain tasks dramatically faster if you know how to use it.
this guide gets you from zero to productive in about 15 minutes. no fluff, no philosophy, just the commands.
step 1: install it
you need Node.js 18+ installed. if you don’t have it:
# macOS
brew install node
# or use nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
nvm install 22
then install Claude Code:
npm install -g @anthropic-ai/claude-code
step 2: authenticate
you need either a Claude Pro/Max subscription or an API key.
# option A: log in with your Anthropic account
claude login
# option B: use an API key
export ANTHROPIC_API_KEY="sk-ant-your-key-here"
the Pro plan ($20/month) works. the Max plan ($100-200/month) gives you higher rate limits. API keys charge per token — potentially cheaper or more expensive depending on how much you use it.
for the full pricing breakdown, see the setup guide .
step 3: your first conversation
open your terminal. navigate to any project directory. type:
claude
that’s it. you’re in. Claude Code reads the files in your current directory and gives you a prompt. try:
> what does this project do?
it’ll read your code and explain it. not a generic summary — an actual analysis of your files, dependencies, and structure.
try something more useful:
> find any bugs in the authentication code
> add input validation to the signup form
> write tests for the user service
Claude Code doesn’t just suggest code. it reads your existing files, writes changes directly, and can run your tests to verify they pass.
step 4: understand the basics
a few things that aren’t obvious:
Claude Code edits files directly. when you ask it to change something, it modifies the actual files on disk. you’ll see a diff and can approve or reject before it applies.
it can run commands. terminal commands, test suites, build scripts. it asks permission first (unless you’re running with --dangerously-skip-permissions, which — don’t do that yet).
it reads your whole project. files, directory structure, package.json, README — it builds context from everything in your working directory. larger projects need more tokens.
conversations are temporary. when you exit with /quit or ctrl+C, the conversation is gone. your changes stay, but the context doesn’t persist across sessions (unless you set up memory systems
).
step 5: create your CLAUDE.md
this is where Claude Code goes from “pretty good” to “actually useful.” CLAUDE.md is an instruction file that tells Claude how your project works.
create it in your project root:
touch CLAUDE.md
start simple. here’s a minimal template:
# project
this is a Next.js app with TypeScript and Prisma.
## commands
- `npm run dev` — start dev server
- `npm test` — run tests
- `npm run lint` — lint check
## rules
- use TypeScript strict mode
- write tests for all new functions
- use Prisma for all database operations
- error messages should be user-friendly
that’s it. Claude Code reads this file at the start of every session. it’s your way of encoding project knowledge so you don’t have to repeat yourself.
as you use Claude Code more, add to it:
- common gotchas
- architectural decisions
- naming conventions
- things Claude keeps getting wrong
see the CLAUDE.md deep dive for advanced patterns.
step 6: your first real project
let’s build something. navigate to an empty directory:
mkdir my-first-claude-project
cd my-first-claude-project
claude
then:
> create a simple REST API with Express and TypeScript.
> it should have CRUD endpoints for a "notes" resource.
> use SQLite for storage. include tests.
watch what happens. Claude Code will:
- create a project structure
- set up package.json with dependencies
- write the Express server
- create the database schema
- implement CRUD endpoints
- write tests
- run the tests to verify they pass
this is the core loop: describe what you want → review the plan → let it execute → verify the result.
useful commands
while in a Claude Code session:
| command | what it does |
|---|---|
/help | show available commands |
/clear | clear conversation context (saves tokens) |
/compact | compress the conversation to save context |
/quit | exit the session |
shift+tab | toggle plan mode (think before acting) |
common mistakes beginners make
being too vague. “make the code better” gives you random refactoring. “add error handling to the payment processing function, covering card declined, network timeout, and invalid amount cases” gives you exactly what you need.
not reading the diffs. Claude Code shows you what it’s about to change. read it. especially early on. you’ll learn how it thinks and catch mistakes before they land.
ignoring CLAUDE.md. every session without a CLAUDE.md is a session where Claude makes assumptions about your project. some will be wrong. the file takes 5 minutes to create and saves hours.
asking for too much at once. “rewrite the entire application in Rust” will produce mediocre results. “convert the auth module to Rust, keeping the same API interface” is specific enough to get right.
the thing nobody tells beginners
the biggest risk with Claude Code isn’t that you’ll make mistakes. it’s that you’ll get good at using it without getting good at the underlying work.
if Claude Code writes all your tests, you’ll never learn what makes a good test. if it writes all your error handling, you’ll never develop intuition for what can go wrong. the tool becomes a crutch instead of a lever.
the fix is simple but requires discipline: for every task you delegate, understand the output well enough to have written it yourself (slower, worse, but yourself). read the code Claude generates. ask it to explain decisions you don’t understand. use it to learn faster, not to avoid learning.
this applies to any AI coding tool, not just Claude Code. the developers who come out of the AI transition with real skills are the ones who used AI to accelerate their learning, not replace it. the ones who just pressed Tab for two years will be in trouble when the tools change — and the tools always change.
next steps
you’ve got the basics. here’s where to go from here:
→ Claude Code setup guide — MCP servers, shell aliases, advanced config → CLAUDE.md guide — how to write instructions that actually work → best plugins — extend Claude Code with skill packages → context engineering — the art of giving AI the right information → non-coders guide — using Claude Code without writing code
Ray Svitla stay evolving