Claude Code Tutorial for Beginners: Your First Real Project
Learn the core features — CLAUDE.md, slash commands, Plan Mode — while building something actually useful. No coding experience required.
To start using Claude Code, open your terminal, navigate to a project folder, type claude, and give it plain-English instructions. Use /init to create a CLAUDE.md memory file, slash commands to control sessions, and Plan Mode (Shift+Tab) to let it research before writing code. No coding experience is required to follow along.
This tutorial teaches you the core system by building something real: a file organizer for your Downloads folder. In about 15 minutes, you'll learn CLAUDE.md, slash commands, Plan Mode, context management, hooks, and verification.
What We're Building
A script that:
- Scans your Downloads folder
- Sorts files into subfolders by type (Images, Documents, Videos, etc.)
- Handles duplicates intelligently
- Runs whenever you want with a single command
This normally takes 30+ minutes to code from scratch. You'll do it in about 15 minutes — and learn the core Claude Code concepts along the way.
New to Claude Code? Get the Free Blueprint first — you'll see me build a website using only plain English, then you can come back and build this.
1 Launch Claude Code
Open your terminal and navigate to where you want to work:
cd ~/Desktop
mkdir file-organizer
cd file-organizer
claude
You're now in an interactive Claude Code session.
2 Set Up Project Memory with /init
Before doing anything else, run:
/init
This creates a CLAUDE.md file — a special file that Claude reads at the start of every session. It's your project's permanent memory.
Claude will analyze your folder and generate a starter file. For our simple project, edit it to something like:
# File Organizer Project
## What this does
A script to organize Downloads folder by file type.
## File categories
- Images: jpg, jpeg, png, gif, webp, svg
- Documents: pdf, doc, docx, txt, md
- Videos: mp4, mov, avi, mkv
- Audio: mp3, wav, m4a, flac
- Archives: zip, rar, 7z, tar, gz
- Other: everything else
## Verification
- Always test on sample files before running on real Downloads
- Count files before and after to verify nothing was lost
3 Enter Plan Mode
Before building anything, let's research. Press Shift + Tab twice to enter Plan Mode.
You'll see the indicator change to: ⏸ plan mode on
In Plan Mode, Claude reads and analyzes but doesn't make changes. This is perfect for:
- Exploring existing files before modifying them
- Creating detailed plans for complex tasks
- Researching approaches before committing
You (in Plan Mode):
I want to build a file organizer for my Downloads folder. Look at what's there and create a detailed plan for how to build this.
Claude:
I'll analyze your Downloads folder and create a plan...
[Claude reads your Downloads folder]
I found 47 files. Here's my plan:
1. Create target folders: Images, Documents, Videos, Audio, Archives, Other
2. Build a Python script that maps extensions to folders
3. Handle duplicates by adding numeric suffixes
4. Create a test mode that shows what would happen without moving files
5. Add a --dry-run flag for safety
Review the plan. If you want changes:
You:
Add a Screenshots subfolder under Images for PNG files that start with "Screenshot"
Keep refining until you're satisfied. Press Ctrl + G to open the plan in your text editor for direct editing.
"A good plan is really important!"
— Boris Cherny, Claude Code creator
4 Exit Plan Mode and Execute
Once the plan is solid, press Shift + Tab to cycle back to Normal Mode.
You:
Now build the file organizer based on your plan. Save it as organize.py
Claude writes the actual code directly to your filesystem. You'll see it create the file in real-time.
5 Verify Before Running on Real Data
Here's where verification matters. Tell Claude to test safely:
You:
Before running on my real Downloads folder:
1. Create a test folder with sample files of different types
2. Run the script on the test folder
3. Show me what happened
4. Count files before and after to verify nothing was lost
Claude creates a test environment, runs the script, and reports results. This is the verification pattern — always give Claude a way to check its own work.
6 Run on Real Data
Once testing passes:
You:
The test worked. Now run it on my actual ~/Downloads folder. First show me what will happen (dry run), then do it for real.
Claude runs the dry run, shows you the planned changes, then executes when you approve.
7 Make It Reusable with Custom Commands
You'll want to run this again. Let's make it a permanent command.
You:
Create a custom Claude Code command so I can run this anytime with /project:organize-downloads
Claude creates .claude/commands/organize-downloads.md:
Run the file organizer script on ~/Downloads.
1. First do a dry run to show what will be moved
2. Ask for confirmation before proceeding
3. Run the actual organization
4. Report: files moved by category, any errors, total time
Now you can run /project:organize-downloads anytime, in any session, and Claude knows exactly what to do.
8 Add Hooks for Automation (Optional)
Hooks are automatic triggers that run at specific points in Claude Code's workflow. They're a powerful way to enforce quality without remembering to do it manually.
There are three types of hooks:
- PreToolUse — Runs before Claude executes a tool. Can block or modify actions.
- PostToolUse — Runs after a tool completes. Great for auto-formatting or linting.
- Notification — Fires when Claude needs your attention. Can send Slack messages, desktop notifications, etc.
For example, you could set up a PostToolUse hook that automatically runs a code formatter every time Claude edits a file, or a Notification hook that pings you on Slack when a long task finishes.
Essential Slash Commands You Just Learned
| Command | What It Does | When to Use |
|---|---|---|
/init | Create CLAUDE.md project memory | First time in any project |
/clear | Reset conversation context | Between unrelated tasks |
/rewind | Undo to a previous checkpoint | When Claude goes wrong direction |
/resume | Return to a previous session | Continue yesterday's work |
/rename | Name your session | Keep sessions organized |
/compact | Compress context to free space | Running low on context |
/model | Switch between Claude models | Use a different model (e.g., Opus 4.6, Sonnet 4.5) |
/cost | Check token usage and spending | Monitor your usage during a session |
Keyboard Shortcuts to Remember
| Shortcut | Action |
|---|---|
| Shift + Tab | Cycle modes: Normal → Auto → Plan |
| Esc | Stop Claude mid-action |
| Esc + Esc | Open rewind menu |
| Ctrl + G | Edit plan in text editor |
| @ | Reference a file: @path/to/file |
The Pattern You Just Learned
This tutorial followed a proven workflow:
- Set up project memory —
/initcreates CLAUDE.md - Plan before executing — Use Plan Mode for complex tasks
- Verify before committing — Test on sample data first
- Make it reusable — Create custom commands for repeat tasks
- Clear context between tasks —
/clearkeeps sessions focused
This pattern works for any project, not just file organization.
IDE Integration: VS Code and JetBrains
While this tutorial uses the terminal, Claude Code also integrates directly into popular editors:
- VS Code: Install the official extension from the VS Code Marketplace. You get a native GUI, inline diff viewers, @-mention files with line ranges, and multiple conversation tabs.
- JetBrains: Install the Claude Code [Beta] plugin from the JetBrains Marketplace. It runs the CLI in your IDE terminal and uses the built-in diff viewer.
Both use the same Claude Code installation underneath. If you're more comfortable in an IDE than a standalone terminal, these integrations lower the barrier to getting started.
Your Next Projects
Now apply the same pattern to these:
- Bulk image resizer — Resize all images in a folder to specific dimensions
- CSV cleaner — Remove duplicates, fix formatting, standardize columns
- Meeting notes formatter — Take raw notes and format with headers, action items
- Backup script — Copy folders to external drive with timestamps
- Content calendar generator — Create a month of social posts from themes
Common Beginner Mistakes
Mistake 1: Skipping Plan Mode. Jumping straight to execution produces worse results. Take 2 minutes to plan; save 20 minutes of debugging.
Mistake 2: Never using /clear. Context pollution is the #1 cause of bad outputs. Clear between unrelated tasks.
Mistake 3: No CLAUDE.md. Without project memory, you re-explain everything each session. Set it up once, benefit forever.
Mistake 4: No verification. Accepting whatever Claude produces without testing. Always include verification criteria in your prompts.
Mistake 5: One session forever. Long sessions fill up context and degrade quality. Use /rename and /resume to manage multiple focused sessions. Note: as of Opus 4.6 (February 2026), Claude Code supports context compaction — automatic summarization of older context — which helps longer sessions stay effective, but using /clear between unrelated tasks is still best practice.
Related Guides
- What Is Claude Code? — understand the fundamentals
- How to Install Claude Code — setup guide
- 25 Claude Code Prompts — copy-paste examples
- Claude Code for Marketers — marketing-specific workflows
- Claude Code for Non-Coders — more non-technical examples
Like Claude Code? Meet Your Chief AI Officer
Watch a 10-minute video where I build a website from scratch using only plain English.
Get the Free Blueprint href="/blueprint">Watch the Free Setup Video →rarr;