Advanced Track · ~18 minutes
The Advanced Workflows of Claude Code
You've shipped a few prompts. Now it's time to think in systems. This chapter covers planning loops, context engineering, sub-agents, and the discipline of small, reversible changes.
Advanced Track · ~18 minutes
You've shipped a few prompts. Now it's time to think in systems. This chapter covers planning loops, context engineering, sub-agents, and the discipline of small, reversible changes.
Most people use Claude Code as a fancy autocomplete. The pros treat it like a junior engineer with a short memory — very capable, but in need of structure. These four patterns are the backbone of every advanced workflow.
Ask Claude to design the change in plain English before writing any code. You'll catch 80% of mistakes in the cheap phase.
"Before you write code, list the files you'll touch and why."
Break big tasks into 20–50 line diffs. Review. Commit. Move on. Long-running sessions accumulate drift; small ones stay sharp.
"Change only the auth middleware. Nothing else."
A CLAUDE.md in your repo root is Claude's long-term
memory. List conventions, paths, and the commands it should always
run.
"Always use pnpm. Tests live in __tests__."
End every task with "now run the tests, fix anything that breaks, and summarize the final diff." Claude is great at closing its own loop.
"Run tests, iterate until green, then stop."
A single feature, from idea to merged PR, with Claude as a teammate.
Describe the feature in 3–5 sentences. Paste it into Claude and ask for clarifying questions before anything else.
Ask: "Map every file related to checkout." Read the map yourself — don't skip this step.
Have Claude produce a written plan with file list, risks, and test strategy. Push back on anything that feels off.
Commit after each logical unit. Keep each diff under 150 lines when
possible. Use /review before every commit.
Ask Claude to write the PR description and a list of things a human reviewer should double-check.
# Goal: safely rename an exported API
1. Ask Claude to grep all usages and show them.
2. Agree on a rename strategy (codemod vs manual).
3. Run the codemod in a branch.
4. Ask Claude to run tests and summarize breakages.
5. Fix, repeat, commit in logical groups.
# Goal: fix a flaky test
1. Paste the failing output. Ask for 3 hypotheses, not 1.
2. For each hypothesis, ask what the cheapest experiment is.
3. Run the cheapest first. Let Claude interpret results.
4. Only patch after a reproducer exists.
# Goal: understand a new codebase fast
1. claude /init — generates CLAUDE.md
2. "Tour the repo. Pretend I'm a new hire."
3. "Pick 3 files to read end-to-end. Justify each."
4. "Diagram the request path from HTTP → DB."
5. Save the diagram into docs/architecture.md
After ~1 hour, start a fresh session. Summarize progress into
CLAUDE.md first, then /clear.
"Make it better" is a dead end. Always pair the verb with a measurable target: smaller, faster, simpler, typed.
Claude is confident even when wrong. Always read the diff. Always run the tests. Always.
The temptation to jump straight to code is strong. Resist. The plan is the feature.
Up next
Learn how to fan out work across multiple Claude instances without losing your mind.
Continue →