Agent skill · software engineering · jeremylongshore
anth-core-workflow-b
Build Claude streaming and Message Batches API workflows.
Why this skill is useful
Adds executable scripts for real-time streaming and bulk processing with the Claude API that are not available in public documentation.
What it needs
Requires npm installed locally. Requires anthropic account access. About 3k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.
What this skill does
Anthropic Core Workflow B — Streaming & Batches Overview Two complementary patterns: real-time streaming for interactive UIs (SSE events via POST /v1/messages with stream: true) and the Message Batches API (POST /v1/messages/batches) for processing up to 100,000 requests asynchronously at 50% cost reduction. Prerequisites Completed anth-install-auth setup Familiarity with anth-core-workflow-a (Messages API basics) For batches: understanding of async/polling patterns Instructions Streaming — Python SDK Streaming — TypeScript SDK Streaming with Tool Use Message Batches API — Bulk Processing Poll for Batch Completion Output The streaming workflow emits ordered text deltas for an interactive caller and ends with a final message containing the stop reason and token usage. The batch workflow returns a durable batch ID, a terminal processing status, and one result per customid; callers must retain that ID and reconcile both successful and errored records before marking the source workload complete. Examples Use streaming for a chat endpoint that should show a response as it is generated: forward text deltas to the browser, then store the final message and usage after messagestop. Use a batch for a nightly summarization job: assign each document a stable customid, submit the requests once, poll until ended, and write every returned result into a table keyed by that ID. A per-item error is a retry or triage item, not a reason to discard successful records from the same batch. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills jeremylongshore/anth-core-workflow-b