Multi-file workflows
Approve the file list before edits, let the type checker drive wide changes, and split big diffs into commits you can review.
-
How Do You Keep Claude's Big Diffs Reviewable? Have Claude split the work into separate commits, each with one job, then review them one at a time with /code-review and a commit range. Level 3: Workflows
- 1refactor: extract validateCartno behavior change, so skim
- 2feat: apply coupon codesthe real review goes here
- 3style: format touched filesskim
-
How Do You Change a Function Used Everywhere? Change the definition first, let the type checker list every site that broke, then have Claude work through them until there are no errors. Level 3: Workflows
- 1Change the definition
- 2Type checker lists sites
- 3Fix each site
- 4Search what types can't see
-
What Does Claude Need Before a Multi-File Edit? In Claude Code, less than you might expect. Level 3: WorkflowsClaude Code can findby reading the repo
- File layout and callers
- Types and tests
- Conventions in the code
Only you can saynot in the repo- What must not change
- Which of two patterns wins
- Rollout and data constraints
- What done means
-
How Do You Approve Claude's File List Before Edits? Use plan mode, and require the plan to be a table of every file Claude will create, change or delete. Level 3: Workflows
- 1Claude lists each file and what changes
- 2You trim it with Ctrl+G
- 3Approve, then compare with git diff --statafter the work
One session, a plan, then evidence
A multi-file change has three stages. Before you edit, tell Claude what the repo can't show, then get a file list you can approve. During the edit, change shared definitions first and let the type checker find the callers. Afterward, split the result into commits with one job each, and compare it with the list using git diff --stat. Anthropic's large-codebase guide suggests keeping one cross-package change in a single session, so the decisions behind each edit stay consistent.
When one session isn't the right size
For one mechanical change across many files, Claude Code's /batch splits the work into 5 to 30 independent units, each with its own worktree, tests and pull request, after you approve its plan. It only suits units that can pass on their own, so make a breaking change backward compatible before you batch it. For separate pieces of work, run parallel sessions with claude --worktree <name>. Worktrees are fresh checkouts that branch from your default branch by default, so unpushed work and .env files aren't there unless you set them up. In the Claude app, you can add several files with Add from GitHub, but it can't edit them, and you'd apply the changes yourself.
Can Claude edit multiple files at once?
Claude Code can. It finds the files, edits them and runs your checks. The Claude app can suggest changes across files you add, but its GitHub integration is read-only, so you apply those changes yourself.
How do I stop Claude changing too many files?
Use plan mode and ask for a table of every file it will change. Delete rows you don't want with Ctrl+G, tell it to ask before touching anything else, then compare the result with git diff --stat.
Do I need to explain my project structure to Claude Code?
Usually not. Anthropic's docs list describing your architecture and file layout in CLAUDE.md as advice you can stop following, because Claude reads the repo itself. Tell it what isn't in the code, such as constraints and what must not change.
What is the /batch command in Claude Code?
It handles large changes in parallel. Claude researches the code, splits the work into 5 to 30 independent units and shows you a plan. After you approve, a background subagent handles each unit in its own worktree, runs tests and opens a pull request or reports back.
How do I work on several things at once with Claude Code?
Run claude --worktree with a different name in each terminal. Each session gets its own checkout and branch, so edits don't collide. Each one spends from the same usage limit, so as a rule of thumb, try two before starting five.