agentsclimarketplace

Batch orchestration

Skill rohitg00/pro-workflow/skills/batch-orchestration

Decompose large-scale changes into independent units and spawn parallel agents in isolated worktrees. Use for migrations, refactors, codemods, and any change touching 10+ files with the same pattern.From its SKILL.md

Install
npx -y skills add rohitg00/pro-workflow --skill batch-orchestration

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.

SKILL.md

4.8 KB, ~1.1k tokens by cl100k_base, as published. Nobody here has run it

Batch Orchestration

The /batch command pattern for large-scale parallel changes.

How It Works

/batch <instruction>
  │
  ├── 1. Research: scan repo, understand scope
  ├── 2. Decompose: split into 5-30 independent units
  ├── 3. Present plan: show units, ask for approval
  ├── 4. Execute: one background agent per unit in isolated worktree
  └── 5. Collect: each agent runs tests and opens a PR

Syntax

/batch Convert all React class components to function components
/batch Add error boundaries to every page component
/batch Migrate from moment.js to dayjs across the codebase
/batch Add OpenTelemetry tracing to all API handlers

The instruction should describe the change pattern, not individual files. The batch system finds the files.

Phase 1: Research

The orchestrator scans the repo to find every instance that matches the instruction:

grep -r "class.*extends.*Component" --include="*.tsx" -l

It builds a complete list of targets and groups them by independence.

Phase 2: Decompose

Each unit must be:

  • Independent — no shared state with other units
  • Self-contained — can be implemented and tested alone
  • Verifiable — has a clear pass/fail criteria

Good units:

Unit 1: Convert src/components/Header.tsx (class → function)
Unit 2: Convert src/components/Footer.tsx (class → function)
Unit 3: Convert src/components/Sidebar.tsx (class → function)

Bad units:

Unit 1: Convert all components in src/components/ (too broad)
Unit 2: Fix issues from Unit 1 (dependent)

Target 5-30 units. Fewer than 5 doesn't justify the overhead. More than 30 and coordination costs grow.

Phase 3: Plan Approval

The orchestrator presents:

BATCH: Convert class components to function components

Found: 18 class components across src/

Units (18):
  1. src/components/Header.tsx — class Header → function
  2. src/components/Footer.tsx — class Footer → function
  ...
  18. src/pages/Settings.tsx — class Settings → function

Per unit: convert class to function, update hooks, run component tests
Estimated: ~2 min per unit, ~5 min total (parallel)

Proceed? (y/n)

Wait for approval. Never spawn agents without explicit confirmation.

Phase 4: Execute

After approval, for each unit:

  1. Create isolated git worktree
  2. Spawn background agent in that worktree
  3. Agent implements the change
  4. Agent runs relevant tests
  5. Agent opens a PR

Agents run in parallel. Each has its own context window and worktree — no conflicts.

[Agent 1] ── worktree-1 ── Header.tsx ── tests pass ── PR #41
[Agent 2] ── worktree-2 ── Footer.tsx ── tests pass ── PR #42
[Agent 3] ── worktree-3 ── Sidebar.tsx ── tests fail ── flagged

Phase 5: Collect

After all agents complete:

  • Summary of pass/fail per unit
  • Links to opened PRs
  • Any units that failed with error details
  • Failed units can be retried individually

Best For

Use CaseWhy Batch Works
API migrationsSame pattern across many endpoints
Dependency upgradesFind/replace + fix across codebase
Codemod-style refactorsMechanical transformation, file by file
Adding instrumentationSame tracing/logging pattern everywhere
Test coverage gapsAdd tests to untested modules independently
Lint rule adoptionApply new rule fixes across all files

Anti-Patterns

Don't BatchWhy
Interdependent changesUnits can't run in parallel if they depend on each other
Shared state modificationsMultiple agents writing to the same config or state file
Architecture changesNeed holistic reasoning, not file-by-file
Schema migrationsDatabase changes must be sequential
Changes requiring human judgment per fileDefeats the purpose of automation

Relationship to Other Patterns

PatternScaleIsolation
Direct edit1-3 filesNone needed
Subagent1 focused taskForked context
Worktree1 feature branchFull repo copy
Agent teams3-5 parallel tasksShared task list
Batch5-30 identical patternFull worktree per unit

Batch is the heaviest tool. Use it when the change is mechanical, repetitive, and the units are truly independent.

Guardrails

  • Always review the decomposition before approving
  • Each agent must run tests before opening a PR
  • Failed units get flagged, not silently skipped
  • Clean up worktrees after all agents complete
  • Review PRs in batches — don't merge blindly

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Gives 1 of the 12 instructions most agent orchestration skills give in ~1.1k tokens

Counted across 848 of the 1,300 authors here whose files we hold, read 2026-09-06

  • Dispatch one agent per independent problem domainin 56 of 848, across 42 files
  • Run full test suite after integrationin 55 of 848, across 42 files
  • Verify fixes do not conflictin 40 of 848, across 32 files
  • Review each summary when agents returnin 40 of 848, across 31 files
  • Write a handoff document summarising the current conversationin 30 of 848, across 25 files
  • Reference existing artifacts by path or URLin 26 of 848, across 24 files
  • Give each agent a specific scopein 19 of 848, across 10 files
  • Give each agent a clear goalin 19 of 848, across 10 files
  • Include a suggested skills section in the documentin 18 of 848, across 16 files
  • Tailor the doc to the user argumentsin 18 of 848, across 15 files
  • Issue all subagent dispatches in the same responsein 17 of 848, across 11 files
  • Use git worktrees for isolationhere, and in 17 of 848, across 8 files

Said here and by no other author read

  • Scan the repository to find matching instances
  • Present the plan and wait for approval
  • Spawn a background agent per unit
  • Run relevant tests before opening a PR
  • Open a pull request for each unit

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.