Beginner tutorial · Updated June 2026
Claude Code Tutorial:Your First Session, Step by Step
This Claude Code tutorial walks one beginner through a single first session, in order: install the tool, launch it inside a project, send a safe read-only prompt, complete one small real task, review the change, and make your first commit. It takes about 15 minutes. Every step has a copy-paste prompt you can run as you read.
No theory dump. You will type real commands and finish with a committed change in your own project.
Who this tutorial is for
You have heard about Claude Code, maybe installed it, and then stared at a blinking cursor with no idea what to type. This page fixes that. It is a linear, do-it-with-me walkthrough of one complete first session.
You need three things: a terminal you can open, a code project you do not mind experimenting in, and the willingness to read a change before you approve it. That is the whole prerequisite list.
Tutorial vs reference: this page gets your hands dirty in one sitting. When you want the deep version — every feature, pricing tables, and how it compares to Cursor and GitHub Copilot — read the Claude Code guide. Bookmark both.
Install Claude Code
Claude Code needs Node.js 18 or higher. Check it, then install the tool globally so the claude command works from any folder.
node --version
npm install -g @anthropic-ai/claude-codeThat is all the setup this tutorial covers on purpose. If the install errors out, or you want the full setup options (API key vs subscription, Windows notes, IDE extension), follow the dedicated install guide, then come back here.
Launch your first session
Open your terminal, move into a project you can safely experiment in, and run the command.
cd path/to/your-project
claudeThe first time you run it, Claude Code asks you to sign in. Use your Claude Pro or Max login if you have one, or paste an Anthropic API key. It will then ask permission to read your project files. Say yes.
You now have a prompt waiting for you. Do not rush to ask it to build something. The next step is the most important one for a beginner.
Send your first prompt (make it read-only)
Your first prompt should be impossible to get wrong. Ask Claude Code to explain the project, not change it. Reading cannot break anything, and it teaches you the single most important thing about how the tool works: it reads files before it acts.
Explain what this project does, the main folders, and where the homepage lives.
Watch what happens. Claude Code opens a few files, then writes you a plain-English summary. That read-then-explain loop is the same loop it uses for every task, including ones that change code. Once you have seen it work safely, you will trust it on real edits.
Complete your first real task
Now give it one small job. The rule for a first task: one file, one specific change, easy to reverse. Vague prompts produce messy results, so name the file and the exact outcome.
Weak prompt
"Improve the homepage."
Too open. Claude Code has to guess what "improve" means and may touch files you did not expect.
Strong prompt
"In the homepage file, change the main headline to 'Ship features in minutes' and change nothing else."
Names the file, the exact text, and a hard boundary. The diff will be one line.
For anything bigger than a single file, add three words to your prompt: "plan it first." Claude Code will lay out what it intends to change before touching anything, and you approve the plan. This one habit prevents most beginner accidents.
Known failure mode: a brand-new beginner asks for a huge change ("rebuild the whole nav"), accepts everything without reading, and ends up with a broken project and no idea what changed. Avoid it by keeping task one tiny, and by reading the diff in the next step before you accept.
Review the change before you accept it
When Claude Code proposes an edit, it shows you a diff: the old lines and the new lines side by side. Read it. For your one-line headline change this takes five seconds, which is exactly why a small first task matters.
You are not checking whether the code is perfect. You are checking whether it did what you asked and nothing more. If the diff touches a file you did not expect, stop and ask why before accepting.
This is the same habit you would apply to a fast junior developer: trust the work, but verify it. The review step is not optional, and it is the single thing that separates people who use Claude Code safely from people who break their projects.
Make your first commit
End your first session by saving the change to git. You do not have to remember the commands — just ask.
Commit these changes with a clear message describing what changed and why.
Claude Code writes the commit message, stages the right files, and creates the commit. That is the full loop: prompt, edit, review, commit. You just shipped your first change with an AI pair programmer. Everything else you will ever do with Claude Code is a bigger version of these six steps.
Claude Code examples to run next
Once your first session works, try these in order. The green ones are safe for beginners; the last asks Claude Code to plan before acting.
Explain what this project does, the main folders, and where the homepage lives.
In the homepage file, change the main headline to "Ship features in minutes" and change nothing else.
The contact form submit button does nothing on mobile. Find why and fix only that, then tell me what was wrong.
Add a "back to top" button that appears after the user scrolls 600px down the page. Plan it first, then wait for my go-ahead.
Commit these changes with a clear message describing what changed and why.
The prompt skill carries over: writing clear instructions for Claude Code is the same skill as writing clear prompts for ChatGPT or Claude chat — name the outcome, give context, set boundaries. If you want to get systematically better at that, the free Prompt Grader scores your instructions and rewrites them, so every AI tool, including Claude Code, gets far more reliable.
Where to go after your first session
You have the loop. These are the next things worth learning, in roughly the order most beginners need them.
Full Claude Code Guide
The complete reference: every feature, pricing, and tool comparisons.
CLAUDE.md Playbook
Give Claude Code persistent project context so you stop repeating yourself.
Claude Plan Picker
Find the cheapest plan that covers how much you actually use it.
Minimum Viable MCP Stack
The five MCP servers worth adding once the basics feel easy.
Claude Code vs Cursor
How the terminal workflow compares to a visual AI editor.
Claude Code Review
Our hands-on verdict once you have run it for real work.
Claude Code Pricing
What it costs on each plan, and where the API beats a subscription.
Skills Install Guide
Add slash commands and subagents to automate your repeated workflows.
Claude Code Tutorial FAQ
The questions beginners ask on their first day
What is the fastest way to start a Claude Code tutorial as a beginner?+
Install Claude Code with npm install -g @anthropic-ai/claude-code, open a terminal inside any project folder, and run claude. Your very first prompt should be a read-only request like 'Explain what this project does.' That lets you watch how Claude Code reads files before it acts, with no risk of breaking anything. Once you understand that read-then-act loop, you give it a small real task, review the change, and commit. The whole first session takes about 15 minutes.
Do I need to know how to code to follow a Claude Code tutorial?+
You need to be comfortable opening a terminal, navigating into a folder, and reading a code change before you approve it. You do not need to write code yourself. Claude Code writes it. But you do need enough judgement to tell whether a change looks reasonable, which is why this tutorial has you start with read-only prompts and small, low-risk tasks before anything serious. If you have never used a terminal, spend ten minutes on the cd and ls commands first.
What should my first prompt to Claude Code be?+
Make your first prompt read-only so it cannot change anything. Good examples: 'Explain what this project does and how it is structured,' or 'Walk me through how the login flow works.' Claude Code will read the relevant files and summarise them. This teaches you its core behaviour (it reads before it acts) and builds your confidence before you ask it to edit code. Save editing prompts for your second or third request.
How do I give Claude Code a good first task?+
Pick one small, specific, reversible change. Bad: 'improve the homepage.' Good: 'In components/Hero.js, change the headline text to "Build faster with AI" and nothing else.' Specific instructions with a file path and a clear expected outcome produce clean results. Keep the first task to a single file so the diff is easy to review. You can scale up to multi-file tasks once you trust the workflow.
What does Claude Code cost for a beginner just learning it?+
Claude Code is free to install. The AI behind it costs money. A Claude Pro subscription at $20/month gives predictable flat-rate access and is the simplest option for someone learning. If you prefer pay-as-you-go, an Anthropic API key bills per token, and a light learning session typically costs well under a dollar. For exact plan guidance, use the Claude Plan Picker calculator on this site.
How is this tutorial different from the Claude Code guide?+
This page is a linear first-session walkthrough: it takes one beginner from a fresh terminal to a committed change in roughly fifteen minutes, in order. The Claude Code guide is the reference hub. It covers every feature, the full pricing breakdown, comparison tables against Cursor and Copilot, and advanced workflows. Start here to get your hands dirty, then move to the guide once you want depth.
Get better at the part that actually matters
Claude Code is only as good as the instructions you give it. The prompts in this tutorial are simple on purpose — but real work needs real prompting skill. Paste your own prompt into the free Prompt Grader for a scored critique and a rewrite you can use straight away.
Grade Your Prompt Free