orchestrate-batch-refactor

Plan and execute large refactors with dependency-aware work packets and parallel analysis.

31,392 stars

Best use case

orchestrate-batch-refactor is best used when you need a repeatable AI agent workflow instead of a one-off prompt. It is especially useful for teams working in multi. Plan and execute large refactors with dependency-aware work packets and parallel analysis.

Plan and execute large refactors with dependency-aware work packets and parallel analysis.

Users should expect a more consistent workflow output, faster repeated execution, and less time spent rewriting prompts from scratch.

Practical example

Example input

Use the "orchestrate-batch-refactor" skill to help with this workflow task. Context: Plan and execute large refactors with dependency-aware work packets and parallel analysis.

Example output

A structured workflow result with clearer steps, more consistent formatting, and an output that is easier to reuse in the next run.

When to use this skill

  • Use this skill when you want a reusable workflow rather than writing the same prompt again and again.

When not to use this skill

  • Do not use this when you only need a one-off answer and do not need a reusable workflow.
  • Do not use it if you cannot install or maintain the related files, repository context, or supporting tools.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/orchestrate-batch-refactor/SKILL.md --create-dirs "https://raw.githubusercontent.com/sickn33/antigravity-awesome-skills/main/plugins/antigravity-awesome-skills-claude/skills/orchestrate-batch-refactor/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/orchestrate-batch-refactor/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How orchestrate-batch-refactor Compares

Feature / Agentorchestrate-batch-refactorStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Plan and execute large refactors with dependency-aware work packets and parallel analysis.

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.

## 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

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.

## 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.

Related Skills

code-refactoring-tech-debt

31392
from sickn33/antigravity-awesome-skills

You are a technical debt expert specializing in identifying, quantifying, and prioritizing technical debt in software projects. Analyze the codebase to uncover debt, assess its impact, and create acti

tdd-workflows-tdd-refactor

31392
from sickn33/antigravity-awesome-skills

Use when working with tdd workflows tdd refactor

swiftui-view-refactor

31392
from sickn33/antigravity-awesome-skills

Refactor SwiftUI views into smaller components with stable, explicit data flow.

nextjs-best-practices

31392
from sickn33/antigravity-awesome-skills

Next.js App Router principles. Server Components, data fetching, routing patterns.

network-101

31392
from sickn33/antigravity-awesome-skills

Configure and test common network services (HTTP, HTTPS, SNMP, SMB) for penetration testing lab environments. Enable hands-on practice with service enumeration, log analysis, and security testing against properly configured target systems.

neon-postgres

31392
from sickn33/antigravity-awesome-skills

Expert patterns for Neon serverless Postgres, branching, connection pooling, and Prisma/Drizzle integration

nanobanana-ppt-skills

31392
from sickn33/antigravity-awesome-skills

AI-powered PPT generation with document analysis and styled images

multi-agent-patterns

31392
from sickn33/antigravity-awesome-skills

This skill should be used when the user asks to "design multi-agent system", "implement supervisor pattern", "create swarm architecture", "coordinate multiple agents", or mentions multi-agent patterns, context isolation, agent handoffs, sub-agents, or parallel agent execution.

monorepo-management

31392
from sickn33/antigravity-awesome-skills

Build efficient, scalable monorepos that enable code sharing, consistent tooling, and atomic changes across multiple packages and applications.

monetization

31392
from sickn33/antigravity-awesome-skills

Estrategia e implementacao de monetizacao para produtos digitais - Stripe, subscriptions, pricing experiments, freemium, upgrade flows, churn prevention, revenue optimization e modelos de negocio SaaS.

modern-javascript-patterns

31392
from sickn33/antigravity-awesome-skills

Comprehensive guide for mastering modern JavaScript (ES6+) features, functional programming patterns, and best practices for writing clean, maintainable, and performant code.

microservices-patterns

31392
from sickn33/antigravity-awesome-skills

Master microservices architecture patterns including service boundaries, inter-service communication, data management, and resilience patterns for building distributed systems.