shared-subagent-batching

Coordinate parallel per-unit sub-agents with retries and aggregate validation.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/AKCqhzdy/dse-subject-grading --skill shared-subagent-batching
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: shared-subagent-batching
Source: https://github.com/AKCqhzdy/dse-subject-grading/tree/main/skills-v3/shared-subagent-batching
Command: npx skills add https://github.com/AKCqhzdy/dse-subject-grading --skill shared-subagent-batching

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This pattern orchestrates per-unit sub-agents with a controlled batching approach to manage concurrency, retries, and deterministic outputs for multi-unit processing.

Core Features & Use Cases

  • Build a worklist of pending units and launch up to a configurable batch of sub-agents in parallel.
  • Each sub-agent processes exactly one unit and inherits the main agent's model.
  • On completion, validate outputs, retry failed units up to three times, and run a consumer-specific aggregate validation after draining the worklist.
  • Sub-agent prompts are sourced from each consumer skill's references/subagent-prompt-template.md.
  • Ensure one unit per sub-agent call; parallelism comes from many sub-agents running simultaneously.

Quick Start

Configure BATCH_SIZE in env.txt and run the consumer skill to start parallel per-unit sub-agents.

Frequently Asked Questions about shared-subagent-batching

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run sub-agents in parallel with controlled batching?

Sub-agent batching orchestrates parallel per-unit sub-agents by launching up to a configured batch size simultaneously. Each sub-agent processes exactly one unit, ensuring deterministic prompts and outputs before draining the worklist.

How do sub-agent retries work during multi-unit orchestration?

Sub-agent retries work by validating each unit's JSON output upon completion and retrying failed units up to three times. After draining the worklist, a final aggregate validation runs to ensure all units meet consumer-specific requirements.

What is the best way to coordinate multiple sub-agents with deterministic outputs?

The best way to coordinate multiple sub-agents with deterministic outputs is using a launch loop with a fixed batch size. Source sub-agent prompts from a template file, process exactly one unit per call, and validate outputs after draining the worklist.

Can I use a custom prompt template for each sub-agent batch?

Yes, you can use a custom prompt template for each sub-agent batch. Sub-agent prompts are sourced from each consumer skill's references/subagent-prompt-template.md file, ensuring deterministic instructions for every unit processed in the parallel batch.

Does each parallel sub-agent inherit the main agent's model?

Yes, each parallel sub-agent inherits the main agent's model automatically. This ensures consistent behavior across all concurrent sub-agents running within a batch, while processing exactly one unit per sub-agent call for deterministic outputs.

When should I not use batching for sub-agent orchestration?

You should not use batching for sub-agent orchestration when processing a single unit or when strict sequential ordering is required. Batching is designed for multi-unit workflows needing parallel concurrency with validation and retries after draining the worklist.