Back to Blog
Feature - Claude Code CLI

/simplify & /batch Parallel Agents for Code Quality and Migrations

Claude Code ships two new built-in skills that automate the two most tedious parts of software engineering: polishing a pull request to production quality, and executing large-scale code migrations across an entire codebase. Both use parallel agents. Both change your workflow overnight.

01

The Two Time Sinks

What These Skills Replace

Every developer knows the pattern. You write the feature in an hour, then spend the rest of the day shepherding the PR to production: cleaning up naming inconsistencies, removing dead imports, fixing edge cases the linter missed, making sure the code actually follows your team's conventions documented in CLAUDE.md.

The second time sink is worse: code migrations. Swapping a UI framework, upgrading an API version, moving from one state management library to another. You know the change is mechanical. You know it's parallelizable. But you also know it'll take weeks of monotonous, error-prone file-by-file editing.

/simplify and /batch attack these two problems directly.

02

/simplify

Parallel Agents for PR Polish

โœจ

Code Quality

Spawns parallel agents that scan your changes for naming inconsistencies, dead code, redundant logic, and style violations. Each agent focuses on a specific quality dimension.

โšก

Efficiency Tuning

Agents identify unnecessary allocations, redundant computations, and suboptimal data structures. They suggest concrete improvements with benchmarking context - not generic advice.

๐Ÿ“‹

CLAUDE.md Compliance

Reads your project's CLAUDE.md and verifies that every change aligns with documented conventions. Catches the drift that happens when you're focused on shipping, not style.

Usage
# Make your change, then simplify
"Hey Claude, refactor the auth module to use JWT refresh tokens,
 then run /simplify"

# Or run it standalone on your current diff
/simplify

# What happens behind the scenes:
# 1. Claude reads your staged/unstaged changes
# 2. Spawns parallel agents for quality, efficiency, compliance
# 3. Each agent reviews independently
# 4. Results are merged into a single set of improvements
# 5. Changes are applied to your working tree

The key insight is that code review decomposes into independent concerns. One agent can check naming while another checks performance while another verifies your CLAUDE.md conventions. They don't need to coordinate - each operates on the same diff but evaluates a different dimension.

This is the difference between "Claude, review my code" and a structured, multi-pass quality gate. The former gives you a wall of suggestions. The latter gives you clean code.

03

/batch

Parallel Agents for Code Migrations

/batch is the more ambitious skill. It takes a migration description, interactively plans out the work, then executes in parallel using dozens of agents. Each agent runs with full isolation using git worktrees, tests its own work, and opens its own pull request.

/batch Execution Flow
01
Plan
interactive

You describe the migration. Claude analyzes the codebase and proposes a task breakdown. You refine it together.

02
Isolate
git worktree

Each task gets its own git worktree - a fully isolated copy of the repo. No agent can interfere with another.

03
Execute
parallel agents

Dozens of agents work simultaneously. Each handles one file or component. They migrate, then run the test suite.

04
Ship
pull requests

Each agent opens its own PR with passing tests. You review a stream of small, focused changes instead of one monster diff.

Usage
# Framework migration
/batch migrate src/ from Solid to React

# API version upgrade
/batch update all API calls from v2 to v3 endpoints

# Testing library swap
/batch convert all Jest tests to Vitest

# Style migration
/batch replace CSS modules with Tailwind across components/
04

Git Worktree Isolation

Why This Actually Works

๐Ÿ”’

No Conflicts

Each agent operates in its own git worktree - a separate checkout of the repository. Agent A migrating Button.tsx cannot interfere with Agent B migrating Modal.tsx.

๐Ÿงช

Independent Testing

Each worktree runs its own test suite. An agent doesn't just make changes - it verifies they pass before opening a PR. Failed migrations never reach your review queue.

๐Ÿ“ฆ

Atomic PRs

Instead of one 500-file PR that's impossible to review, you get 50 focused PRs of 10 files each. Each is independently mergeable. Each has passing tests. Review becomes manageable.

Behind the Scenes
# What /batch sets up for each agent:

git worktree add /tmp/batch-agent-01 -b batch/migrate-button
git worktree add /tmp/batch-agent-02 -b batch/migrate-modal
git worktree add /tmp/batch-agent-03 -b batch/migrate-sidebar
# ... dozens more

# Each agent works in its own directory:
# - Makes the migration changes
# - Runs: npm test (or your test command)
# - If tests pass: commits, pushes, opens PR
# - If tests fail: attempts to fix, retries

# After all agents complete:
git worktree remove /tmp/batch-agent-01
git worktree remove /tmp/batch-agent-02
# Cleanup is automatic
05

/simplify vs /batch

Different Tools, Different Jobs

Aspect /simplify /batch
Purpose Polish existing changes Execute large-scale migrations
Scope Your current diff Entire directories or codebase
Planning Automatic - reads your changes Interactive - you refine the plan
Isolation Same working tree Separate git worktrees per agent
Output Improved code in place Multiple pull requests
Agent Count A few focused reviewers Dozens of parallel workers
When to Use Before every PR Framework swaps, API upgrades, library migrations
๐Ÿ”„

Daily Workflow

Use /simplify after every feature implementation. It becomes the last step before you push - a one-command quality gate that catches what you missed while heads-down coding.

๐Ÿš€

Quarterly Migrations

Use /batch for the changes you've been dreading. The framework swap your team has been putting off. The API upgrade that touches 200 files. The work that used to take a sprint now takes an afternoon.

๐Ÿค

Combined Power

Run /batch to execute the migration, then run /simplify on each resulting PR. The migration agents handle correctness; the simplify agents handle polish.

06

What This Means

The Bigger Picture

These aren't just two new slash commands. They represent a shift in how Claude Code thinks about agent orchestration. Previous features like the task management system introduced parallel sub-agents. /simplify and /batch turn that capability into opinionated workflows - you don't need to design the agent topology yourself.

The git worktree pattern in /batch is particularly significant. Multi-agent coding has always had a coordination problem: agents stepping on each other's changes, merge conflicts, race conditions on shared files. Worktrees solve this at the infrastructure level. Each agent gets a complete, isolated copy of the repository. There is nothing to coordinate.

For teams that have built their own custom skills, these built-in skills set a new bar. They show what's possible when skills have deep integration with git, the test runner, and the PR workflow - not just the conversation context.

Coming in the Next Claude Code Release
Ship Cleaner Code. Migrate Faster.

/simplify automates PR polish with parallel review agents. /batch parallelizes large-scale migrations with git worktree isolation. Both ship in the next version of Claude Code.

/simplify    /batch