The Beginner's Guide to Claude Code: From First Session to Power User
Everything you need to start coding with AI. The practical workflow, essential commands, and the tips Anthropic's own team uses — distilled from the official guide by Nerdster.ai.
We just published the Nerdster.ai Beginner's Guide to Claude Code — a free, practical walkthrough of Anthropic's AI coding assistant. This post covers the key takeaways. If you want the full guide with diagrams, command references, and step-by-step walkthroughs, grab it at nerdster.ai/claude-code-guide.
What Claude Code actually is
Claude Code is Anthropic's command-line AI coding assistant. It lives in your terminal, understands your entire codebase, and can read files, write code, run commands, and manage git — all through natural language.
Unlike chat-based AI tools that only see what you paste in, Claude Code operates directly inside your project. It explores your file structure, reads any file, runs your tests, and makes changes across multiple files in a single session. It is agentic — it takes actions, not just answers questions.
Installation takes one command:
npm install -g @anthropic-ai/claude-code
cd your-project
claude
It runs in any terminal standalone, as a VS Code extension, as a JetBrains plugin, or in GitHub Actions for CI/CD automation.
The workflow that actually works
The Anthropic team — including Boris Cherny, creator of Claude Code — uses a four-step loop for everything. It is the single most recommended workflow from both the creators and the developer community.
Step 1: Plan first. Press Shift+Tab twice to enter Plan Mode. Claude reads your codebase without making changes. Go back and forth until the plan looks right. Boris says: "Claude usually one-shots execution after a good plan." This single step prevents most mistakes.
Step 2: Execute the plan. Switch out of Plan Mode and let Claude implement. With a solid plan, Claude typically gets it right in one pass. Review each diff as it appears.
Step 3: Let Claude verify its own work. This is the single highest-leverage tip from the Anthropic team. Put your test commands in CLAUDE.md so Claude runs them after every change. Verification loops two to three times the quality of the final result.
Step 4: Review the diff. Always check changes before accepting. Use /diff to see pending changes at any time. Correct drift immediately — tight feedback loops produce the best results.
The one-sentence rule: if you can describe the exact code change in a single sentence, skip the plan and go straight to coding. If you cannot, plan first.
CLAUDE.md — the file that changes everything
CLAUDE.md is a markdown file that Claude reads automatically every session. It acts as persistent memory for your project — a briefing document for your AI coding partner.
Anthropic's internal teams saw a 65% improvement in style consistency after adopting CLAUDE.md files across their projects. Their approach: any time Claude does something incorrectly, they add a rule to CLAUDE.md so it does not happen again. Their team's CLAUDE.md is just 2,500 tokens. They ruthlessly edit it until Claude's mistake rate measurably drops.
A good CLAUDE.md includes your stack, build commands, test commands, naming conventions, and explicit "do not" rules. It does not include personality instructions, file trees, or anything Claude can discover by reading the code itself. Keep it under 80 lines — if it is too long, Claude starts ignoring parts.
The commands you will use every day
Claude Code has a set of slash commands that handle the most common operations:
/plan— Enter Plan Mode before any multi-file change/compact— Compress conversation context (run at ~60% usage)/clear— Reset context completely when switching topics/cost— Show token usage and spend/diff— Show pending file changes before committing/init— Auto-generate a CLAUDE.md for a new project/checkpoint— Save an undo point before risky changes
You can also control how deeply Claude thinks by using specific phrases: "think" gives a light analysis (~4K tokens), "think hard" gives a deeper analysis (~16K tokens), and "ultrathink" gives maximum-depth reasoning (~32K tokens) for architecture decisions.
Context management — the skill that separates beginners from power users
Claude Code has a 200,000-token context window, but quality degrades well before it fills up — around 147K-152K tokens. Managing context is the single most important technical skill for effective Claude Code use.
Five rules from the guide:
- Run
/compactproactively at ~60% — do not wait for auto-compaction at the limit, which produces worse summaries - Run
/clearbetween topics — a clean session with a focused prompt always outperforms a bloated session - Keep sessions under 45 minutes — after 2+ hours and multiple compactions, summary quality degrades
- Keep CLAUDE.md lean — it loads every single turn, so every line costs tokens
- Use subagents for heavy tasks — they get their own context window and do not pollute your main session
The number one productivity tip: git worktrees
This is the Claude Code team's top productivity recommendation: use git worktrees to run 3-5 Claude sessions in parallel.
Git worktrees let you have multiple copies of the same repo checked out simultaneously, each in its own folder, sharing a single git history. You run a separate Claude Code session in each one — each gets its own 200K context window, its own branch, and zero file conflicts.
# Create a worktree for a feature branch
git worktree add ../my-app-auth -b feature-auth
# Open Claude in it
cd ../my-app-auth
claude
Boris Cherny's setup: 5 terminal tabs (each a worktree) plus 5-10 web sessions. He becomes a reviewer cycling through PRs while Claude implements in parallel. The Anthropic team reports a 3-5x increase in throughput using this approach.
Hooks, commands, and subagents
Once you are comfortable with the basics, three features turn Claude Code from a helpful tool into an automated workflow engine.
Custom slash commands: Every repeated workflow should become a command. Save a markdown file in .claude/commands/ and it becomes available as /project:command-name. Boris's most-used command is /commit-push-pr, which he runs dozens of times daily.
Hooks: Unlike CLAUDE.md instructions (which are advisory), hooks are deterministic — guaranteed to run. They fire at specific moments: auto-format on every edit, block changes to protected files, run tests after code changes, or send a Slack notification when Claude finishes a task.
Subagents: Separate Claude instances that handle specific tasks without polluting your main context. Drop .md files in .claude/agents/ to create specialist workers — a "Code Simplifier" agent that cleans architecture, or a "Verify App" agent that runs browser tests. Use them for codebase exploration, security audits, and research that would fill your main context.
The top 10 tips from Anthropic's own team
Compiled from Boris Cherny's viral threads, Anthropic's engineering blog, and the developer community:
- Plan before you code — always start in Plan Mode
- Parallelise with worktrees — run 3-5 sessions simultaneously
- Give Claude verification loops — tests, browser checks, bash commands — this 2-3x's quality
- Invest in CLAUDE.md — treat it as living documentation
- Automate with commands — anything you do twice becomes a slash command
- Use the heaviest model — Boris uses Opus with thinking for everything
- Hooks for guarantees — CLAUDE.md is advisory, hooks are deterministic
- Re-plan, do not brute-force — when things go sideways, re-plan instead of pushing forward
- Keep sessions short — 30-45 minutes, then start fresh
- Check commands into git — skills and settings in git become institutional knowledge
Anthropic reports a 200% increase in code output per engineer in 2026 using these workflows.
Get the full guide
This post covers the highlights. The full Nerdster.ai Beginner's Guide to Claude Code includes detailed command reference tables, visual workflow diagrams, CLAUDE.md templates, and step-by-step setup instructions. It is free, regularly updated, and built for practitioners — no jargon, no fluff.
Download the free guide at nerdster.ai/claude-code-guide
We publish new tips and workflows bi-weekly. If you want to stay current with Claude Code best practices as the tool evolves, the guide is the fastest way to keep up.