
Claude Code Tutorial for Beginners (Updated October 2026)
Install Claude Code in 5 minutes, then build your first project with plan mode, CLAUDE.md and the commands that matter. Checked against October 2026 docs.
I have been using Claude Code daily for the past year, and it has fundamentally changed how I build software. As an Engineering Manager, I spend my time split between writing code, reviewing PRs, and coordinating across teams. Claude Code handles the tedious parts so I can focus on the decisions that actually matter.
This guide takes you from zero to productive: a 5-minute install, a first project walked through step by step, the mistakes beginners make most, and a cheat sheet you can keep open. Every product detail was checked against Anthropic's official docs in October 2026.
Quick Start in 5 Minutes
- Check your plan. Claude Code needs a Pro, Max, Team or Enterprise subscription, or a Claude Console (API) account. The free Claude plan does not include it.
- Install it. Open a terminal and run the line for your system:
# macOS, Linux, WSL
curl -fsSL https:#8b949e">//claude.ai/install.sh | bash# Windows PowerShell
irm https://claude.ai/install.ps1 | iexREM Windows CMD
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd- Verify. Open a new terminal window and run
claude --version. You should see something like2.1.288 (Claude Code). If you get "command not found", runclaude doctoror see Anthropic's install troubleshooting page. - Start a session in your project. Run
cd your-project, thenclaude. The first time, a browser window opens so you can log in. - Ask your first question. Type
what does this project do?and then run/initto generate a starterCLAUDE.md.
That is the whole setup. The rest of this guide explains what you just did and how to work well with it.
What Is Claude Code?
Claude Code is Anthropic's agentic coding tool. It reads your codebase, edits files, runs commands and works with tools like git, rather than just suggesting the next line.
It runs on Claude's current models. As of October 2026, the default on Pro, Max, Team, Enterprise and API accounts is Opus 5.5. You can switch to Sonnet 5.5 for everyday coding, Haiku 4.5 for quick, simple tasks, or Fable 5.1 for the hardest long-running work (Fable is never the default and, depending on your plan, can bill to usage credits). Opus 5.5, Sonnet 5.5 and Fable 5.1 all have a 1-million-token context window, enough for large parts of a codebase in one session. Anthropic ships new models often, so run /model to see what your account actually offers rather than relying on names printed here.
Where it runs: CLI, Desktop, Web, and IDE
Claude Code is the same engine on every surface, and your CLAUDE.md, settings and MCP servers carry across:
- Terminal CLI: the full-featured version. Install once and use it in any project directory.
- Desktop app: for macOS and Windows (x64 and ARM64), with a Linux beta for Ubuntu and Debian. Open the Code tab to get visual diffs, parallel sessions and scheduled tasks. It bundles Claude Code, so you don't need the CLI, and it requires a paid plan.
- Web (claude.ai/code): runs in the cloud with nothing to install, including on the Claude iOS and Android apps. Good for long tasks or repos you don't have locally.
- VS Code (and Cursor) extension: inline diffs, @-mentions and plan review inside your editor.
- JetBrains plugin: for IntelliJ IDEA, PyCharm, WebStorm and others. It needs the CLI installed separately.
For a beginner, my advice is simple: if you're comfortable in a terminal, install the CLI; if you're not, start with the Desktop app. You can move between them later.
Installation and Login in Detail
The native installer (the commands in the Quick Start) is Anthropic's recommended option and updates itself in the background. Other routes:
- Homebrew:
brew install --cask claude-code(stable channel) orclaude-code@latest. Doesn't auto-update; runbrew upgrade claude-code. - WinGet:
winget install Anthropic.ClaudeCode. Doesn't auto-update; runwinget upgrade Anthropic.ClaudeCode. - npm:
npm install -g @anthropic-ai/claude-code(needs Node.js 22+). Never usesudowith it. - Linux packages: signed apt, dnf and apk repositories for Debian, Fedora, RHEL and Alpine.
System requirements: macOS 13+, Windows 10 1809+, Ubuntu 20.04+, Debian 10+ or Alpine 3.19+, with 4 GB of RAM and an internet connection.
Windows notes: you don't need Administrator rights. Git for Windows is optional: with it, Claude Code runs shell commands through Git Bash; without it, through PowerShell. You can also install inside WSL with the Linux command. If the installer complains that && is not valid, you pasted the CMD command into PowerShell (and vice versa for "irm is not recognized").
Logging in: run claude and follow the browser prompt. Pro, Max, Team and Enterprise accounts all work, as does a Claude Console account billed per token. If the ANTHROPIC_API_KEY environment variable is set, Claude Code asks you to approve that key instead of opening the browser. Use /login to switch accounts later.
Your First Project: A Step-by-Step Walkthrough
The same six steps work on any project, new or old.
Step 1: Let Claude explore
Open a terminal in the project folder (not your home directory) and start claude. Then ask:
> Explain the architecture of this projectClaude reads files as it needs them, identifies frameworks and gives you a structured overview. You don't have to paste code in. Type @ followed by a file name if you want to point it at a specific file.
Step 2: Create your CLAUDE.md
This is the single most important thing to set up. Run /init and Claude writes a starter CLAUDE.md from what it found, then refine it by hand:
# CLAUDE.md
Project Overview
E-commerce platform built with Next.js 16 and TypeScript.
Commands
- npm run dev: development server
- npm run build: production build
- npm run test: run test suite
Architecture
- App Router with server components
- Prisma ORM with PostgreSQL
- Stripe for payments
Conventions
- Use server components by default
- All API routes return typed responses
- Tests required for business logic
Claude Code loads this file at the start of every session. Think of it as onboarding documentation for your AI collaborator. Anthropic recommends keeping each CLAUDE.md under about 200 lines; longer files cost context and get followed less reliably. Personal, uncommitted notes can go in CLAUDE.local.md. I wrote about how I use this approach in How I Built TechLife Adventures with AI.
Step 3: Plan before you change anything
For anything beyond a one-line fix, use plan mode. Press Shift+Tab until the status bar shows plan mode on, or prefix a single prompt with /plan:
> /plan The checkout page is throwing a hydration errorIn plan mode Claude reads the relevant code (here, the checkout component, its layout, the data fetching and any shared state) and proposes an approach without editing files:
Claude: I can see the issue. The cart state is being read on the server
during SSR but only populated on the client. I'd suggest:
- Convert the cart display to a client component
- Add a loading skeleton for the SSR pass
- Hydrate with client state on mount
This is where you steer. If the plan is wrong, say "No, keep planning" and tell it what to change. Approving the plan switches Claude into editing.
Step 4: Implement and review the diff
Claude writes the change across files and shows you what it modified. Read the diffs. You can ask for changes, or stop it at any time with Esc.
A note on permissions: since Claude Code v2.1.283, new terminal and VS Code sessions start in auto mode, where a second model (a classifier) reviews actions instead of prompting you for each one. If you'd rather approve every edit and command yourself, press Shift+Tab to switch to manual mode. The cycle runs auto → default (manual) → acceptEdits → plan.
Step 5: Verify
Ask Claude to run your build, linter and tests:
Claude: Changes complete. Running verification:
- npm run lint ✓ (no warnings)
- npm run build ✓ (compiled successfully)
- npm run test ✓ (47 tests passed)
If something breaks, Claude reads the error and fixes it in the same session.
Step 6: Commit, or rewind
Git is conversational: what files have I changed? and then commit my changes with a descriptive message. If a change went sideways instead, press Esc twice on an empty prompt (or run /rewind) to restore code, conversation or both to an earlier checkpoint. Checkpoints only track edits Claude made with its file tools, not files changed by shell commands like rm or mv, so keep using git as your real safety net.
Key Features Worth Learning Next
Model and effort switching: /model picks the model; /effort sets how hard it thinks (Opus 5.5 defaults to medium). /fast turns on fast mode for Opus, up to 2.5x faster at the same quality, but it is billed at a higher per-token rate and, on subscription plans, only through usage credits.
Subagents: delegate a self-contained job ("research how auth flows through this codebase") to a subagent that works in its own context window and returns only a summary. Claude Code ships with built-in Explore, Plan and general-purpose subagents, and you can define your own in .claude/agents/. Press Ctrl+B to send a long-running command or agent to the background.
Hooks: shell commands that fire automatically on lifecycle events such as PreToolUse, PostToolUse, SessionStart and Stop. For example, run your formatter every time Claude edits a file. Configure them in settings.json; view them with /hooks.
MCP integrations: connect Claude to Jira, Slack, Google Drive, GitHub and your own tools, so it can read a ticket and start implementing without you copying context around. Manage servers with /mcp. If you want to build one, see my MCP server tutorial.
Auto memory: on top of your CLAUDE.md, Claude saves its own notes from your corrections and preferences and loads them in later sessions. Edit or toggle it with /memory.
Context controls: /context shows what's filling the context window, /compact summarizes a long session, and /clear starts fresh when you switch to something unrelated.
Worktrees: claude --worktree feature-auth starts a session in an isolated git worktree on its own branch, so a risky refactor never touches your working copy, and you can run several sessions in parallel.
Skills and Plugins
Skills turn Claude Code from a smart assistant into a repeatable workflow engine. A skill is a packaged set of instructions in a SKILL.md file. You invoke one by typing / and picking it, or Claude loads it automatically when your task matches the skill's description. The full instructions only load when needed, so they don't clutter your context.
Some skills ship with Claude Code, including /code-review (finds correctness bugs in your diff; /review is an alias), /simplify (cleans up changed code for reuse and efficiency) and /doctor (diagnoses your setup). Type /skills to see everything available to you.
Here are the skills I use most often. None of these ship with Claude Code itself; they come from plugins:
- Brainstorming: forces structured exploration of requirements, edge cases and alternatives before any code is written. It prevents the most expensive mistake: building the wrong thing.
- Systematic Debugging: gathers evidence, forms hypotheses and tests them, instead of guess-and-check.
- Test-Driven Development: writes failing tests first, then implements until they pass.
- Plan Writing & Execution: produces a structured implementation plan, then works through it with review gates between phases.
- Skill Creator: the meta-skill that helps you build and evaluate your own skills.
These encode best practices so you get consistent quality even when you are tired, rushed, or working on unfamiliar code. I now consider the skills ecosystem as important as the core code generation capability.
Build your own skill
The real payoff is making skills for your recurring work. A skill is a folder with a SKILL.md file:
---
description: Generate a release note from the merged PRs since the last tag
Read the git log since the most recent tag, group changes by type
(feature, fix, chore), and write a concise changelog in CHANGELOG.md.
Save it as .claude/skills/release-notes/SKILL.md (this project, shareable via git) or ~/.claude/skills/release-notes/SKILL.md (all your projects), and it becomes /release-notes. The description is what Claude reads to decide when to load it automatically; add disable-model-invocation: true if it should only run when you ask. Older .claude/commands/ files still work, but skills are the recommended format.
Plugins: skills, bundled and shareable
A plugin bundles skills, subagents, hooks and MCP servers so a whole workflow installs in one step. Plugin skills are namespaced (/plugin-name:skill-name) so nothing collides. Anthropic's official marketplace, claude-plugins-official, is added automatically the first time you start an interactive session:
/plugin # browse and manage plugins
/plugin install commit-commands@claude-plugins-official
/plugin marketplace add anthropics/claude-plugins-communityThe community marketplace holds third-party plugins submitted to Anthropic; install from it with the @claude-community suffix. Anthropic doesn't review other third-party marketplaces, so read a plugin before you trust it. This is how teams standardize: package your review process, deploy checks and house conventions into a plugin, and everyone gets the same setup with one install. For what this looks like at team scale, see my case study on moving an engineering team to agent-driven delivery.
Routines: Scheduled Cloud Agents
A routine is a saved prompt, plus repositories and connectors, that runs as a full Claude Code session in Anthropic's cloud, so it keeps working when your laptop is closed. Routines are in research preview and available on Pro, Max, Team and Enterprise plans.
Create one conversationally with /schedule (e.g. /schedule daily PR review at 9am), at claude.ai/code/routines, or from the Desktop app. Triggers can be:
- Schedule: hourly, daily, weekdays, weekly, or a one-off time (minimum interval one hour).
- GitHub events: pull requests or releases.
- API: an HTTP POST to the routine's own endpoint.
Manage them with /schedule list, /schedule update and /schedule run. Routines run without stopping for permission and count against your plan's usage, so give each one only the repositories and connectors it needs. Good starters: a nightly dependency audit, a morning issue triage, a weekly "what shipped" summary.
How is this different from hooks? Hooks are local and fire on events inside a session. Routines are remote and run whole sessions on their own. Use hooks to shape how Claude works with you; use routines to have it work without you.
Practical Example 1: Fix a Bug
> There's a bug where the newsletter form doesn't show success state
> after submission. Users click subscribe and nothing visible happens.- Explores: reads the newsletter component, form handler, API route and state management.
- Finds the cause:
handleSubmitsetsisSubmitted, but the success message renders onisSuccess, a different state variable that never gets set. - Proposes the fix:
Claude: Found it. In NewsletterForm.tsx, line 34 sets
setIsSubmitted(true) after the API call, but line 52 checks
isSuccess to render the success message. I'll update the success
render to use isSubmitted, and remove the unused isSuccess state.- Implements and verifies: updates the component, removes dead code, runs the build.
Total time: about 90 seconds for a bug that might take 15 minutes to track down manually.
Practical Example 2: Add a Feature
> Add a reading progress bar to blog posts that shows scroll position
> at the top of the pageClaude reads the blog layout and existing components, notes the styling approach (Tailwind here), and plans a ReadingProgress client component: a thin fixed bar that tracks scroll position relative to the article and mounts only on post pages. After you approve, it creates src/components/blog/ReadingProgress.tsx, wires it into the layout, and checks the build. You can see this kind of component-driven approach throughout this site.
Practical Example 3: Refactor at Scale
> Consolidate the 17 blog categories down to 7. Here's the mapping:
> "AI", "Machine Learning", "Deep Learning" → "AI & ML"
> "JavaScript", "TypeScript", "React", "Next.js" → "Web Development"
> ...This is where Claude Code really shines. A refactor like this touches 55 markdown files, the category filter component, the category page route, the sitemap generator, and possibly the SEO config. Claude reads every post's frontmatter, confirms the mapping with you, updates all 55 files and the filter UI, then verifies that the build passes and every category page renders.
Manual work: 2-3 hours of tedious find-and-replace. With Claude Code: about 5 minutes.
Common Beginner Mistakes
Trying to use it on the free plan. Claude Code isn't included in the free Claude plan. You need Pro or above, or a Console account.
Pasting the wrong install command. The PowerShell, CMD and macOS/Linux commands are different. And after installing, open a new terminal before running claude, or your PATH won't have picked it up.
Starting Claude in the wrong folder. Always cd into the project first. Claude reads the directory you launch it from, including its CLAUDE.md.
Skipping /init and CLAUDE.md. Without it, Claude rediscovers your conventions every session. Keep the file short and update it when you change frameworks or conventions; stale instructions lead to stale code.
Giving vague instructions. "Make the page better" gets mediocre results. "Add pagination to the blog listing page with 10 posts per page, infinite scroll on mobile, and numbered pages on desktop" gets exactly what you need.
Not reviewing the diff. Auto mode reduces prompts; it doesn't replace your judgment. Read what changed, and see AI Coding Agent Security for what can go wrong when nobody does.
Using bypass-permissions mode on your own machine. bypassPermissions (--dangerously-skip-permissions) disables safety checks entirely. Anthropic recommends it only for isolated containers and VMs.
Letting one session run forever. Long, mixed sessions drift. Use /clear when you switch tasks and /compact when you want to keep going.
Relying on rewind instead of git. Checkpoints don't capture changes made by shell commands. Commit working states often.
Running everything on the biggest model. Use /model to match the task: Sonnet for routine work, Opus or Fable for hard problems, Haiku for quick lookups. Check spend and plan limits with /usage.
Claude Code Cheat Sheet
| Command / key | What it does |
| :- | :- |
| claude | Start an interactive session in the current folder |
| claude "task" | Start a session with a first prompt |
| claude -p "query" | Run one query and exit (good for scripts and CI) |
| claude -c / claude -r | Continue the last conversation / pick one to resume |
| claude --worktree name | Start in an isolated git worktree |
| claude update / claude doctor | Update now / diagnose your install |
| /init | Generate or improve CLAUDE.md |
| /plan [task] | Enter plan mode (or press Shift+Tab) |
| /model / /effort | Switch model / set reasoning effort |
| /clear / /compact / /context | New conversation / summarize / see context use |
| /rewind or Esc Esc | Restore code or conversation to a checkpoint |
| /permissions | Manage allow, ask and deny rules |
| /mcp / /plugin / /skills | Manage MCP servers / plugins / skills |
| /code-review | Review your current diff for bugs |
| /schedule | Create and manage cloud routines |
| /usage | Session cost and plan usage limits |
| Shift+Tab | Cycle permission modes |
| Esc | Interrupt Claude mid-response |
| !command | Run a shell command directly in the session |
| @file | Mention a file with autocomplete |
| Ctrl+B | Send a running command or agent to the background |
Tips and Tricks
Use CLAUDE.md religiously. The more context you give Claude about your project's conventions, the better the output.
Cut repetitive permission prompts. If you work in manual mode and keep approving the same safe commands (npm test, git status), add allow rules with /permissions or in .claude/settings.json once.
Delegate independent work to subagents. For "go read all of X and tell me how it works," a subagent does the digging in its own context and hands back just the answer.
Run parallel work in worktrees. To fix a bug on one branch while building a feature on another, start each session with claude --worktree so their edits never collide.
Let Claude run your builds. Don't just review the diff: let Claude run npm run build and npm run test so it catches and fixes issues in the same session. For more on getting good results, see the Prompt Engineering Guide.
Hear out a different approach. If Claude suggests something other than what you had in mind, understand why before overriding it. Sometimes it's a pattern you hadn't considered; sometimes it's wrong, and the review step is where you catch that.
Trust but verify. Claude is remarkably good, but it is not infallible. The tool is most powerful when paired with an engaged developer. I have covered how to compare different AI coding approaches in the AI Coding Tools Comparison.
If you are not using an AI coding tool yet, today is a good day to start. Install Claude Code, open your project, run /init, and ask it to explain your codebase back to you.
Related Reading
- How I Built TechLife Adventures with AI: building an entire site with Claude Code, from architecture decisions to deployment.
- Moving an Engineering Team to Agent-Driven Delivery: six months of real numbers at team scale.
- Claude Code Team Plan: Enterprise AI Coding for Everyone
- AI Coding Tools War: Copilot vs Cursor vs Windsurf
- Claude Code and the Programming Revolution
- Prompt Engineering Guide 2026
- OpenClaw: The Open-Source AI Agent to Know
Enjoying this article?
Get posts like this in your inbox. No spam, unsubscribe anytime.



