Free guide · March 2026
Everything you need to start coding with AI. Practical workflows, real tips from the creators at Anthropic, and a clear path from first session to power user — without the jargon.
Getting started
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 can explore your file structure, read any file, run your tests, and make changes across multiple files in a single session.
Claude Code doesn’t just answer questions — it takes actions. It edits files, runs shell commands, creates commits, and verifies its own work by running your test suite.
It sees your whole codebase. Ask it to “find where the login bug is” and it will search files, trace logic, and pinpoint the issue — no copy-paste needed.
Works in any terminal. Just type claude to start. The most powerful way to use it.
Opens as a panel inside VS Code. Claude can see your open files, cursor position, and workspace.
Available for IntelliJ, PyCharm, WebStorm, and other JetBrains IDEs via the marketplace.
Runs in CI/CD with claude -p for automated code review, fixes, and PR generation.
The workflow
This four-step loop is the single most recommended workflow from Anthropic’s own team and the developer community. Boris Cherny, creator of Claude Code, says: “Claude usually one-shots execution after a good plan.”
Start in Plan Mode (press Shift+Tab twice). Claude reads your codebase without making any changes. Go back and forth until the plan looks right. This single step prevents most mistakes.
Switch out of Plan Mode and let Claude implement. With a good plan, Claude typically gets it right in one pass. Review each diff as it appears.
This is the single highest-leverage tip. Put your test commands in CLAUDE.md so Claude runs them after every change. Verification loops 2–3x the quality of the final result.
Always check the changes before accepting. Use /diff to see pending changes at any time. Correct drift immediately — tight feedback loops produce the best results.
If Claude starts going off track, don’t keep pushing forward. Switch back to Plan Mode and re-plan. A fresh plan almost always beats accumulated corrections. The Anthropic team calls this the “re-plan, don’t brute-force” rule.
Multi-file changes. Unfamiliar code. Complex or ambiguous tasks. You can’t describe the diff in one sentence.
Clear, small scope. One-sentence diff. Quick fixes: typos, log lines, renames, simple patches.
TDD is one of the highest-leverage patterns. Write a failing test first (“Do NOT write implementation yet”), then ask Claude for minimal code to pass it. Use a separate session to review — fresh context catches what the author misses.
Your most important file
CLAUDE.md is a markdown file that Claude reads automatically every session. It acts as persistent memory for your project — think of it as a briefing document for your AI coding partner.
| Location | Scope | Share with team? |
|---|---|---|
~/.claude/CLAUDE.md | Global — all your projects | No (personal) |
./CLAUDE.md | Project root | Yes (commit to git) |
./.claude/CLAUDE.md | Local overrides | No (gitignored) |
.claude/rules/*.md | Path-specific rules | Yes (commit to git) |
Keep it under 80 lines. If it’s too long, Claude starts ignoring parts.
Build/test commands, naming conventions, architecture rules, pitfalls Claude cannot infer from code.
Personality instructions, file trees, things Claude discovers by reading code, generic advice.
Commands & shortcuts
These are the commands you’ll use every day. Type them directly in your Claude Code session.
| Command | What it does | When to use |
|---|---|---|
/plan | Enter Plan Mode (read-only) | Before any multi-file change |
/compact | Compress conversation context | Every 30 min or at ~60% usage |
/clear | Reset context completely | When switching topics |
/cost | Show token usage and spend | To monitor consumption |
/diff | Show pending file changes | Before committing |
/init | Auto-generate CLAUDE.md | First time in a new project |
/memory | Browse and edit saved memory | To check what Claude remembers |
/checkpoint | Save state (undo point) | Before risky changes |
/permissions | Manage tool permissions | To pre-approve safe commands |
/add-dir | Add another directory | When working across repos |
claude — start interactive
claude -c — continue last session
claude -r — resume by name
claude -p "prompt" — headless mode
claude --model opus — use Opus model
claude --model haiku — use Haiku (fast)
/config — open settings UI
/statusline — customise status bar
You can control how deeply Claude thinks by using specific phrases in your prompt:
| Phrase | Thinking budget | Best for |
|---|---|---|
"think" | ~4,000 tokens | Routine tasks |
"think hard" | ~16,000 tokens | Multi-file changes |
"ultrathink" | ~32,000 tokens | Architecture decisions |
The critical resource
Claude Code has a 200,000-token context window, but quality degrades well before it fills up. Managing this is the single most important technical skill for effective Claude Code use.
At ~60% context usage (check with /cost), manually compact. Claude still has clear recall and produces a better summary than auto-compaction at 95%.
Every time you switch to an unrelated task, clear the context. A clean session with a focused prompt always outperforms a bloated session with accumulated corrections.
After 2+ hours and multiple compactions, summary quality degrades. Start a fresh session instead.
CLAUDE.md is loaded into context every single turn. Every line costs tokens. Ruthlessly prune anything Claude can discover by reading the code itself.
Delegate research, exploration, and verbose operations (like test runs) to subagents. They get their own context window and don’t pollute your main session.
The Claude Code team’s number one productivity tip: use git worktrees to run 3–5 Claude sessions in parallel. See the next page for a full breakdown.
The #1 productivity tip
Git worktrees let you have multiple copies of the same repo checked out simultaneously, each in its own folder, sharing a single git history. Run a separate Claude Code session in each one for truly parallel work.
git worktree add ../my-app-wt-a -b feature-auth
In each terminal tab, cd into a worktree and run claude. Each gets its own 200k context.
Add alias za="cd ~/projects/my-app-wt-a" to ~/.zshrc. One keystroke to hop.
git merge feature-auth && git worktree remove ../my-app-wt-a
| Multiple terminals (same folder) | Git worktrees |
|---|---|
| All share the same files — edits collide | Each has its own files — zero conflicts |
| Can’t be on different branches | Each is on its own branch |
| Claude sessions step on each other | Completely isolated per worktree |
How to talk to Claude
The way you phrase your requests makes a huge difference in output quality. Here are the patterns that work best, based on research from Anthropic, Spotify, and the developer community.
“Fix the login bug where users see a blank screen after entering wrong credentials in src/auth/Login.tsx”
“Fix the bug”
Tell Claude what “done” looks like and let it figure out how to get there. Spotify’s research found Claude performs better with outcome-focused prompts than step-by-step instructions.
Don’t mix “build this feature AND review that code AND explain this concept” in one message. Separate modes into separate turns.
Include tests, expected outputs, or screenshots so Claude can check its own work. This is the single highest-leverage prompting technique.
Say look at src/auth/Login.tsx rather than “look at the login code.” Precision saves tokens and reduces errors.
When Claude starts going the wrong direction, stop it immediately. The best results come from tight, iterative feedback loops — not hoping it self-corrects.
Automation
Once you’re comfortable with the basics, these three features turn Claude Code from a helpful tool into an automated workflow engine.
Every repeated workflow should become a command. Boris Cherny’s most-used command is /commit-push-pr, which he runs dozens of times daily.
Unlike CLAUDE.md instructions (which are advisory), hooks are guaranteed to run. They fire at specific moments in Claude’s lifecycle.
| Pattern | Hook event | What it does |
|---|---|---|
| Auto-format | PostToolUse | Runs Prettier/ESLint on every edited file |
| Protect files | PreToolUse | Blocks edits to .env, lock files |
| Auto-test | PostToolUse | Runs test suite after code changes |
| Notifications | Stop | Desktop/Slack alert when Claude finishes |
| Context injection | SessionStart | Load live data at session start |
Subagents are separate Claude instances that handle specific tasks without polluting your main context.
Codebase exploration, security audits, code review, running verbose test suites, research that would fill your main context.
95% of tasks don’t need subagents. They’re expensive and add complexity. Use them only for genuinely large, domain-spanning work.
Create custom subagents by dropping .md files in .claude/agents/. Each gets its own name, tool set, model, and system prompt. Boris uses a “Code Simplifier” agent (cleans architecture) and a “Verify App” agent (runs browser tests).
From the creators
Compiled from Boris Cherny’s viral X threads (millions of views), Anthropic’s internal blog, and the developer community.
Always start in Plan Mode. Go back and forth until the plan looks right, then execute.
The team’s number one productivity tip. Run 3–5 Claude sessions simultaneously.
Tests, browser checks, bash commands. This 2–3x’s the quality of the final result.
Treat it as living documentation. When Claude makes a mistake, add a rule to prevent it.
Anything you do twice becomes a slash command in .claude/commands/.
Boris uses Opus with thinking for everything. Quality over speed.
CLAUDE.md is advisory. Hooks are deterministic. Use both together.
When things go sideways, switch back to Plan Mode. Don’t keep pushing forward.
30–45 minutes per session. Fresh context beats accumulated corrections.
Skills and settings in git = institutional knowledge. New team members inherit workflows.
Anthropic results: Code output per engineer up 200% in 2026. Security team uses 50% of all custom slash commands. Growth team generates hundreds of ad variations in minutes with two specialised subagents.
What’s next
Whether you’re a solo developer or leading a team, we can help you get set up with Claude Code, configure your CLAUDE.md, and build workflows that actually save time.
Or email us at [email protected]
Nerdster.ai is a UK-based AI consultancy. We help businesses adopt AI tools, build custom workflows, and deploy private AI solutions — all without the jargon.
Sources: Boris Cherny’s X threads (Jan–Feb 2026), Anthropic official documentation, Anthropic engineering blog, developer community research.
© 2026 Nerdster Limited · Company No. 08223563 · Registered in England & Wales