Skip to content

Build with Claude Code: from an approved plan to a proved change

The Claude Code build section is 21 guides for developers and tech leads that turn an approved plan into a merged change: implementing across files, running one change over hundreds of files, API, database and documentation work, and the setup around them. Each guide ends in evidence, such as passing tests and a scoped diff, rather than a line-by-line read.

You approved a plan for per-key rate limiting this morning. By lunch, Claude Code has touched 14 files, quietly edited two tests to pass, and produced a 900-line pull request (PR) diff nobody wants to review. The plan was fine; the build had no checkpoints.

These guides build in small slices: each slice runs your test, typecheck, and lint commands and proves itself before the next starts, and the change ends in an evidence report that you and your reviewer check instead of every line.

Your situationStart withWhat you leave with
An approved plan spans several filesFrom plan to working code and multi-file workflowsSmall commits, each green in CI
One mechanical change must hit hundreds of filesBatch operations (the bundled /batch skill) and large-scale refactoringIndependent PRs, each with its own gate
Better structure, same behaviorRefactoring patternsCharacterization tests first, then the refactor
New REST or GraphQL endpointsAPI developmentA contract, and tests that check it
Schema, query, or data changesDatabase work and migrationsMigrations proved on a disposable database
A payment, email, or OAuth providerThird-party integrationsSandbox-tested integration code
Docs drift from the codeDocumentationDocs regenerated and kept true by a gate
The repository exceeds the contextLarge codebasesScoped sessions that read only what matters
Claude forgets your conventions between sessionsThe memory systemA CLAUDE.md and rules that hold

The rest of the section is your daily setup: command-line flags and sessions, prompt engineering, slash commands, terminal mastery, IDE and CLI coordination, the desktop app, workflow optimization, efficiency hacks, and features you haven’t tried.

The loop needs a plan saved in the repository; if you have none, start in Plan with Claude Code.

  1. Start an isolated, named session in a new git worktree, so the build cannot collide with your other work:

    Terminal window
    claude --worktree rate-limit -n rate-limit
  2. Give Claude the plan and the first slice only, with the first prompt below.

  3. After each slice, Claude runs the verification commands and reports. You check the report, not the diff.

  4. Before the PR, run /code-review in the session, fix what it finds, then produce the evidence report with the second prompt.

  5. If a slice goes wrong, press Esc twice (or run /rewind) and pick the checkpoint before the slice. Checkpoints restore only files Claude edited with its edit tools; they do not undo a commit or changes made through Bash. If the slice was already committed, also run git reset --hard HEAD~1, then restate the slice.

From v2.1.280 (the latest channel), Claude Code defaults to Claude Opus 5.5 at medium effort; the stable channel (2.1.274 on 2026-09-26) has not reached it, so check claude --version. For a hard slice, raise effort first (/effort high or --effort xhigh) and change model only when your own results say so. See the models hub.

How do you check a build without reading every line?

Section titled “How do you check a build without reading every line?”

You sign off on evidence the agent cannot fake with prose. A build is done when these five checks pass:

  1. The acceptance tests went from red to green, and you saw the red.
  2. The same test, typecheck, and lint commands pass in CI, not only on the laptop.
  3. git diff --stat main lists only files the plan put in scope.
  4. No existing test changed without a reason you accept.
  5. /code-review (or your CI review agent) raised nothing that is still open.

You read only what those checks flag. To catch type errors during the build rather than in CI, add a typecheck hook (hooks automation). The developer signs off on a change inside an approved plan; a tech lead signs off on anything that changes its scope. The reasoning is in evidence, not diffs; the PR format is the evidence bundle.

What goes wrong when you build with Claude Code?

Section titled “What goes wrong when you build with Claude Code?”
SymptomLikely causeRecovery
Tests pass, but the feature is brokenClaude edited the tests, or the assertions are weakRestore each edited test with git restore --source=main -- TEST_PATH, where TEST_PATH is the edited test file, and rerun the slice with “never edit an existing test”
The diff touches files outside the planThe slice was too large, or the plan missed a callerPress Esc twice (or run /rewind) and pick the checkpoint before the slice; if the slice was already committed, also run git reset --hard HEAD~1. Update the plan before you continue
Quality drops late in a long sessionEarlier slices fill the contextCommit, start a fresh session, and point it at the plan and the next step
Two sessions overwrite each other’s filesBoth worked in one checkoutGive each session its own worktree with --worktree