orchestrate-batch-refactor
Plan and execute large refactor efforts with parallel multi-agent analysis. Use when: refactoring many files, splitting workstreams, or coordinating sub-agents for batch code changes.
Best use case
orchestrate-batch-refactor is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Plan and execute large refactor efforts with parallel multi-agent analysis. Use when: refactoring many files, splitting workstreams, or coordinating sub-agents for batch code changes.
Teams using orchestrate-batch-refactor should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/orchestrate-batch-refactor/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How orchestrate-batch-refactor Compares
| Feature / Agent | orchestrate-batch-refactor | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Plan and execute large refactor efforts with parallel multi-agent analysis. Use when: refactoring many files, splitting workstreams, or coordinating sub-agents for batch code changes.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
Related Guides
SKILL.md Source
# 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. ## 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 1. Define scope and success criteria. - List target paths/modules and non-goals. - State behavior constraints (for example: preserve external behavior). 2. Run parallel analysis first. - Split target scope into analysis lanes. - Spawn `explorer` sub-agents in parallel to analyze each lane. - Ask each agent for: intent map, coupling risks, candidate work packets, required validations. 3. 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. 4. Execute with worker agents. - Spawn one `worker` per independent packet. - Assign explicit ownership (files/responsibility). - Instruct every worker that they are not alone in the codebase and must ignore unrelated edits. 5. Integrate and verify. - Review packet outputs, resolve overlaps, and run validation gates. - Run targeted tests per packet, then broader suite for integrated scope. 6. 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: 1. Packet ID and objective. 2. Owned files. 3. Dependencies (none or packet IDs). 4. Risks and invariants to preserve. 5. Required checks. 6. Integration notes for main thread. Use [`references/work-packet-template.md`](references/work-packet-template.md) for the exact shape. ## Agent Prompting Contract - Use the prompt templates in [`references/agent-prompt-templates.md`](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: 1. Packet-level checks (fast and scoped). 2. Cross-packet integration checks. 3. Full project safety checks when scope is broad. Prefer fast feedback loops, but never skip required behavior checks.
Related Skills
swiftui-view-refactor
Refactor SwiftUI views for better architecture with MV patterns. Use when: cleaning up SwiftUI views, splitting long bodies, standardizing Observable usage, or removing inline side effects.
request-refactor-plan
Create a detailed refactor plan with tiny commits via user interview, then file it as a GitHub issue. Use when: user wants to plan a refactor, create a refactoring RFC, or break a refactor into safe incremental steps.
batch-processor
Process multiple documents in bulk with parallel execution. Use when a user asks to batch process files, convert many documents at once, run parallel file operations, bulk rename, bulk transform, or process a directory of files concurrently. Covers parallel execution, error handling, and progress tracking.
zustand
You are an expert in Zustand, the small, fast, and scalable state management library for React. You help developers manage global state without boilerplate using Zustand's hook-based stores, selectors for performance, middleware (persist, devtools, immer), computed values, and async actions — replacing Redux complexity with a simple, un-opinionated API in under 1KB.
zoho
Integrate and automate Zoho products. Use when a user asks to work with Zoho CRM, Zoho Books, Zoho Desk, Zoho Projects, Zoho Mail, or Zoho Creator, build custom integrations via Zoho APIs, automate workflows with Deluge scripting, sync data between Zoho apps and external systems, manage leads and deals, automate invoicing, build custom Zoho Creator apps, set up webhooks, or manage Zoho organization settings. Covers Zoho CRM, Books, Desk, Projects, Creator, and cross-product integrations.
zod
You are an expert in Zod, the TypeScript-first schema declaration and validation library. You help developers define schemas that validate data at runtime AND infer TypeScript types at compile time — eliminating the need to write types and validators separately. Used for API input validation, form validation, environment variables, config files, and any data boundary.
zipkin
Deploy and configure Zipkin for distributed tracing and request flow visualization. Use when a user needs to set up trace collection, instrument Java/Spring or other services with Zipkin, analyze service dependencies, or configure storage backends for trace data.
zig
Expert guidance for Zig, the systems programming language focused on performance, safety, and readability. Helps developers write high-performance code with compile-time evaluation, seamless C interop, no hidden control flow, and no garbage collector. Zig is used for game engines, operating systems, networking, and as a C/C++ replacement.
zed
Expert guidance for Zed, the high-performance code editor built in Rust with native collaboration, AI integration, and GPU-accelerated rendering. Helps developers configure Zed, create custom extensions, set up collaborative editing sessions, and integrate AI assistants for productive coding.
zeabur
Expert guidance for Zeabur, the cloud deployment platform that auto-detects frameworks, builds and deploys applications with zero configuration, and provides managed services like databases and message queues. Helps developers deploy full-stack applications with automatic scaling and one-click marketplace services.
zapier
Automate workflows between apps with Zapier. Use when a user asks to connect apps without code, automate repetitive tasks, sync data between services, or build no-code integrations between SaaS tools.
zabbix
Configure Zabbix for enterprise infrastructure monitoring with templates, triggers, discovery rules, and dashboards. Use when a user needs to set up Zabbix server, configure host monitoring, create custom templates, define trigger expressions, or automate host discovery and registration.