CClaude Code Catalog
全スキル

Batch 大規模変更

ワークフロー上級

Claude Codeの公式バンドルスキル /batch は大規模なコード変更を自動処理します。コードベースをリサーチして変更範囲を把握し、5〜30の独立単位に分解します。各単位は別のgit worktreeで独立エージェントが処理し、完了後PRを自動生成します。

トリガー/batch
使用頻度大規模作業時

数百ファイルのAPIマイグレーションが必要なチームなら? /batchで変更単位を自動分解し並列処理

コード標準を全コードベースに適用したいテックリードなら? /batchでモジュールごとに分割し一括PR生成

batch並列処理worktreeバンドルスキル大規模

動作フロー

/batch [変更説明] 実行 → コードベースリサーチ
5〜30の独立単位に分解 + 実行計画生成
Phase 2: worktreeごとのエージェント並列実行
worktree-1
単位1の変更処理
worktree-2
単位2の変更処理
worktree-N
単位Nの変更処理
単位ごとのPR自動生成 + 変更サマリー

スキルコード

# Batch Orchestrator — Built-in Bundled Skill ## Trigger: /batch [change description] Claude Code's official bundled skill for large-scale codebase changes. ### Workflow: 1. Research phase: - Scan codebase for affected files - Identify dependencies and impact scope - Map change boundaries 2. Decomposition: - Split into 5-30 independent units - Ensure each unit is self-contained - Generate execution plan with ordering 3. Parallel execution (git worktrees): ```bash # Each unit runs in its own worktree .claude/worktrees/batch-unit-1/ .claude/worktrees/batch-unit-2/ .claude/worktrees/batch-unit-N/ # Each agent: # 1. Creates a branch # 2. Applies changes # 3. Runs tests # 4. Creates a PR ``` 4. Post-processing: - Collect results from all worktrees - Report success/failure per unit - Generate summary with PR links ### Key features: - Automatic conflict detection between units - Shared memory across worktrees (v2.1.63+) - Resume capability for failed units - Dry-run mode for preview ### SKILL.md structure: ```yaml --- name: batch description: Research codebase, decompose, and parallelize changes ```

コピーしてCLAUDE.mdに貼り付ければ、すぐに使えます。

Batch 大規模変更 の仕組み

Batchはコードベースをスキャンして変更範囲をマッピングし、独立した5〜30単位に分解します。各単位は別のgit worktreeでエージェントが処理し、テスト通過後PRを自動生成します。

Batch 大規模変更 が力を発揮する場面

APIマイグレーション、コード標準の一括適用、フレームワークアップグレードなど、数百ファイルにわたる大規模変更作業に最適です。

主な強み

  • 自動分解で大規模タスクを管理可能な単位に分割
  • git worktreeベースの並列実行で競合を防止
  • 単位ごとのPR生成でコードレビューが容易
  • 失敗した単位のみ再実行可能なリカバリー機能

同じカテゴリのスキル

ワークフロー すべて見る

他カテゴリの人気スキル