orchestrate-batch-refactor
できること
このツールは、プロジェクト内の大規模なコード変更を整理して実行するのに役立ちます。作業を小さな部分に分割し、それらの間の依存関係を管理することで、すべてを安全かつ整理された方法で完了できるようにします。
使う場面
- ✓変更がコードの多くの部分に影響する場合。
- ✓変更を加える前に、手順を計画する必要がある場合。
- ✓複数の人が同時に別々の部分に取り組む必要がある場合。
スキルのリンク
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/orchestrate-batch-refactor/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“'src/components' ディレクトリにあるコードを、現在の機能を変えずにパフォーマンスを改善するために大規模にリファクタリングする計画を立ててください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
まず、ツールは変更が必要なコードのすべての部分を分析します。次に、依存関係を考慮しながら、並行して進められる小さなタスクに作業を分けた詳細な計画を作成します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
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.
よくある質問
「リファクタリング」とはどういう意味ですか?
リファクタリングとは、外から見た動作を変えずに、コードの内部構造を改善することです。家電の動きを変えずに家の配線を整理して、理解しやすく管理しやすくするようなものです。
「作業パケット」とは何ですか?
大きな作業を分割した小さなタスクのことです。それぞれのパケットには、明確な目的、作業対象の特定のファイル、そして他のタスクと衝突しないためのルールがあります。
なぜ並行して分析するのですか?
異なる「エージェント」(小さなAIアシスタント)が、コードの異なる部分を同時に調べるためです。これにより、変更を始める前に影響範囲を把握し、リスクを特定する作業が速くなります。
詳細
作者による元の説明
Plan and execute large refactors with dependency-aware work packets and parallel analysis.
人気
- GitHubのスター
- 48k
- ランキング
- #5389
- ライセンス
- MIT
- 更新日
- 2026/10/15
コメント
- …
このリポジトリの他のスキル
00-andruia-consultant
48kエージェントがAIプロジェクトの立ち上げや改善を支援します。コードを分析し、ツールを提案し、スペイン語で行動計画を作成します。
007
48kエージェントがセキュリティ監査と脅威モデリングを行えるようにします。攻撃や脆弱性からプロジェクトを守るのに役立ちます。
10-andruia-skill-smith
48kエージェントがAIツールの作成や改善を支援します。ツールの動作を定義し、ドキュメントを書き、構造を検証します。
20-andruia-niche-intelligence
48kエージェントが特定の業界に関する要約を作成できるようにします。信頼できる情報源を使って、プロジェクトの背景、ルール、利用パターン、リスクを把握するのに役立ちます。
似ているスキル
diffs
394k編集内容の実際の共有可能な差分を、手書きの要約ではなく、ビューアーのリンクや画像ファイルとして作成するようエージェントを支援します。
coding-agent
394kCodex、Claude Code、OpenCodeに大きめのコーディング作業をバックグラウンドのワーカーとして渡し、その進捗を確認するようエージェントを支援します。
gh-issues
394kGitHubのイシューを探し、取り組むものを選び、修正を含むプルリクエストを開くようエージェントを支援します。レビューコメントへの対応も含みます。