# /batch Command

> It splits a big change into parts that run side by side.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** /batch, Parallel change, Large-scale change

## Think of it like

It is like a big puzzle. Many friends each do one corner at the same time.

## Definition

/batch is a bundled skill for one large change across a codebase. It reads the code, splits the work into 5 to 30 parts that do not depend on each other, and shows you the plan. Once you approve it, it starts one background subagent per part, each in its own worktree. Each helper makes its change, runs the tests and opens a pull request or says what went wrong. It needs a git repository.

## Example

Jack must rename a logging call in 200 files. /batch splits the folders into 12 parts, and an hour later he has 12 small pull requests to review.

## Example code

```console
/batch migrate src/ from JavaScript to TypeScript
```

Plan a big change and run its parts side by side.

## Why it matters

A change too big for one session gets done all at once, in small parts a person can check.

## Common mistake

Using it for steps that depend on each other. Each part runs alone, so a part that needs another one's result will fail.

## Three principles

- **Plan first.** You approve it.
- **5 to 30 parts.** Each on its own.
- **One worktree each.** One pull request each.

## Related terms

- [Bundled Skills](https://learn.benibix.com/term/ai/bundled-skills)
- [Worktree Isolation](https://learn.benibix.com/term/ai/worktree-isolation)
- [Subagent](https://learn.benibix.com/term/ai/subagent)
- [Pull Request](https://learn.benibix.com/term/development/pull-request)

## Taught in

- [Diff and Code Review](https://learn.benibix.com/learn/ai-claude-code-commands/diff-and-code-review): Claude Code Commands, 8/17

![One big change is planned, split into many small parts, and each part goes to its own helper in its own worktree. Each helper opens a pull request.](https://learn.benibix.com/diagrams/cmd-batch.svg)

---

Source: https://learn.benibix.com/term/ai/batch-command
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
