Quay lại danh sách
Claude Code NativeĐộ khó: advanced

/batch

Orchestrate large-scale codebase changes in parallel — decomposes work into 5–30 independent units, each handled by an isolated git-worktree subagent.

Dùng được với:Claude

Khi nào dùng

Use for uniform pattern changes across many files: framework migrations, adding types, updating API versions, renaming conventions. Each unit runs in its own worktree and can open a PR.

Ví dụ sử dụng

/batch migrate src/ from Jest to Vitest
/batch add TypeScript types to all files in src/utils/
/batch update all API endpoints to use the new auth middleware

Select Model

<skill name="/batch">
<purpose>
# /batch — Claude Code Bundled Skill

## What It Does
Orchestrates **large-scale parallel changes** across a codebase. Claude researches the codebase, decomposes work into 5–30 independent units, presents a plan, then spawns one background subagent per unit in an **isolated git worktree**.

## How It Works
```
1. Claude analyses codebase and creates decomposition plan
2. You review and approve the plan
3. One subagent per unit, each in its own git worktree
4. Each subagent: implement → run tests → open PR
5. Review incremental PRs as they come in
```

## Requirements
- Must be in a git repository
- Claude Code v2.1+ recommended

## What Makes a Good /batch Instruction
The instruction must describe a **uniform pattern** — something that applies consistently across multiple files:

✅ Good: `/batch add JSDoc comments to all exported functions in src/`
✅ Good: `/batch migrate all .js files in src/ to .ts with strict types`
❌ Bad: `/batch rewrite the authentication system` (single complex task, use autopilot)
❌ Bad: `/batch fix the login bug` (not a pattern, use ralph)

## Reviewing Results
Each subagent opens its own PR. Review incrementally — you don't need to wait for all units to finish before merging the first ones.
</purpose>
</skill>

Skill liên quan