Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use Anthropic Message Batches for async bulk processing and event handling. Use when working with webhooks-events patterns. Trigger with "anthropic batches", "claude batch api", "anthropic async", "bulk claude processing", "anthropic webhook".
.claude/skills/jeremylongshore-clade-webhooks-events/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-09 | ✗→✓ | ▲ Improved | 22% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 73% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 3% | 0% |
| case-18 | ✗→✓ | ▲ Improved | 70% | 0% |
| case-01 | ✓→✓ | = Same ✓ | 48% | 0% |
Anthropic doesn't have traditional webhooks. Instead, use Message Batches for async bulk processing — up to 10,000 requests per batch at 50% off, with a 24-hour processing SLA.
clade-install-authtypescriptimport Anthropic from '@claude-ai/sdk'; const client = new Anthropic(); const batch = await client.messages.batches.create({ requests: documents.map((doc, i) => ({ custom_id: `doc-${i}`, params: { model: 'claude-sonnet-4-20250514', max_tokens: 1024, messages: [{ role: 'user', content: `Summarize: ${doc.text}` }], }, })), }); console.log(`Batch ${batch.id} created — ${batch.request_counts.processing} processing`);
typescriptasync function waitForBatch(batchId: string): Promise<Anthropic.Messages.MessageBatch> { while (true) { const batch = await client.messages.batches.retrieve(batchId); if (batch.processing_status === 'ended') { console.log(`Batch complete: Succeeded: ${batch.request_counts.succeeded} Errored: ${batch.request_counts.errored} Expired: ${batch.request_counts.expired}`); return batch; } console.log(`Processing... ${batch.request_counts.processing} remaining`); await new Promise(r => setTimeout(r, 30_000)); // Check every 30s } }
typescriptconst results = await client.messages.batches.results(batch.id); for await (const result of results) { if (result.result.type === 'succeeded') { const text = result.result.message.content[0].text; console.log(`${result.custom_id}: ${text.substring(0, 100)}...`); } else { console.error(`${result.custom_id}: ${result.result.type} — ${result.result.error?.message}`); } }
pythonimport anthropic import time client = anthropic.Anthropic() batch = client.messages.batches.create( requests=[ { "custom_id": f"doc-{i}", "params": { "model": "claude-sonnet-4-20250514", "max_tokens": 1024, "messages": [{"role": "user", "content": f"Summarize: {doc}"}], }, } for i, doc in enumerate(documents) ] ) # Poll while batch.processing_status != "ended": time.sleep(30) batch = client.messages.batches.retrieve(batch.id) # Get results for result in client.messages.batches.results(batch.id): if result.result.type == "succeeded": print(result.custom_id, result.result.message.content[0].text[:100])
| Limit | Value | |-------|-------| | Max requests per batch | 10,000 | | Max concurrent batches | 100 | | Processing SLA | 24 hours | | Pricing | 50% of standard per-token pricing | | Result availability | 29 days after creation |
| Result Type | Meaning | Action | |-------------|---------|--------| | succeeded | Normal response | Process result.message | | errored | API error | Check result.error — retry failed items in new batch | | expired | Not processed within 24h | Resubmit in new batch | | canceled | Batch was canceled | Resubmit if needed |
See Step 1 (batch creation), Step 2 (polling), Step 3 (result retrieval), Python example, and Batch Limits table above.
See clade-ci-integration for using batches in CI pipelines.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | pass→pass | 10,689 | 10,755 | +1% | 1 | 1 | 0% | 2,200 | 3,265 | +48% | 0 | 0 | — |
case-06 | pass→pass | 8,055 | 2,330 | -71% | 1 | 1 | 0% | 1,575 | 1,592 | +1% | 0 | 0 | — |
case-02 | pass→pass | 12,241 | 10,303 | -16% | 1 | 1 | 0% | 2,418 | 3,518 | +45% | 0 | 0 | — |
case-03 | pass→pass | 12,867 | 10,264 | -20% | 1 | 1 | 0% | 2,673 | 3,386 | +27% | 0 | 0 | — |
case-04 | pass→pass | 5,733 | 3,951 | -31% | 1 | 1 | 0% | 978 | 1,759 | +80% | 0 | 0 | — |
case-05 | pass→pass | 6,627 | 6,144 | -7% | 1 | 1 | 0% | 1,228 | 2,571 | +109% | 0 | 0 | — |
case-07 | pass→pass | 9,550 | 3,446 | -64% | 1 | 1 | 0% | 1,593 | 1,666 | +5% | 0 | 0 | — |
case-08 | pass→pass | 4,238 | 1,444 | -66% | 1 | 1 | 0% | 640 | 1,320 | +106% | 0 | 0 | — |
case-09 | fail→pass | 11,566 | 6,568 | -43% | 1 | 1 | 0% | 1,934 | 2,359 | +22% | 0 | 0 | — |
case-10 | fail→pass | 5,890 | 5,100 | -13% | 1 | 1 | 0% | 1,242 | 2,144 | +73% | 0 | 0 | — |
case-11 | pass→pass | 3,232 | 2,051 | -37% | 1 | 1 | 0% | 504 | 1,495 | +197% | 0 | 0 | — |
case-12 | pass→pass | 4,357 | 2,430 | -44% | 1 | 1 | 0% | 881 | 1,546 | +75% | 0 | 0 | — |
case-13 | pass→pass | 4,748 | 2,966 | -38% | 1 | 1 | 0% | 766 | 1,618 | +111% | 0 | 0 | — |
case-14 | pass→pass | 6,563 | 3,934 | -40% | 1 | 1 | 0% | 1,434 | 2,004 | +40% | 0 | 0 | — |
case-15 | fail→pass | 8,793 | 2,728 | -69% | 1 | 1 | 0% | 1,584 | 1,630 | +3% | 0 | 0 | — |
case-16 | pass→pass | 14,870 | 10,069 | -32% | 1 | 1 | 0% | 2,600 | 3,165 | +22% | 0 | 0 | — |
case-17 | pass→pass | 9,390 | 7,053 | -25% | 1 | 1 | 0% | 1,603 | 2,552 | +59% | 0 | 0 | — |
case-18 | fail→pass | 5,118 | 3,032 | -41% | 1 | 1 | 0% | 1,012 | 1,718 | +70% | 0 | 0 | — |
case-19 | pass→pass | 14,277 | 6,249 | -56% | 1 | 1 | 0% | 2,458 | 2,296 | -7% | 0 | 0 | — |
case-20 | pass→pass | 16,986 | 13,016 | -23% | 1 | 1 | 0% | 2,957 | 3,653 | +24% | 0 | 0 | — |
case-21 | pass→pass | 8,349 | 2,265 | -73% | 1 | 1 | 0% | 1,654 | 1,572 | -5% | 0 | 0 | — |
case-22 | pass→pass | 7,927 | 2,495 | -69% | 1 | 1 | 0% | 1,580 | 1,490 | -6% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +18 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.