✻Founding-member pricing: every lesson for $19/mo. The first 3 lessons are free. Start lesson 1 →
Unit 1 · Claude Code Foundations · Lesson 4 of 40

The Explore → Plan → Code → Commit Workflow

Master the four-phase workflow behind reliable Claude Code sessions: explore the codebase, plan the change, implement with checks, then commit cleanly.

ACADEMY12 min+74 XP4-question quiz

🎯 By the end of this lesson you'll be able to

  • Run each of the four phases deliberately
  • Use plan mode to agree on an approach before edits
  • Ask for verification during the code phase
  • Let Claude write commits and pull requests

Why a workflow beats a single giant prompt

The most common beginner mistake is to type one big request ("build me a billing system") and hope. Claude will try, but it has to guess at your conventions, your edge cases and what "done" means. The fix is a simple rhythm that experienced Claude Code users follow almost by instinct:

  1. Explore: understand the relevant code before deciding anything.
  2. Plan: agree on an approach while changing nothing.
  3. Code: implement in small steps, verifying as you go.
  4. Commit: write a clean commit or pull request with a real description.

Phase 1: Explore

Point Claude at the area you care about and ask it to read, not write:

text
read the files that handle invoices and summarize how an invoice moves from draft to paid.
don't change anything yet.

Reading costs context, so for wide-ranging investigations Claude will often hand the search to a built-in Explore subagent, which reads many files in its own context and returns just the findings.

Phase 2: Plan

Switch to plan mode with Shift+Tab (the status bar shows plan mode on), or start your prompt with /plan. In plan mode Claude researches and proposes, but it can't edit your files.

▶Watch it runPlanning before touching code
Planning before touching code

This is where you catch misunderstandings cheaply. Push back: "Don't touch the PDF yet." "Fees should compound monthly." Press Ctrl+G to open the plan in your editor and edit it directly.

✓
Have Claude interview you

For bigger features, ask Claude to interview you about requirements and write the answers to a SPEC.md. Then start a fresh session that builds from the spec. The clean context and written spec make a dramatic difference.

Phase 3: Code, with a check

Approve the plan and let Claude implement. The single most important thing you can do here is give it a check to run: a test command, a build, a linter, a screenshot to compare.

text
implement step 1 and 2. after each step run `npm test -- invoices` and fix failures before moving on.

When Claude can see real test output, it fixes its own mistakes instead of announcing success.

Phase 4: Commit

Claude is excellent at git. It reads the diff and writes descriptive messages:

text
commit this with a descriptive message
create a pr

With the GitHub CLI (gh) installed and signed in, "create a pr" pushes a branch and opens a pull request with a summary of what changed and why. Later, claude --from-pr 1234 resumes the session linked to that PR.

⇅Put the workflow in orderdrag or use arrows
  1. ⋮⋮Ask Claude to read the relevant code and summarize it
  2. ⋮⋮Switch to plan mode and agree on an approach
  3. ⋮⋮Implement step by step, running tests after each
  4. ⋮⋮Have Claude commit and open a pull request
◎Which phase is this?pick the best fit
"Where do we validate email addresses? Don't change anything."
Reading and summarizing is exploration.
"Before writing code, propose how you'd add rate limiting and what you'd test."
Agreeing on approach with no edits is planning.
"Do step 2, then run the integration tests and fix what breaks."
Implementation with a built-in check.
"Write a commit message that explains the why, then open a PR."
Wrapping up cleanly.

Check your understanding

?Lesson quiz10 XP per correct answer · +25 for a perfect score
QUESTION 1 OF 4

What can't Claude do while in plan mode?

Why: Plan mode is for research and proposals. Edits wait until you approve the plan.
QUESTION 2 OF 4

What's the most effective addition to a 'code' phase prompt?

Why: Give Claude a check to run and it can verify and fix its own work.
QUESTION 3 OF 4

How can you enter plan mode?

Why: Shift+Tab cycles modes, and /plan enters plan mode directly.
QUESTION 4 OF 4

Why write a SPEC.md and start a fresh session to build from it?

Why: The interview fills context with back-and-forth. A fresh session that reads the distilled spec stays focused.
0 / 4 correct
Academy lesson

Unlock lesson 4 and the next 36

You've finished the free lessons. Join the Academy for $19/month to unlock every lesson, quiz, terminal simulation and puzzle, plus the final exam and your certificate of completion.

  • All 40 lessons across 9 units
  • 165+ quiz questions
  • Final exam + certificate
  • New lessons as Claude Code evolves
  • XP, streaks and badges
  • Cancel anytime

Already a member? Log in to continue.

Key takeaways

  • Explore → Plan → Code → Commit turns vague requests into reliable results.
  • Plan mode is the cheapest place to catch misunderstandings.
  • Always pair implementation with a check Claude can run.
  • Let Claude handle git: descriptive commits, PRs, and resuming from a PR.

Nice work. Lesson 4 done?

Mark it complete to earn +74 XP, keep your streak alive and unlock badges.

Written by Curtis Cornell from Anthropic's public Claude Code documentation. Last reviewed November 14, 2026. Claude Code changes fast; if something here differs from your version, the official docs win.

Start lesson 1 free →