AI Learning
intermediate ⏱️ 7 min read · 🎬 ~25 min video

Claude Code Best Practices: The Field Guide

Cal Rueb's field-tested playbook for getting consistently great results from Claude Code: context curation, permission strategy, planning, parallel sessions and knowing when to course-correct.

This lesson is original educational writing based on this video by Anthropic (published May 22, 2025). All credit for the original content goes to the creators.

#claude-code #agentic-coding #productivity #workflows
Video thumbnail: Claude Code Best Practices: The Field Guide
Original video β€” all credit to the creators. Watch the original on YouTube β†—

1. Where Claude Code actually earns its keep

Cal Rueb (Anthropic technical staff) opens with use-case selection, because the biggest practice mistake isn’t a missing flag β€” it’s pointing the tool at the wrong work. The standout use cases:

  • Onboarding and discovery. Claude Code is β€œthe coworker who already knows the repo”: locate features, read git history, untangle legacy code, answer β€œwhy is this like this?”.
  • The boring middle. Refactors, test backfills, migrations, lint cleanups β€” high-volume work with clear success criteria.
  • First drafts of new features, with you reviewing as the architect rather than typing as the implementer.

The common thread: tasks where verification is cheaper than creation. If checking the work takes longer than doing it yourself, reshape the task first (smaller scope, clearer success criteria) before delegating it.

2. Context is a budget β€” spend it deliberately

The talk’s core mental model: the context window is a finite budget, and everything competes for it β€” your CLAUDE.md, file contents, tool outputs, conversation history. Practices that follow:

Context window = finite budgetevery token here is a token Claude can’t spend reading your codeCLAUDE.mdshort, current, curatedConversation/clear between tasksTool outputpoint at files, not dumpsRule of thumb: one task, one clean context β€” stale history degrades every later answer
The context budget: persistent memory, conversation history and tool outputs all compete for the same window. Curate what stays.
  • CLAUDE.md is a prompt, not documentation. Every line rides along on every message. Keep commands, conventions and gotchas; delete anything Claude can discover itself. Review it like code β€” stale instructions actively hurt.
  • /clear between unrelated tasks. Old task history pollutes new tasks. Cal’s habit: finish, commit, /clear, next task. Use /compact instead when you need continuity but the window is filling β€” it summarizes the conversation and reclaims space.
  • Point, don’t paste. Reference files with tab-completion and let Claude read what it needs; pasting walls of code spends budget on things Claude could fetch selectively.

3. The working rhythm: explore β†’ plan β†’ code β†’ commit

For anything beyond a one-liner, the recommended loop:

  1. Explore β€” have Claude read the relevant code first: β€œRead the auth module and summarize how sessions work. Don’t change anything yet.”
  2. Plan β€” ask for a concrete plan; for hard problems add thinking budget (think, think hard, ultrathink). Review it. This is the cheap place to be wrong.
  3. Code β€” implement step by step, with verification (tests, type checks) running as it goes.
  4. Commit β€” let Claude write the commit message (it just watched every change), then /clear.

Two practices wrap around this rhythm:

Course-correct early. Escape interrupts; double-Escape rewinds history so you can edit your earlier prompt. Treat the first 30 seconds of any run as a steering window β€” redirecting then costs nothing; reviewing a confidently wrong 400-line diff costs your afternoon.

Parallelize what’s independent. Heavy users run 2–4 Claude instances: separate terminal tabs for separate concerns, or git worktrees for truly parallel feature work (git worktree add ../proj-feature -b feature), each with its own session. One instance writes code while another reviews it β€” an adversarial pairing that catches what the author-instance is blind to. With Claude 4 models reasoning between tool calls, each instance recovers from dead ends on its own; your job shifts to routing work between them.

Check your understanding

4 questions Β· your answers are saved in this browser only

  1. 1. According to the talk, which task should you NOT hand to Claude Code as-is?

  2. 2. Why run /clear between unrelated tasks?

  3. 3. What is the cheapest moment to fix a misunderstanding in the explore β†’ plan β†’ code β†’ commit rhythm?

  4. 4. What do git worktrees give you in a Claude Code workflow?

Build it yourself

Follow these exact steps to reproduce it yourself Β· estimated time: ~30 minutes

Prerequisites

  • Claude Code installed and authenticated (see the Mastering Claude Code lesson)
  • A real project with tests

Turn the talk into your default setup: a context-budget audit plus a parallel-session workflow.

Step 1 β€” Audit your CLAUDE.md like a prompt

cd your-project && claude
Read CLAUDE.md. For each line, classify it: (a) something you could have
discovered yourself, (b) stale/wrong, (c) genuinely needed. Propose a
shorter version containing only (c).

Apply the cut. Most CLAUDE.md files shrink by half β€” that’s reclaimed budget on every message.

Step 2 β€” Practice the rhythm on a real task

Explore: read the code involved in <small real task>. Don't change anything.
Summarize what you found.
Plan: think hard and propose a step-by-step plan with the files you'll touch
and how we'll verify each step.

Then: Implement step 1. After it verifies, let Claude commit, and /clear.

Step 3 β€” Set up parallel worktrees

git worktree add ../$(basename $PWD)-review -b review-session
# Terminal tab 1 (implementer):
claude
# Terminal tab 2 (reviewer), in ../<project>-review:
claude

Have tab 1 implement a small change and commit it. Then in tab 2:

Review the latest commit on branch <branch> like a skeptical senior engineer:
correctness, missed edge cases, simpler alternatives.

Expected result: the reviewer instance finds at least something the implementer missed β€” it has no attachment to the code’s history, which is exactly the point. Keep the pairing for any change you’d normally want a second opinion on.

Step 4 β€” Make course-correction muscle memory

On your next run, deliberately interrupt with Escape within the first 30 seconds and refine your prompt with double-Escape. Do it three times this week; the habit pays for itself the first time Claude heads down a wrong path with conviction.

Where to go next

Related lessons

intermediate 🎬 Anthropic · ~30 min

Mastering Claude Code: The Agentic Coding Workflow

How Claude Code works under the hood, the workflows Anthropic's own engineers use, and how to extend it with memory files, slash commands and headless automation.

#claude-code #agentic-coding #productivity
intermediate 🎬 Anthropic · ~20 min

Vibe Coding in Prod β€” Responsibly

Erik Schluntz merged a 22,000-line largely Claude-written change into a production RL codebase. This lesson extracts the discipline that makes that safe: you stop being the code writer and become the system designer and verifier.

#claude-code #agentic-coding #engineering-culture #workflows
beginner 🎬 Anthropic · ~10 min

Managing Context in Claude Code

How Claude Code's context window works, when to compact vs clear, and practical strategies for keeping sessions lean and productive.

#claude-code #productivity