batch-processing
Message Batches API for Claude with 50% cost savings on bulk processing. Activate for batch jobs, JSONL processing, bulk analysis, and cost optimization.
npx skills add majiayu000/claude-skill-registry --skill batch-processing-lobbi-docs-claude-2 --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Batch Processing Skill Leverage Anthropic's Message Batches API for 50% cost savings on bulk processing workloads. ## When to Use This Skill - Processing 10K+ documents - Model evaluation and benchmarks - ETL and data enrichment - Training data generation - Bulk content analysis - Any non-time-sensitive workload ## Cost Savings | Processing Type | Cost | |----------------|------| | Standard API | 100% | | **Batch API** | **50%** | **Example:** 1M tokens @ $3/1M = $3 (standard) vs $1.50 (batch) ## Batch Lifecycle ``` Created → Processing → Ended (completed/failed/expired/canceled) ``` - **Processing time:** Up to 24 hours - **Results retention:** 29 days - **Full feature support:** Tools, vision, system prompts ## Core Implementation ### Step 1: Create JSONL File ```python import json # Each line is a complete request requests = [ { "custom_id": "request-1", "params": { "model": "claude-sonnet-4-20250514", "max_tokens": 1024, "messages": [{"role": "user", "content": "Summarize: Document 1..."}] } }, { "custom_id": "request-2", "params": { "model": "claude-sonnet-4-20250514", "max_tokens": 1024, "messages": [{"role": "user", "content": "Summarize: Document 2..."}] } } ] # Write JSO
- When to Use This Skill
- Cost Savings
- Batch Lifecycle
- Core Implementation
- Step 1: Create JSONL File
- Step 2: Submit Batch
- Step 3: Poll for Completion
- Step 4: Stream Results
- Complete Workflow
- Error Handling
- Retry Failed Requests
- Error Types
- API Reference
- Endpoints
What does the batch-processing skill do?
Message Batches API for Claude with 50% cost savings on bulk processing. Activate for batch jobs, JSONL processing, bulk analysis, and cost optimization.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill batch-processing-lobbi-docs-claude-2 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
