ClaudeHack
0.000

Use /batch to migrate codebases with parallel worktree agents

Git & GitHub / Pull Requests·14 hours ago·verified 14 hours ago·hard·~20 min setup·verified

Run `/batch` on large mechanical migrations so Claude decomposes work and spawns per-unit worktree agents with PRs.

The problem

Huge migrations in one session overwhelm context and produce unreviewable mega-diffs.

The hack

Invoke the bundled `/batch` skill to research, split into 5–30 units, and run each in an isolated worktree that opens its own PR.

Why it works

Official commands docs describe /batch for exactly this parallel, PR-oriented migration pattern.

Setup

1. Ensure you are in a git repo on a clean-ish base. 2. Run `/batch migrate <target> from X to Y` with clear constraints. 3. Approve the decomposition plan. 4. Review the spawned PRs unit-by-unit instead of one giant diff.

Prompt

/batch migrate src/ from Solid to React

Additional details

Requires a git repository; each unit runs tests before opening a PR.

Source

anthropic·View original →·by Anthropic Docs

Does this still work?

0 said it works · 0 said it's broken

Discussion

No comments yet. Be the first to say whether this worked for you.