Command reference ยท Claude Code
/batch
Orchestrates large changes in parallel across the entire codebase: researches, splits the work into units, and has subagents implement them.
Orchestrates large changes in parallel across the entire codebase: researches, splits the work into units, and has subagents implement them. [Skill] Breaks the work into 5-30 independent units and presents a plan; once approved, a background subagent starts per unit in an isolated git worktree, implements, tests, and opens a pull request. Requires a git repository.
โ WHEN TO USE IT?
A large change that splits into many independent units across the whole codebase
/batch rename the legacy HTTP client to the new SDK across all 15 services
A migration where each unit should get its own PR and be tested in parallel
/batch migrate every module from CommonJS to ESM
โ WHEN NOT TO?
A small task touching one or two files
the planning phase plus isolated worktrees and per-unit PRs are pure overhead for a small task
Better: use a normal prompt or a single subagent instead of /batch
No git repository present
/batch requires a git repository for the isolated per-unit worktrees
Better: run 'git init' first, or make the change manually without /batch
SOURCES
- Claude Code Doku (offiziell) โ code.claude.com