/batch

> Execute multi-agent tasks using intelligent batching for token efficiency.

170 stars

Best use case

/batch is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

> Execute multi-agent tasks using intelligent batching for token efficiency.

Teams using /batch 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

$curl -o ~/.claude/skills/batch/SKILL.md --create-dirs "https://raw.githubusercontent.com/Miosa-osa/canopy/main/library/skills/workflow/batch/SKILL.md"

Manual Installation

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

How /batch Compares

Feature / Agent/batchStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

> Execute multi-agent tasks using intelligent batching for token efficiency.

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.

SKILL.md Source

# /batch

> Execute multi-agent tasks using intelligent batching for token efficiency.

## Usage
```
/batch "<task>" [--max-agents <n>] [--batch-size <n>]
```

## What It Does
Analyzes task complexity, identifies required agents, groups them into optimal batches, and executes batches sequentially (agents within each batch run in parallel). Each batch gets a dedicated context window. Results are written to files and synthesized by an orchestrator. Achieves 60-77% token savings vs naive parallel execution.

## Implementation
1. **Analyze task** -- detect complexity (1-10), identify required agents.
2. **Plan batches** -- group agents into batches of 3-5 (cohesive grouping).
3. **Execute Batch 1** -- run first group, write results to `work/batch1-results.md`.
4. **Execute Batch 2** -- read Batch 1 results, run second group, write to `work/batch2-results.md`.
5. **Synthesize** -- orchestrator reads all batch results, produces final output.

| Complexity | Batch Size | Example |
|------------|------------|---------|
| 1-3 | 1-2 agents | Fix typo, add logging |
| 4-5 | 3 agents | Add API endpoint with tests |
| 6-7 | 5 agents | Build feature with frontend/backend |
| 8-10 | 8 agents | Full system redesign |

## Examples
```bash
# Full-stack feature
/batch "Build user authentication with React frontend, Go backend, and tests"

# Performance work
/batch "Optimize database queries and add caching layer"

# Security audit
/batch "Security assessment of payment processing system"
```