Learn Claude Code: Free 24-Lesson Course for Beginners
Claude Code, from first install to your own agent
24 sessions of 15 minutes each. Read for 3 minutes, practise for 10, then prove it to yourself with a 2-minute checkpoint. At one session a weekday, you finish in about five weeks.
Before you start
Open one session at a time. Each one has the same three parts: Learn (3 minutes), Do (10 minutes) and a checkpoint (2 minutes). Tick the checkpoint when you can do it without looking. Your progress is saved in this browser.
If a session runs long, stop at 15 minutes and finish it next time. Short, regular sessions stick better than long ones.
You need:
- A paid Claude plan (Pro, Max, Team or Enterprise) or an Anthropic Console account. The free Claude.ai plan does not include Claude Code.
- A computer running macOS, Linux or Windows, with a terminal you can open.
- A small practice project. If you have none, Session 3 shows you how to have Claude create one.
- Git installed (needed from Session 6 onward).
Claude Code changes often. If a command here doesn't match what you see, check the official docs or type /help inside Claude Code.
Phase 1: Foundations
Sessions 1–6. Install Claude Code, ask it about a project, let it edit files safely, and commit your work.
1Install and sign in15 min
Claude Code is an agentic coding tool. It reads your project, edits files and runs commands for you, always inside the folder you start it in. It runs in the terminal, in VS Code and JetBrains, in the Claude desktop app and in the browser. This course uses the terminal because every other surface builds on it.
Do- Install it. On macOS or Linux run
curl -fsSL https://claude.ai/install.sh | bash. On Windows PowerShell runirm https://claude.ai/install.ps1 | iex. Homebrew (brew install --cask claude-code) and WinGet (winget install Anthropic.ClaudeCode) also work. - Confirm it worked:
claude --version. - Open a terminal in your practice project folder and type
claude. Sign in with your Claude account when the browser opens. - Type
/helpand skim the list of commands. - Exit with
exitor Ctrl+D.
2Ask before you build15 min
The best first move in any project is to ask questions. Claude reads files as it needs them, so you never have to paste code in by hand.
Do- Start
claudein your project. - Ask:
what does this project do? - Ask:
explain the folder structure, thenwhere is the main entry point? - Ask one follow-up about something you didn't understand.
- Watch which files Claude opens; this shows you how it explores.
3Your first edit15 min
You describe the change in plain words. Claude finds the code, proposes the edit, and shows you a diff before it writes anything.
Do- No project yet? Ask:
create a small Python to-do list app in this folder with a README. - Otherwise ask for a small change, such as
add a --help message to the CLIorfix the typos in the README. - Read each proposed diff before you accept it.
- Ask Claude to run the program and show you the result.
4Permissions and staying in control15 min
Permission modes decide how much Claude may do without asking. Press Shift+Tab to cycle through them; the current mode shows near the prompt. Newer versions default to auto mode, where a safety check approves routine actions and stops risky ones. Plan mode lets Claude read and plan but not change anything.
Do- Press Shift+Tab a few times and note each mode name.
- Give Claude a task, then press Esc part-way through to interrupt it. Redirect it with a new instruction.
- Press Esc twice to open rewind, and roll back the last change.
- Type
/permissionsto see what is allowed and denied.
5Prompt shortcuts15 min
A few shortcuts make you much faster. @ followed by a file name points Claude at that exact file. ! at the start of a line runs a shell command directly. You can paste a screenshot or drag in an image. Shift+Enter adds a new line without sending (if it doesn't, run /terminal-setup).
Use each shortcut once in your project. Paste a screenshot of an error or a web page and ask Claude what it shows.
6Git through conversation15 min
Claude handles Git in plain language: branches, commits with good messages, and resolving merge conflicts.
Do- Ask:
create a new branch called feature/practice. - Ask for a small change, then:
commit this with a descriptive message. - Ask:
show me what changed in the last 3 commits. - If you use GitHub with the
ghCLI installed, ask:open a pull request for this branch.
Phase 2: Everyday workflows
Sessions 7–12. Work the way experienced users do: plan first, give Claude a way to check its own work, and keep each session clean.
7Prompts that get good results15 min
Claude does its best work when you say what done looks like. Compare fix the login bug with users get logged out after 5 minutes; find the cause, fix it, and add a test that proves it. The second names the symptom, the goal and how to check it.
- Write a vague prompt for a small task and note the result.
- Rewrite it with three parts: context (what is happening), goal (what you want) and check (how Claude proves it worked).
- Run it and compare.
8Plan before code15 min
For anything bigger than a one-file change, use this loop: explore, plan, code, commit. Plan mode (press Shift+Tab until it shows) keeps Claude read-only while it investigates and proposes a plan.
Step 2 is where you save the most time: fixing a plan is far cheaper than fixing finished code.
Do- Switch to plan mode.
- Ask for a medium feature, such as
add due dates to tasks, with sorting by due date. - Read the plan. Push back on one step you would change.
- Approve it, let Claude build it, then ask for a commit.
9Manage context15 min
Everything in a session (your messages, files read, command output) fills Claude's context window. A crowded context makes answers slower and less focused. /context shows what's using space. /compact summarises the conversation so far and frees room. /clear starts fresh; use it whenever you switch to an unrelated task.
Run /context after a long task. Then run /compact, run /context again and compare. Finish with /clear.
10Pick up where you left off15 min
Sessions are saved, so you can come back to them. claude --continue (or claude -c) reopens your most recent session in this folder. claude --resume or /resume lets you pick an older one. /rename gives a session a name you'll recognise later.
Name your current session, exit, then reopen it with --continue. Open a different past session with /resume.
11Tests and debugging15 min
Tests give Claude a way to check itself, so it can keep going until the work is right. Two useful patterns: write the tests first and ask Claude to make them pass, or paste an error and ask for the root cause before any fix.
Do- Ask:
write tests for the add-task function; don't change the function yet. - Review the tests, then:
now make all tests pass. - Break something on purpose, run it, and paste the error with:
find the root cause first, then fix it.
12Your editor, models and effort15 min
Claude Code also runs inside VS Code and JetBrains, where you see diffs inline. /model switches models: lighter ones are faster and use less of your plan, stronger ones are better at hard problems. The same menu sets the effort level, which trades speed for deeper thinking.
- If you use VS Code, install the Claude Code extension from the Marketplace and repeat Session 3 there.
- In the terminal, run
/modeland look at the options. - Ask one quick question on a fast model and one design question on a stronger model; compare.
- Run
/usageto see what is drawing on your plan limits.
Phase 3: Customization
Sessions 13–18. Teach Claude Code your project's rules, give it reusable workflows, and connect it to outside tools.
Rule of thumb: advice goes in CLAUDE.md, repeatable tasks become skills, outside data comes through MCP, and anything that must happen every time is a hook.
13CLAUDE.md, the project memory15 min
CLAUDE.md is a file of standing instructions that Claude reads at the start of every session: build commands, code style, things to avoid. A project one lives in the repo root and is shared with your team; a personal one lives at ~/.claude/CLAUDE.md and applies everywhere.
- Run
/initto have Claude draft aCLAUDE.mdfrom your project. - Cut it down to the rules that matter. Short beats long: every line uses context in every session.
- Add one rule, such as
always run the tests before committing, then start a new session and check that Claude follows it.
14Settings and permission rules15 min
settings.json files control how Claude Code behaves. There are three levels: personal, project shared and project local. Allow and deny rules stop Claude from asking about safe commands and block dangerous ones.
- Run
/configand browse the settings. - Use
/permissionsto allow your test command (for examplenpm test) and deny something you never want run. - Open
.claude/settings.jsonand find the rules you just made.
15Skills, your reusable workflows15 min
A skill is a folder with a SKILL.md file of instructions for a task you repeat, such as writing release notes or reviewing a pull request your team's way. Claude loads it when the task matches, or you run it by name as a slash command.
- Ask Claude:
create a skill in .claude/skills that writes a changelog entry from my recent commits. - Read the
SKILL.mdit made and tighten the instructions. - Make a commit, then run your skill by name.
16Connect tools with MCP15 min
MCP (Model Context Protocol) servers connect Claude Code to outside tools such as issue trackers, databases, browsers and design files. Once a tool is connected, Claude can read your tickets or query your data directly.
Do- Pick one tool you use (GitHub, Sentry, a database) and find its MCP server in the MCP docs.
- Add it with
claude mcp addas the docs show. - Run
/mcpto confirm it's connected. - Ask Claude something that needs it, such as
summarise my open issues.
17Hooks, the automatic rules15 min
Hooks are shell commands that run automatically at set moments: before Claude uses a tool, after it edits a file, when it finishes. Unlike instructions in CLAUDE.md, hooks always run. Common uses are auto-formatting, blocking edits to protected files and desktop notifications.
- Run
/hooksto see the events available. - Ask Claude:
add a hook that runs the formatter after every file edit. - Make an edit and confirm the formatter ran.
18Plugins, bundles you can share15 min
A plugin packages skills, subagents, hooks and MCP servers so you can install them in one step, or share your setup with a team. Plugins come from marketplaces, including Anthropic's official one. Only install plugins you trust: they can run code on your computer.
Do- Run
/pluginand browse the marketplace. - Install one plugin that fits your work, such as a language server plugin for your language.
- Use it in a task, then check
/plugin list.
Phase 4: Advanced
Sessions 19–24. Run several agents at once, automate Claude in scripts and CI, and build your own agent.
19Subagents15 min
A subagent is a specialist Claude that works in its own separate context and reports back a summary. This keeps your main session clean and lets work run side by side. You can define your own, such as a code reviewer or a test writer, each with its own instructions and tool access.
Do- Run
/agentsand create acode-reviewersubagent that only reads files. - Make a change, then ask:
use the code-reviewer agent to review my last commit. - Ask Claude to research two parts of the codebase with subagents at the same time.
20Parallel work with worktrees15 min
Git worktrees give each Claude session its own copy of the repo, so two sessions can change code without colliding. Start one with claude --worktree. Agent view lets you watch and steer many sessions from one screen.
- In one terminal, start a session with
--worktreeand give it feature A. - In a second terminal, do the same with feature B.
- Let both run, then review and merge each branch.
21Headless mode and long-running tasks15 min
claude -p "your prompt" runs Claude once without the interactive screen and prints the result, so you can use it in scripts and pipes. Inside a session, /goal keeps Claude working until a condition you set is met, and /loop repeats a prompt on a schedule.
- Run
claude -p "list the TODO comments in this project". - Pipe data in:
git diff | claude -p "summarise these changes in 3 bullets". - Try
/goal all tests passon a project with a failing test.
22GitHub Actions and code review15 min
Claude Code can run in GitHub Actions, where it answers @claude mentions in issues and pull requests, turns issues into pull requests, and reviews code. /code-review reviews your local changes before you push.
- Run
/code-reviewon your current branch and act on one finding. - In a GitHub repo you own, run
/install-github-appand follow the setup. - Open an issue that says
@claude add input validation to the add-task commandand watch the pull request appear.
23Claude Code in the cloud15 min
Claude Code also runs in Anthropic's cloud at claude.ai/code, from a browser or the Claude mobile app, with no local setup. You can hand off long tasks and review the pull request later. Routines run Claude on a schedule or when a GitHub event happens.
Do- Open claude.ai/code, connect a GitHub repo, and give it a small task.
- Check on it from your phone in the Claude app.
- Set up one routine, such as a weekly dependency check.
24Capstone: build an agent with the Agent SDK15 min
The Claude Agent SDK, for Python or TypeScript, gives you the same engine as Claude Code as a library. You can build your own agents with custom tools, permissions and hooks.
Do- Follow the Agent SDK quickstart in the language you prefer.
- Build a tiny agent that reads a folder of notes and answers questions about them.
- Ask Claude Code to help you write it; you now know how to plan, test and commit the work.
After Session 24, keep going with one 15-minute session a week: read the What's new page and try one new feature.
Cheat sheet
| Command or key | What it does | Session |
|---|---|---|
claude | Start a session in the current folder | 1 |
/help | List commands | 1 |
exit or Ctrl+D | Leave Claude Code | 1 |
| Shift+Tab | Cycle permission modes, including plan mode | 4, 8 |
| Esc | Interrupt Claude | 4 |
| Esc Esc | Rewind to an earlier point | 4 |
@file | Point Claude at a file | 5 |
!command | Run a shell command directly | 5 |
/context | Show what fills the context window | 9 |
/compact | Summarise and free context | 9 |
/clear | Start fresh | 9 |
claude -c, /resume | Continue or pick a past session | 10 |
/model | Switch model and effort | 12 |
/init | Draft a CLAUDE.md | 13 |
/permissions, /config | Allow and deny rules, and settings | 14 |
/mcp | Check MCP connections | 16 |
/hooks | View and manage hooks | 17 |
/plugin | Browse and install plugins | 18 |
/agents | Create and manage subagents | 19 |
claude --worktree | Start an isolated parallel session | 20 |
claude -p "..." | Run once without the interactive screen | 21 |
/code-review | Review local changes | 22 |
/doctor | Diagnose setup problems | any |
Commands checked against the official Claude Code documentation in October 2026; features change often, so see code.claude.com/docs for the latest. A Your Online Business (YOB247) course. Claude and Claude Code are products of Anthropic. This course is independent and is not affiliated with or endorsed by Anthropic.