Agent skill

Batch API Orchestrator

by borghei in borghei/Claude-Skills

This skill should be used when the user asks to "batch LLM requests", "should I use the batch API", "estimate batch vs realtime cost", "design a bulk LLM job", or "process thousands of prompts…

MITAuto-check passed

Install Batch API Orchestrator

skills CLI
$ npx skills add borghei/Claude-Skills --skill batch-api-orchestrator -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install borghei/Claude-Skills batch-api-orchestrator --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/borghei/Claude-Skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/engineering/batch-api-orchestrator .claude/skills/batch-api-orchestrator && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
batch-api-orchestrator
GitHub stars
874
Token cost
~1.5k tokens
SKILL.md length
624 words
Files
5 (incl. scripts, references)
Skills in repo
364
Repo updated
First seen
Licence
MIT

At a glance

This skill should be used when the user asks to "batch LLM requests", "should I use the batch API", "estimate batch vs realtime cost", "design a bulk LLM job", or "process thousands of prompts…

  • Works in 2 steps: Decide batch vs realtime, then size the… → Design a resilient bulk job
  • Asks to batch LLM requests
  • SKILL.md covers Overview, Clarify First, Quick Start and Tools Overview, plus 3 more sections
  • Runs Python scripts from its folder; calls python

What it does

Batch API Orchestrator is an agent skill from borghei/Claude-Skills. This skill should be used when the user asks to "batch LLM requests", "should I use the batch API", "estimate batch vs realtime cost", "design a bulk LLM job", or "process thousands of prompts cheaply".

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including scripts and reference files (for example `references/batch-patterns-and-decision-tree.md`, `references/cost-and-throughput-economics.md` and `scripts/batch_cost_estimator.py`).

The repository describes itself as: 385 AI skills, 77 expert agents, and 900 stdlib Python tools for every team: engineering, PM, marketing, C-level, compliance, business ops, research, and a LinkedIn toolkit… The licence is MIT.

When your agent uses it

  • Asks to batch LLM requests
  • Should I use the batch API
  • Estimate batch vs realtime cost
  • Design a bulk LLM job

Example prompts

  • “batch LLM requests”
  • “should I use the batch API”
  • “estimate batch vs realtime cost”
  • “/batch-api-orchestrator”

Requirements

  • Python 3

Workflow steps

2 steps, taken from the step headings in SKILL.md.

  1. Decide batch vs realtime, then size the cost
  2. Design a resilient bulk job

What it can do on your machine

Read from SKILL.md and the folder at commit c9a1487. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Batch API Orchestrator loads about 1.5k tokens when it runs, and up to ~4.2k if it reads all its reference files. Until then it costs about 56 tokens; SKILL.md has 624 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~56
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from borghei/Claude-Skills at commit c9a1487, republished under its MIT licence (© borghei). 624 words, ~1,504 tokens.

Download SKILL.mdSave it as .claude/skills/batch-api-orchestrator/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
batch-api-orchestrator
description
This skill should be used when the user asks to "batch LLM requests", "should I use the batch API", "estimate batch vs realtime cost", "design a bulk LLM job", or "process thousands of prompts cheaply".
license
MIT + Commons Clause
metadata.version
1.0.0
metadata.author
borghei
metadata.category
engineering
metadata.domain
ai-engineering
metadata.updated
2026-06-29
metadata.tags
batch-api, llm, cost-optimization, throughput, async

Batch API Orchestrator

Category: Engineering Domain: AI Engineering

Overview

Decide when to run LLM work through an asynchronous batch API versus realtime/streaming, then design the job so it is cheap, idempotent, and resilient to partial failure. Batch APIs typically cost roughly half of realtime in exchange for higher latency (results arrive over minutes to hours, not milliseconds), which makes them ideal for evals, backfills, embeddings, and bulk classification/extraction — and wrong for anything a human is waiting on. This skill is model- and vendor-agnostic: it reasons about the batch pattern, not any one provider's API.

Clarify First

Before recommending or designing a batch job, confirm these inputs. If any is unknown or vague, ASK — do not assume:

  • Latency tolerance — is a human waiting (interactive), or can results land in minutes/hours? (sets --latency-tolerance and the batch-vs-realtime verdict)
  • Volume & token shape — how many requests, and the average input/output tokens each? (sets --requests, --avg-input-tokens, --avg-output-tokens for the cost estimate)
  • Pricing & discount — your realtime per-token prices and the batch discount your vendor offers (sets --realtime-input-price, --realtime-output-price, --batch-discount; defaults are neutral placeholders, not real prices)

Stop rule: ask only the 2-3 that most change the output. If the user says "just draft it," proceed and list your assumptions.

Quick Start

bash
cd engineering/batch-api-orchestrator

# 1. Should this be batch or realtime, and what does it cost?
python scripts/batch_cost_estimator.py \
  --requests 50000 --avg-input-tokens 800 --avg-output-tokens 200 \
  --realtime-input-price 3.0 --realtime-output-price 15.0 \
  --batch-discount 0.5 --latency-tolerance hours

# 2. Plan the chunking / idempotency / retry strategy for the job
python scripts/batch_job_planner.py \
  --total-items 50000 --max-batch-size 10000 --retry-policy exponential --json

Tools Overview

ToolPurposeKey Flags
scripts/batch_cost_estimator.pyCompare realtime vs batch cost, show savings, and recommend batch or realtime given latency tolerance--requests, --avg-input-tokens, --avg-output-tokens, --realtime-input-price, --realtime-output-price, --batch-discount, --latency-tolerance, --json
scripts/batch_job_planner.pyProduce a chunking + idempotency + partial-failure plan for a bulk job--total-items, --max-batch-size, --retry-policy, --max-retries, --json

Both scripts: Python 3 standard library only, argparse CLI, --json and human-readable output. Run --help for full usage.

Workflows

1. Decide batch vs realtime, then size the cost
  1. Gather volume and token shape (--requests, --avg-input-tokens, --avg-output-tokens).
  2. Plug in your vendor prices and batch discount — never assume them.
  3. Run batch_cost_estimator.py with the real --latency-tolerance (realtime, minutes, or hours).
  4. Read the verdict: if work is interactive, the tool recommends realtime regardless of savings; otherwise it quantifies the batch savings.
  5. Sanity-check against the decision tree in references/batch-patterns-and-decision-tree.md.
Show full SKILL.md (285 more words)Show less
2. Design a resilient bulk job
  1. Run batch_job_planner.py with --total-items, --max-batch-size, and a --retry-policy.
  2. Adopt the generated idempotency-key scheme so re-submitting a chunk never double-charges or double-writes.
  3. Wire result reconciliation: match every output back to its request id, and collect the unmatched into a dead-letter set.
  4. Apply the partial-failure handling (retry only failed items, never the whole batch) from the reference.
  5. Choose polling vs callback for completion, per the reference guidance.

Reference Documentation

  • references/batch-patterns-and-decision-tree.md — when-to-batch decision tree; job design (idempotency keys, partial failures, reconciliation, polling vs callback); fitting use cases (evals, backfills, embeddings, bulk classification/extraction); and anti-patterns such as batching interactive requests.
  • references/cost-and-throughput-economics.md — the cost/throughput tradeoff in depth: the ~half-cost rule of thumb, throughput vs latency, queueing, chunk sizing, and how to model the break-even between a faster realtime path and a cheaper batch path.

Common Patterns

  • Batch the patient, stream the impatient — if no human is blocked on the result, default to batch for the cost win; reserve realtime/streaming for interactive UX.
  • Idempotency key per item — derive a stable key (e.g. hash of input + job version) so retries and re-submissions are safe and never double-billed.
  • Retry the item, not the batch — on partial failure, re-enqueue only the failed request ids; resubmitting the whole chunk wastes money and re-runs successes.
  • Reconcile by request id — never rely on output ordering; join results back to inputs by id and route the unmatched to a dead-letter queue for inspection.
  • Right-size chunks — split by the vendor's max-batch limit and by your own blast-radius tolerance, not into one giant job whose failure is all-or-nothing.
  • Embeddings and evals are the sweet spot — large, latency-insensitive, embarrassingly parallel workloads capture the full batch discount with the least risk.

© borghei, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (scripts, references) in engineering/batch-api-orchestrator of borghei/Claude-Skills.

  • SKILL.md
  • references/batch-patterns-and-decision-tree.md
  • references/cost-and-throughput-economics.md
  • scripts/batch_cost_estimator.py
  • scripts/batch_job_planner.py

Open the folder on GitHubat commit c9a1487

Compare with similar skills

Batch API Orchestrator next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Batch API Orchestrator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Batch API Orchestrator this skillborghei/Claude-Skills874—~1.5kAutomated safety check: PassMIT
Orchestrate Batch Refactorsickn33/agentic-awesome-skills47k2 repos~980Automated safety check: PassMIT
Batchasgeirtj/system_prompts_leaks69k—~1.3kAutomated safety check: PassCC0-1.0
Batch Orchestrationrohitg00/pro-workflow2.9k—~1.2kAutomated safety check: PassNone
Batchcodewhale-hq/Codewhale41k—~157Automated safety check: PassMIT
Team Agent Orchestrationaffaan-m/ECC274k1 repos~1.2kAutomated safety check: PassMIT

Similar skills

  • Orchestrate Batch Refactor

    sickn33/agentic-awesome-skills

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

    47k GitHub starsUsed in 2 repos~980 tokens
    DevelopmentAuto-check passed
  • Batch

    asgeirtj/system_prompts_leaks

    Research and plan a large-scale change, then execute it in parallel across 5–30 isolated worktree agents that each open a PR.

    69k GitHub stars~1.3k tokensUpdated 2 days ago
    DevelopmentAuto-check passed
  • Batch Orchestration

    rohitg00/pro-workflow

    Decompose large-scale changes into independent units and spawn parallel agents in isolated worktrees.

    2.9k GitHub stars~1.2k tokensUpdated 8 days ago
    Agent WorkflowsAuto-check passed
  • Batch

    codewhale-hq/Codewhale

    Break a large, parallelizable goal into bounded work units, coordinate existing agent/worktree machinery, integrate, and verify.

    41k GitHub stars~157 tokensUpdated yesterday
    DevelopmentAuto-check passed
  • Run team-based orchestration for agent squads: work items with owners and scope, agent Kanban state, branch isolation, control pane visibility, and merge gates.

    274k GitHub starsUsed in 1 repo~1.2k tokens
    Productivity & AutomationAuto-check passed
  • Orca Orchestration

    stablyai/orca

    Coordinate supervised Orca workers: threaded messages, blocking ask/reply, task dispatch, worker_done/escalation waits, task DAGs, decision gates, coordinator…

    87k GitHub stars~916 tokensUpdated yesterday
    Agent WorkflowsAuto-check passed

More from borghei/Claude-Skills

All 364 skills in this repo
  • Agents In The Team

    borghei/Claude-Skills

    Run delivery when AI coding and ops agents take tickets. An agent skill from borghei/Claude-Skills.

    874 GitHub stars~4.2k tokensUpdated yesterday
    Auto-check passed
  • AI Content Disclosure

    borghei/Claude-Skills

    Check AI-generated marketing content and reviews for required disclosures under the EU AI Act, FTC rules and platform AI-label policies.

    874 GitHub stars~3.4k tokensUpdated yesterday
    Auto-check passed
  • AI Prototyping

    borghei/Claude-Skills

    Idea to AI-generated prototype to customer validation to engineering handoff.

    874 GitHub stars~3.6k tokensUpdated yesterday
    Auto-check passed
  • Analytics Engineer

    borghei/Claude-Skills

    Analytics engineering across data modeling, dbt, transformation, and semantic layers.

    874 GitHub stars~3.4k tokensUpdated yesterday
    Auto-check passed
  • Ansoff Matrix

    borghei/Claude-Skills

    Ansoff Matrix — 4-quadrant framework for growth options: market penetration, market/product development, and diversification.

    874 GitHub stars~2.2k tokensUpdated yesterday
    Auto-check passed
  • Brainstorm Okrs

    borghei/Claude-Skills

    OKR brainstorming and validation using the Radical Focus framework — outcome objectives, measurable key results, counter-metrics.

    874 GitHub stars~1.4k tokensUpdated yesterday
    Auto-check passed

Questions about Batch API Orchestrator

What does Batch API Orchestrator do?

This skill should be used when the user asks to "batch LLM requests", "should I use the batch API", "estimate batch vs realtime cost", "design a bulk LLM job", or "process thousands of prompts…. Batch API Orchestrator is an agent skill from borghei/Claude-Skills. This skill should be used when the user asks to "batch LLM requests", "should I use the batch API", "estimate batch vs realtime cost", "design a bulk LLM job", or "process thousands of prompts cheaply".

When should I use Batch API Orchestrator?

Batch API Orchestrator fits situations like: asks to batch LLM requests; should I use the batch API; estimate batch vs realtime cost; design a bulk LLM job.

How do I install Batch API Orchestrator in Claude Code?

Run `npx skills add borghei/Claude-Skills --skill batch-api-orchestrator -a claude-code`. Or copy the skill folder (engineering/batch-api-orchestrator in borghei/Claude-Skills) into .claude/skills/batch-api-orchestrator in your project. Claude Code loads it when a task matches its description.

How do I install Batch API Orchestrator in Codex?

Run `npx skills add borghei/Claude-Skills --skill batch-api-orchestrator -a codex`. Or copy the skill folder (engineering/batch-api-orchestrator in borghei/Claude-Skills) into .agents/skills/batch-api-orchestrator in your project. Codex loads it when a task matches its description.

Can I use Batch API Orchestrator in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add borghei/Claude-Skills --skill batch-api-orchestrator -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/batch-api-orchestrator, .gemini/skills/batch-api-orchestrator, .github/skills/batch-api-orchestrator and .opencode/skills/batch-api-orchestrator in your project.

What does Batch API Orchestrator need to run?

Going by SKILL.md and its folder, Batch API Orchestrator needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Batch API Orchestrator access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Batch API Orchestrator safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Batch API Orchestrator use?

Batch API Orchestrator is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Batch API Orchestrator use?

About 1.5k tokens (SKILL.md is roughly 6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.7k tokens, read only when the agent opens those files.

What are the alternatives to Batch API Orchestrator?

Skills that share tags, products or a category with Batch API Orchestrator: Orchestrate Batch Refactor (sickn33/agentic-awesome-skills, 47k stars), Batch (asgeirtj/system_prompts_leaks, 69k stars), Batch Orchestration (rohitg00/pro-workflow, 2.9k stars) and Batch (codewhale-hq/Codewhale, 41k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Batch API Orchestrator?

borghei (a GitHub user) maintains it in borghei/Claude-Skills, which has 874 GitHub stars. The repository holds 364 skills in this directory. The repository was last updated on October 7, 2026.

Source: borghei/Claude-Skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.