clade-webhooks-events

Featured

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".

AI & Automation 2,944 stars 440 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Anthropic Message Batches & Async Processing ## Overview 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. ## Prerequisites - Completed `clade-install-auth` - Multiple prompts/documents to process in bulk - Tolerance for async processing (results within 24 hours) ## Instructions ### Step 1: Create a Batch ```typescript import 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`); ``` ### Step 2: Poll for Completion ```typescript async 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...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category