batch
Skill41 starsChanged 7 days agoMITView on GitHub
Use when decomposing large tasks into independent parallel units that do not depend on each other
13 other projects use a version of this.
Adopted by
Most recently taken up by
- MikeyPetrillo/Agent402their own version, first seen Nov 8, 2026
- KadirHarmanc/nazar-skilltheir own version, first seen Nov 8, 2026
- codewhale-hq/codewhale-plugin-marketplacetheir own version, first seen Nov 8, 2026
- HeshamFS/swarmweavertheir own version, first seen Nov 1, 2026
- ahmetenesdur/starkfitheir own version, first seen Oct 25, 2026
- codebycorey/delta-spectheir own version, first seen Oct 15, 2026
Used with
Projects with it also use simplify and verify.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
Hugging FaceSkillsimplify
Refactor code after tests pass. The "Refactor" phase of Red-Green-Refactor.
Also in 4 projects that use this
Microsoft AzureSkillverify
End-to-end app testing pipeline for browser-based web apps on cloud browsers via Azure Playwright Workspaces: verify the live app, author tests for working flows, heal failing tests, then re-run with video and produce one consolidated report. Three phases (app verification, test authoring, test healing) plus a scoped final sanity run; each phase emits a sub-report. Use when asked to "verify my app", "make sure my app works and has good test coverage", "do a full QA pass", "add tests where I'm missing coverage", "fix failing tests and add new ones", "smoke test before deploy", "QA my deployment", or any combined verify-and-test ask. Requires Azure CLI (`az login`) and a Playwright Workspace resource ID — bootstraps configs on first invocation. Browser-based web apps with Playwright only — not for unit/API tests, native mobile/desktop, load/perf, or full accessibility audits.
Also in 3 projects that use this
Other versions13 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 13
- ww-w-ai/bkit-gemini★ 66same name
- MikeyPetrillo/Agent402★ 51same name
- woxiangyangzhimao/skills★ 14same name
- codewhale-hq/codewhale-plugin-marketplace★ 5same name
- codebycorey/delta-spec★ 4same name
- HeshamFS/swarmweaver★ 4same name
- ahmetenesdur/starkfi★ 2same name
- jiaxuan030331/applyloop★ 2same name
- angelgabrieljacintohuayllasco/clipboard-skills★ 0same name
- beginnersinai/content-repurposer★ 0same name
3 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
7 rules. 0 are common, 6 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 10 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 59
No unit uses another unit's output as input
- Distinctive: line 61
If a candidate unit depends on another unit's output → merge them into one unit or flag as sequential
- Distinctive: line 85
After approval, spawn one agent per unit.
- Distinctive: line 110
After all units complete (or time out), produce a Batch Summary Report:
- Distinctive: line 178
Worktree cleanup: After synthesis, discard unit worktrees.
- Very specific: line 179
No cross-unit dependencies: If the user's requested task has inherent sequencing (e.g., part 2 builds on part 1's conclusion), this is not …
- Distinctive: line 180
Partial failure is not total failure: If 2 of 10 units fail, deliver the 8 successes and report the 2 failures clearly.
“Common” is measured: kept by at least 6 in 10 of the 10 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Iron Law
Verify task independence before parallel execution.
Red Flags
- "These tasks look independent enough" → STOP, because hidden output dependencies only surface after parallel dispatch wastes the full budget — verify independence rigorously before execution.
- "Part 2 builds on part 1's conclusion but we can still batch them" → STOP, because inherent sequencing means this is not a batch job — route to
workflowinstead. - "Let's skip the approval step, the decomposition is obvious" → STOP, because the Approve gate is mandatory with no exceptions — decomposition errors are cheap to fix before execution and expensive after.
- "10 units is fine, we have the budget" → STOP, because cost scales linearly (10 units = 10x a single invocation) — always show estimated cost at the Approve gate and get explicit approval.
- "2 units failed but the other 8 are fine, just discard the failures" → STOP, because partial failure requires a clear failure report with error summaries and recommended actions — do not silently drop failed units.
Batch
Decompose large knowledge work tasks into independent parallel units, each executed in its own worktree.
Inspired by Claude Code's /batch command — designed for high-volume, homogeneous content production.
When to Use
- User needs 5+ similar artifacts produced from distinct source material (e.g., 10 newsletter issues, 8 competitor analyses)
- The work has a clear unit of decomposition (by topic, by section, by competitor, by framework)
- Sequential execution would take too long and units do not depend on each other
- Output quality benefits from independent focus per unit rather than a shared context window
Workflow
1. Analyze
Dispatch an Explore agent to understand the full scope of the request:
- How many units does the task naturally decompose into?
- What is the unit type: topic, competitor, framework, section, time period, persona?
- What skill handles each unit (default:
write)? - What shared context applies to all units (format, voice, audience, constraints)?
2. Decompose
Break the task into 2–10 independent units. Each unit specification must include:
unit:
id: <integer, 1-indexed>
label: <short human-readable title>
topic: <specific topic for this unit — no overlap with other units>
skill: <write|research|analyze|review|refine>
output: <file path: .captures/batch-{run_id}/{slug}.md>
shared_context: <reference to shared context block>Independence requirements (non-negotiable):
- Each unit produces a separate output file
- No unit uses another unit's output as input
- Units can complete in any order without inconsistency
- If a candidate unit depends on another unit's output → merge them into one unit or flag as sequential
Unit count limits:
- Minimum: 2 (batching 1 unit is a no-op)
- Default maximum: 10
- Override with
--units N
3. Approve
Present the full decomposition plan to the user before any execution begins. This gate is mandatory — no exceptions.
Present as a table:
| # | Label | Topic | Skill | Output File |
| 1 | ... | ... | write | .captures/batch-{run_id}/01-slug.md |
| 2 | ... | ... | write | .captures/batch-{run_id}/02-slug.md |
Show: total units, estimated cost (units × avg token cost), parallelism setting.
Wait for explicit approval. On rejection: re-decompose with user's feedback and re-present.
4. Execute
After approval, spawn one agent per unit. Each agent runs in an isolated worktree:
isolation: worktree
worktree_path: worktree-batch-{run_id}-unit-{id}Concurrency is capped at --parallel (default: 3). Units beyond the cap queue and start as slots open.
Each unit agent receives:
- The unit specification (topic, skill, output path)
- The shared context block
- The selected skill's full instruction set
5. Monitor
Track status per unit: PENDING | RUNNING | DONE | FAILED.
Print a live status table as units complete. On unit failure:
- Log the failure with the unit's error
- Continue remaining units (do not abort the batch)
- Collect all failures for the synthesis report
6. Synthesize
After all units complete (or time out), produce a Batch Summary Report:
## Batch Summary — {topic} ({YYYY-MM-DD})
Units: {done}/{total} completed
Failed: {failed_ids} (if any)
### Output Files
| # | Label | Status | Path |
|---|-------|--------|------|
...
### Synthesis
{Optional: if --synthesize is set, produce a combined document merging all outputs}
### Failures
{For each failed unit: label, error summary, recommended action}Save report to .captures/batch-{run_id}/00-summary.md.
Options
| Flag | Values | Default | Effect |
--units N | integer 2–10 | auto (up to 10) | Override max unit count |
--skill | write|research|analyze|refine | write | Skill each unit runs |
--topic | string | (required) | The overarching topic being decomposed |
--parallel | integer 1–5 | 3 | Max concurrent unit agents |
--synthesize | flag | off | After all units complete, merge outputs into one document |
--lang | ko|en | ko | Output language passed to each unit skill |
--format | write-skill formats | article | Passed to each unit's write skill |
State
State persisted at .data/state/batch-{run_id}.json. Schema:
{
"run_id": "batch-{timestamp}",
"topic": "...",
"status": "PENDING | RUNNING | DONE | FAILED",
"units": [...],
"parallel": 3,
"created_at": "ISO-8601",
"completed_at": "ISO-8601 | null"
}Subagents
These are configurations for general-purpose subagents, not entries in agents/. There is no
decomposer agent to dispatch by name — spawn a general-purpose subagent with the model, tools, and
constraint below. (Contrast /scc:review, whose roles are real subagent_type values.)
explorer: { model: haiku, tools: [Read], constraint: "scope analysis only, no writing" }
decomposer: { model: sonnet, tools: [], constraint: "produce unit specs, verify independence" }
unit_agent: { model: varies, isolation: worktree, constraint: "run assigned skill, write to assigned output path only" }
synthesizer: { model: opus, tools: [Read, Write], constraint: "merge outputs faithfully, no hallucinated content" }Gotchas
- Cost scales linearly: 10 units × write skill cost = 10× a single write invocation. Always show estimated cost at the Approve gate.
- Decomposition quality determines output quality: Vague unit topics produce vague output. If the topic cannot be made specific, ask the user before decomposing.
- Never skip the Approve gate: Decomposition errors are cheap to fix before execution and expensive after.
- Worktree cleanup: After synthesis, discard unit worktrees. Do not leave orphaned worktrees.
- No cross-unit dependencies: If the user's requested task has inherent sequencing (e.g., part 2 builds on part 1's conclusion), this is not a batch job — route to
workflowinstead. - Partial failure is not total failure: If 2 of 10 units fail, deliver the 8 successes and report the 2 failures clearly. Do not withhold completed work.
See references/decomposition-guide.md for split strategies, anti-patterns, and merge strategies.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

