The explore → plan → code → commit workflow
Time: 15–20 minutes
This exercise walks you through the single most important workflow in Claude Code — Explore, Plan, Code, Commit — applied to a real task in a real project on your machine.
The workflow
If you take one thing away from this course, let it be this: Explore → Plan → Code → Commit. Most people jump straight to asking Claude to write code, and then spend twice as long course-correcting. The four-phase workflow fixes that by front-loading the thinking.
Explore. Claude reads the relevant files and pulls in whatever it needs to understand the shape of the problem — existing pipelines, related modules, dependency graphs. The fastest way to do this is Plan Mode, but you can also run an explore subagent on its own for a general codebase summary.
Plan. Still in Plan Mode, Claude returns a written plan of action: where the change goes, what it touches, which dependencies are needed, what could go wrong. This is the cheapest place to course-correct. Review the plan and ask Claude to revise anything that does not match your intent.
Code. Approve the plan. Claude works through its own list, troubleshoots as it goes, and uses the plan itself as context for every decision. You choose whether to auto-accept file edits or approve each one.
Commit. Before you push, run a subagent code reviewer for a fresh pair of eyes — the main agent carries session bias. Then ask Claude to generate a commit message in your style.
Three practices that make the Code phase smoother
- Define success criteria. Claude cannot be confident in its results unless it knows what "correct" means. Write this into the plan explicitly.
- Add tools. If you are building web UIs, install the Claude in Chrome extension so Claude Code can drive a browser tab and test what it just built. The right tool eliminates half the back-and-forth.
- Include a test suite. Give Claude tests it can continuously validate against — it can even write them for you. Make sure the tests are a real source of truth before you hand off, or you will ship false positives.
Quick tip: if Claude keeps running into the same issue across sessions, ask it to save the solution into your CLAUDE.md file so the lesson sticks.
Now do it yourself
Pick a real task on a project you currently work on. Not a hypothetical — something you would actually ship this week. Work through the four phases below and capture what you observe.
Step 1—Explore Your Codebase
Open Claude Code in a real project directory. Press Shift+Tab to enter Plan Mode and ask Claude to explore the codebase and summarise its structure, key dependencies, and architecture. Read what it finds — especially anything that surprises you.
What did Claude discover about your codebase during the Explore phase? What surprised you?
You now have a repeatable workflow — Explore, Plan, Code, Commit — that you can apply to every development task with Claude Code.