🛠️ OrchestrateBatchリファクタリング
大規模なプログラムの改善や再構築(リファ
📺 まず動画で見る(YouTube)
▶ 【衝撃】最強のAIエージェント「Claude Code」の最新機能・使い方・プログラミングをAIで効率化する超実践術を解説! ↗
※ jpskill.com 編集部が参考用に選んだ動画です。動画の内容と Skill の挙動は厳密には一致しないことがあります。
📜 元の英語説明(参考)
Plan and execute large refactors with dependency-aware work packets and parallel analysis.
🇯🇵 日本人クリエイター向け解説
大規模なプログラムの改善や再構築(リファ
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o orchestrate-batch-refactor.zip https://jpskill.com/download/3262.zip && unzip -o orchestrate-batch-refactor.zip && rm orchestrate-batch-refactor.zip
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/3262.zip -OutFile "$d\orchestrate-batch-refactor.zip"; Expand-Archive "$d\orchestrate-batch-refactor.zip" -DestinationPath $d -Force; ri "$d\orchestrate-batch-refactor.zip"
完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。
💾 手動でダウンロードしたい(コマンドが難しい人向け)
- 1. 下の青いボタンを押して
orchestrate-batch-refactor.zipをダウンロード - 2. ZIPファイルをダブルクリックで解凍 →
orchestrate-batch-refactorフォルダができる - 3. そのフォルダを
C:\Users\あなたの名前\.claude\skills\(Win)または~/.claude/skills/(Mac)へ移動 - 4. Claude Code を再起動
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-17
- 取得日時
- 2026-05-17
- 同梱ファイル
- 3
💬 こう話しかけるだけ — サンプルプロンプト
- › Orchestrate Batch Refactor を使って、最小構成のサンプルコードを示して
- › Orchestrate Batch Refactor の主な使い方と注意点を教えて
- › Orchestrate Batch Refactor を既存プロジェクトに組み込む方法を教えて
これをClaude Code に貼るだけで、このSkillが自動発動します。
📖 Skill本文(日本語訳)
※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。
[Skill 名] orchestrate-batch-refactor
バッチリファクタリングのオーケストレーション
概要
このスキルは、高スループットのリファクタリングを安全に実行するために使用します。 スコープを並行して分析し、単一の計画を統合し、サブエージェントで独立した作業パケットを実行します。
使用するタイミング
- リファクタリングが多くのファイルやサブシステムにまたがり、明確な作業分割が必要な場合。
- 並行実装の前に、依存関係を考慮した計画が必要な場合。
入力
- リポジトリパスとターゲットスコープ(パス、モジュール、または機能領域)
- 目標タイプ:リファクタリング、書き換え、またはハイブリッド
- 制約:動作の同等性、APIの安定性、期限、テスト要件
並列化を使用するタイミング
- 多くのファイルやサブシステムに影響する中規模/大規模なスコープの場合に、このスキルを使用します。
- 小さな編集や、密結合した単一ファイルの作業には、マルチエージェント実行をスキップします。
コアワークフロー
- スコープと成功基準を定義します。
- ターゲットパス/モジュールと非目標をリストアップします。
- 動作制約を記述します(例:外部動作を維持する)。
- まず並行分析を実行します。
- ターゲットスコープを分析レーンに分割します。
explorerサブエージェントを並行して起動し、各レーンを分析します。- 各エージェントに、意図マップ、結合リスク、候補となる作業パケット、必要な検証を要求します。
- 依存関係を考慮した単一の計画を構築します。
- エクスプローラーの出力を単一の作業グラフにマージします。
- 明確なファイルの所有権と検証コマンドを含む作業パケットを作成します。
- 依存関係レベルでパケットを順序付けします。独立したパケットのみを並行して実行します。
- ワーカーエージェントで実行します。
- 独立したパケットごとに1つの
workerを起動します。 - 明示的な所有権(ファイル/責任)を割り当てます。
- 各ワーカーに、コードベースで単独ではないこと、無関係な編集を無視する必要があることを指示します。
- 独立したパケットごとに1つの
- 統合して検証します。
- パケットの出力をレビューし、重複を解決し、検証ゲートを実行します。
- パケットごとにターゲットテストを実行し、統合されたスコープに対してより広範なスイートを実行します。
- レポートとクローズ。
- パケットの結果、主要なリファクタリング、解決された競合、残存リスクを要約します。
作業パケットのルール
- 実行ウェーブごとにファイルあたり1人の所有者。
- 重複するファイルセットに対する並行編集は行いません。
- パケットの目標は狭く、測定可能に保ちます。
- 明示的な完了基準と必要なチェックを含めます。
- ユーザーが明示的に動作変更を要求しない限り、動作を維持するリファクタリングを優先します。
計画契約
すべてのパケットには以下を含める必要があります。
- パケットIDと目的。
- 所有ファイル。
- 依存関係(なし、またはパケットID)。
- リスクと維持すべき不変条件。
- 必要なチェック。
- メインスレッドへの統合メモ。
正確な形式については、references/work-packet-template.md を参照してください。
エージェントプロンプト契約
references/agent-prompt-templates.mdのプロンプトテンプレートを使用します。- エクスプローラーのプロンプトは、分析と分解に焦点を当てます。
- ワーカーのプロンプトは、厳密な所有権境界を持つ実装と検証に焦点を当てます。
安全ガードレール
- 計画の統合が完了する前にワーカーの実行を開始しないでください。
- 未解決の依存関係をまたいで並列化しないでください。
- 必要なパケットチェックが失敗した場合、完了を主張しないでください。
- パケット境界が繰り返しのマージ競合を引き起こす場合は、停止して再計画してください。
検証戦略
この順序で実行します。
- パケットレベルのチェック(高速でスコープ内)。
- クロスパケット統合チェック。
- スコープが広い場合のプロジェクト全体の安全チェック。
高速なフィードバックループを優先しますが、必要な動作チェックは決してスキップしないでください。
制限事項
- このスキルは、タスクが上記で説明したスコープに明確に一致する場合にのみ使用してください。
- 出力を、環境固有の検証、テスト、または専門家によるレビューの代わりとして扱わないでください。
- 必要な入力、権限、安全境界、または成功基準が不足している場合は、停止して説明を求めてください。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開
Orchestrate Batch Refactor
Overview
Use this skill to run high-throughput refactors safely. Analyze scope in parallel, synthesize a single plan, then execute independent work packets with sub-agents.
When to Use
- When a refactor spans many files or subsystems and needs clear work partitioning.
- When you need dependency-aware planning before parallel implementation.
Inputs
- Repo path and target scope (paths, modules, or feature area)
- Goal type: refactor, rewrite, or hybrid
- Constraints: behavior parity, API stability, deadlines, test requirements
When to Use Parallelization
- Use this skill for medium/large scope touching many files or subsystems.
- Skip multi-agent execution for tiny edits or highly coupled single-file work.
Core Workflow
- Define scope and success criteria.
- List target paths/modules and non-goals.
- State behavior constraints (for example: preserve external behavior).
- Run parallel analysis first.
- Split target scope into analysis lanes.
- Spawn
explorersub-agents in parallel to analyze each lane. - Ask each agent for: intent map, coupling risks, candidate work packets, required validations.
- Build one dependency-aware plan.
- Merge explorer output into a single work graph.
- Create work packets with clear file ownership and validation commands.
- Sequence packets by dependency level; run only independent packets in parallel.
- Execute with worker agents.
- Spawn one
workerper independent packet. - Assign explicit ownership (files/responsibility).
- Instruct every worker that they are not alone in the codebase and must ignore unrelated edits.
- Spawn one
- Integrate and verify.
- Review packet outputs, resolve overlaps, and run validation gates.
- Run targeted tests per packet, then broader suite for integrated scope.
- Report and close.
- Summarize packet outcomes, key refactors, conflicts resolved, and residual risks.
Work Packet Rules
- One owner per file per execution wave.
- No parallel edits on overlapping file sets.
- Keep packet goals narrow and measurable.
- Include explicit done criteria and required checks.
- Prefer behavior-preserving refactors unless user explicitly requests behavior change.
Planning Contract
Every packet must include:
- Packet ID and objective.
- Owned files.
- Dependencies (none or packet IDs).
- Risks and invariants to preserve.
- Required checks.
- Integration notes for main thread.
Use references/work-packet-template.md for the exact shape.
Agent Prompting Contract
- Use the prompt templates in
references/agent-prompt-templates.md. - Explorer prompts focus on analysis and decomposition.
- Worker prompts focus on implementation and validation with strict ownership boundaries.
Safety Guardrails
- Do not start worker execution before plan synthesis is complete.
- Do not parallelize across unresolved dependencies.
- Do not claim completion if any required packet check fails.
- Stop and re-plan when packet boundaries cause repeated merge conflicts.
Validation Strategy
Run in this order:
- Packet-level checks (fast and scoped).
- Cross-packet integration checks.
- Full project safety checks when scope is broad.
Prefer fast feedback loops, but never skip required behavior checks.
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (3,920 bytes)
- 📎 references/agent-prompt-templates.md (1,360 bytes)
- 📎 references/work-packet-template.md (997 bytes)