[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78WZ9YYRFMWWMB9D2J7538W":3,"skill-same:01M78WZ9YYRFMWWMB9D2J7538W":56},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":33,"commitSha":34,"skillDirectory":35,"forksCount":36,"repositoryHtmlUrl":37,"repositoryHomepageUrl":6,"ownerHtmlUrl":38,"ownerBlogUrl":39,"ownerDescription":40,"updatedAt":41,"install":42,"resources":55},"01M78WZ9YYRFMWWMB9D2J7538W","anth-core-workflow-b",null,"Build Claude streaming and Message Batches API workflows.\nUse when implementing real-time streaming responses, SSE event handling,\nor processing bulk requests with the 50% cheaper Batches API.\nTrigger with phrases like \"claude streaming\", \"anthropic batch\",\n\"message batches api\", \"SSE events anthropic\", \"stream claude response\".","jukeyman\u002Fjukeyman-skills","jukeyman","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F142960420?v=4","01M78FR4Y3DHMMCBCC0GXXNB3F","RICK JEFFERSON","01M78FR4Z8RVQRAD31Y5J7V6EB",1,"MIT","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsaas-packs--anthropic-pack--anth-core-workflow-b\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: anth-core-workflow-b\ndescription: |\n  Build Claude streaming and Message Batches API workflows.\n  Use when implementing real-time streaming responses, SSE event handling,\n  or processing bulk requests with the 50% cheaper Batches API.\n  Trigger with phrases like \"claude streaming\", \"anthropic batch\",\n  \"message batches api\", \"SSE events anthropic\", \"stream claude response\".\nallowed-tools: Read, Write, Edit, Bash(npm:*), Grep\nversion: 1.0.0\nlicense: MIT\nauthor: Jeremy Longshore \u003Cjeremy@intentsolutions.io>\ntags: [saas, ai, anthropic]\ncompatible-with: claude-code\n---\n\n# Anthropic Core Workflow B — Streaming & Batches\n\n## Overview\n\nTwo complementary patterns: real-time streaming for interactive UIs (SSE events via `POST \u002Fv1\u002Fmessages` with `stream: true`) and the Message Batches API (`POST \u002Fv1\u002Fmessages\u002Fbatches`) for processing up to 100,000 requests asynchronously at 50% cost reduction.\n\n## Prerequisites\n\n- Completed `anth-install-auth` setup\n- Familiarity with `anth-core-workflow-a` (Messages API basics)\n- For batches: understanding of async\u002Fpolling patterns\n\n## Instructions\n\n### Streaming — Python SDK\n\n```python\nimport anthropic\n\nclient = anthropic.Anthropic()\n\n# Method 1: High-level streaming (recommended)\nwith client.messages.stream(\n    model=\"claude-sonnet-4-20250514\",\n    max_tokens=2048,\n    messages=[{\"role\": \"user\", \"content\": \"Write a short story about a robot.\"}]\n) as stream:\n    for text in stream.text_stream:\n        print(text, end=\"\", flush=True)\n\n    # After stream completes, access full message\n    final_message = stream.get_final_message()\n    print(f\"\\nUsage: {final_message.usage.input_tokens}+{final_message.usage.output_tokens}\")\n\n# Method 2: Event-level streaming (for custom event handling)\nwith client.messages.stream(\n    model=\"claude-sonnet-4-20250514\",\n    max_tokens=2048,\n    messages=[{\"role\": \"user\", \"content\": \"Explain REST APIs.\"}]\n) as stream:\n    for event in stream:\n        if event.type == \"content_block_delta\":\n            if event.delta.type == \"text_delta\":\n                print(event.delta.text, end=\"\")\n        elif event.type == \"message_stop\":\n            print(\"\\n[Stream complete]\")\n```\n\n### Streaming — TypeScript SDK\n\n```typescript\nimport Anthropic from '@anthropic-ai\u002Fsdk';\n\nconst client = new Anthropic();\n\n\u002F\u002F High-level streaming\nconst stream = client.messages.stream({\n  model: 'claude-sonnet-4-20250514',\n  max_tokens: 2048,\n  messages: [{ role: 'user', content: 'Write a haiku about code.' }],\n});\n\nstream.on('text', (text) => process.stdout.write(text));\nstream.on('finalMessage', (msg) => {\n  console.log(`\\nTokens: ${msg.usage.input_tokens}+${msg.usage.output_tokens}`);\n});\n\nawait stream.finalMessage();\n```\n\n### Streaming with Tool Use\n\n```python\nwith client.messages.stream(\n    model=\"claude-sonnet-4-20250514\",\n    max_tokens=1024,\n    tools=tools,  # Same tools array from core-workflow-a\n    messages=[{\"role\": \"user\", \"content\": \"What's the weather?\"}]\n) as stream:\n    for event in stream:\n        if event.type == \"content_block_start\":\n            if event.content_block.type == \"tool_use\":\n                print(f\"Tool call: {event.content_block.name}\")\n        elif event.type == \"content_block_delta\":\n            if event.delta.type == \"input_json_delta\":\n                print(event.delta.partial_json, end=\"\")  # Tool input arrives incrementally\n```\n\n### Message Batches API — Bulk Processing\n\n```python\n# Create a batch of up to 100,000 requests (50% cost savings)\nbatch = client.messages.batches.create(\n    requests=[\n        {\n            \"custom_id\": \"req-001\",\n            \"params\": {\n                \"model\": \"claude-sonnet-4-20250514\",\n                \"max_tokens\": 1024,\n                \"messages\": [{\"role\": \"user\", \"content\": \"Summarize: ...article1...\"}]\n            }\n        },\n        {\n            \"custom_id\": \"req-002\",\n            \"params\": {\n                \"model\": \"claude-sonnet-4-20250514\",\n                \"max_tokens\": 1024,\n                \"messages\": [{\"role\": \"user\", \"content\": \"Summarize: ...article2...\"}]\n            }\n        },\n        # ... up to 100,000 requests\n    ]\n)\n\nprint(f\"Batch ID: {batch.id}\")          # msgbatch_01HBMt...\nprint(f\"Status: {batch.processing_status}\")  # in_progress\nprint(f\"Counts: {batch.request_counts}\")     # {processing: 2, succeeded: 0, ...}\n```\n\n### Poll for Batch Completion\n\n```python\nimport time\n\nwhile True:\n    batch_status = client.messages.batches.retrieve(batch.id)\n    if batch_status.processing_status == \"ended\":\n        break\n    print(f\"Processing... {batch_status.request_counts}\")\n    time.sleep(30)\n\n# Stream results (returns JSONL)\nfor result in client.messages.batches.results(batch.id):\n    if result.result.type == \"succeeded\":\n        text = result.result.message.content[0].text\n        print(f\"[{result.custom_id}]: {text[:100]}...\")\n    elif result.result.type == \"errored\":\n        print(f\"[{result.custom_id}] ERROR: {result.result.error}\")\n```\n\n## SSE Event Types Reference\n\n| Event | Description | Key Fields |\n|-------|-------------|------------|\n| `message_start` | Stream begins | `message.id`, `message.model`, `message.usage` |\n| `content_block_start` | New content block | `content_block.type` (text\u002Ftool_use) |\n| `content_block_delta` | Incremental content | `delta.text` or `delta.partial_json` |\n| `content_block_stop` | Block complete | `index` |\n| `message_delta` | Message-level update | `delta.stop_reason`, `usage.output_tokens` |\n| `message_stop` | Stream complete | (empty) |\n| `ping` | Keepalive | (empty) |\n\n## Error Handling\n\n| Error | Cause | Solution |\n|-------|-------|----------|\n| Stream disconnects mid-response | Network timeout | Implement reconnection with partial content |\n| Batch `expired` status | Not processed within 24h | Resubmit batch |\n| `errored` results in batch | Individual request invalid | Check `result.error` for each failed request |\n| 429 on batch creation | Too many concurrent batches | Wait; limit is ~100 concurrent batches |\n\n## Resources\n\n- [Streaming Messages](https:\u002F\u002Fdocs.anthropic.com\u002Fen\u002Fapi\u002Fmessages-streaming)\n- [Message Batches API](https:\u002F\u002Fdocs.anthropic.com\u002Fen\u002Fapi\u002Fcreating-message-batches)\n- [Batch Results](https:\u002F\u002Fdocs.anthropic.com\u002Fen\u002Fapi\u002Fretrieving-message-batch-results)\n\n## Next Steps\n\nFor common errors, see `anth-common-errors`.\n","# Anthropic Core Workflow B — Streaming & Batches\n\n## Overview\n\nTwo complementary patterns: real-time streaming for interactive UIs (SSE events via `POST \u002Fv1\u002Fmessages` with `stream: true`) and the Message Batches API (`POST \u002Fv1\u002Fmessages\u002Fbatches`) for processing up to 100,000 requests asynchronously at 50% cost reduction.\n\n## Prerequisites\n\n- Completed `anth-install-auth` setup\n- Familiarity with `anth-core-workflow-a` (Messages API basics)\n- For batches: understanding of async\u002Fpolling patterns\n\n## Instructions\n\n### Streaming — Python SDK\n\n```python\nimport anthropic\n\nclient = anthropic.Anthropic()\n\n# Method 1: High-level streaming (recommended)\nwith client.messages.stream(\n    model=\"claude-sonnet-4-20250514\",\n    max_tokens=2048,\n    messages=[{\"role\": \"user\", \"content\": \"Write a short story about a robot.\"}]\n) as stream:\n    for text in stream.text_stream:\n        print(text, end=\"\", flush=True)\n\n    # After stream completes, access full message\n    final_message = stream.get_final_message()\n    print(f\"\\nUsage: {final_message.usage.input_tokens}+{final_message.usage.output_tokens}\")\n\n# Method 2: Event-level streaming (for custom event handling)\nwith client.messages.stream(\n    model=\"claude-sonnet-4-20250514\",\n    max_tokens=2048,\n    messages=[{\"role\": \"user\", \"content\": \"Explain REST APIs.\"}]\n) as stream:\n    for event in stream:\n        if event.type == \"content_block_delta\":\n            if event.delta.type == \"text_delta\":\n                print(event.delta.text, end=\"\")\n        elif event.type == \"message_stop\":\n            print(\"\\n[Stream complete]\")\n```\n\n### Streaming — TypeScript SDK\n\n```typescript\nimport Anthropic from '@anthropic-ai\u002Fsdk';\n\nconst client = new Anthropic();\n\n\u002F\u002F High-level streaming\nconst stream = client.messages.stream({\n  model: 'claude-sonnet-4-20250514',\n  max_tokens: 2048,\n  messages: [{ role: 'user', content: 'Write a haiku about code.' }],\n});\n\nstream.on('text', (text) => process.stdout.write(text));\nstream.on('finalMessage', (msg) => {\n  console.log(`\\nTokens: ${msg.usage.input_tokens}+${msg.usage.output_tokens}`);\n});\n\nawait stream.finalMessage();\n```\n\n### Streaming with Tool Use\n\n```python\nwith client.messages.stream(\n    model=\"claude-sonnet-4-20250514\",\n    max_tokens=1024,\n    tools=tools,  # Same tools array from core-workflow-a\n    messages=[{\"role\": \"user\", \"content\": \"What's the weather?\"}]\n) as stream:\n    for event in stream:\n        if event.type == \"content_block_start\":\n            if event.content_block.type == \"tool_use\":\n                print(f\"Tool call: {event.content_block.name}\")\n        elif event.type == \"content_block_delta\":\n            if event.delta.type == \"input_json_delta\":\n                print(event.delta.partial_json, end=\"\")  # Tool input arrives incrementally\n```\n\n### Message Batches API — Bulk Processing\n\n```python\n# Create a batch of up to 100,000 requests (50% cost savings)\nbatch = client.messages.batches.create(\n    requests=[\n        {\n            \"custom_id\": \"req-001\",\n            \"params\": {\n                \"model\": \"claude-sonnet-4-20250514\",\n                \"max_tokens\": 1024,\n                \"messages\": [{\"role\": \"user\", \"content\": \"Summarize: ...article1...\"}]\n            }\n        },\n        {\n            \"custom_id\": \"req-002\",\n            \"params\": {\n                \"model\": \"claude-sonnet-4-20250514\",\n                \"max_tokens\": 1024,\n                \"messages\": [{\"role\": \"user\", \"content\": \"Summarize: ...article2...\"}]\n            }\n        },\n        # ... up to 100,000 requests\n    ]\n)\n\nprint(f\"Batch ID: {batch.id}\")          # msgbatch_01HBMt...\nprint(f\"Status: {batch.processing_status}\")  # in_progress\nprint(f\"Counts: {batch.request_counts}\")     # {processing: 2, succeeded: 0, ...}\n```\n\n### Poll for Batch Completion\n\n```python\nimport time\n\nwhile True:\n    batch_status = client.messages.batches.retrieve(batch.id)\n    if batch_status.processing_status == \"ended\":\n        break\n    print(f\"Processing... {batch_status.request_counts}\")\n    time.sleep(30)\n\n# Stream results (returns JSONL)\nfor result in client.messages.batches.results(batch.id):\n    if result.result.type == \"succeeded\":\n        text = result.result.message.content[0].text\n        print(f\"[{result.custom_id}]: {text[:100]}...\")\n    elif result.result.type == \"errored\":\n        print(f\"[{result.custom_id}] ERROR: {result.result.error}\")\n```\n\n## SSE Event Types Reference\n\n| Event | Description | Key Fields |\n|-------|-------------|------------|\n| `message_start` | Stream begins | `message.id`, `message.model`, `message.usage` |\n| `content_block_start` | New content block | `content_block.type` (text\u002Ftool_use) |\n| `content_block_delta` | Incremental content | `delta.text` or `delta.partial_json` |\n| `content_block_stop` | Block complete | `index` |\n| `message_delta` | Message-level update | `delta.stop_reason`, `usage.output_tokens` |\n| `message_stop` | Stream complete | (empty) |\n| `ping` | Keepalive | (empty) |\n\n## Error Handling\n\n| Error | Cause | Solution |\n|-------|-------|----------|\n| Stream disconnects mid-response | Network timeout | Implement reconnection with partial content |\n| Batch `expired` status | Not processed within 24h | Resubmit batch |\n| `errored` results in batch | Individual request invalid | Check `result.error` for each failed request |\n| 429 on batch creation | Too many concurrent batches | Wait; limit is ~100 concurrent batches |\n\n## Resources\n\n- [Streaming Messages](https:\u002F\u002Fdocs.anthropic.com\u002Fen\u002Fapi\u002Fmessages-streaming)\n- [Message Batches API](https:\u002F\u002Fdocs.anthropic.com\u002Fen\u002Fapi\u002Fcreating-message-batches)\n- [Batch Results](https:\u002F\u002Fdocs.anthropic.com\u002Fen\u002Fapi\u002Fretrieving-message-batch-results)\n\n## Next Steps\n\nFor common errors, see `anth-common-errors`.\n",{"name":5,"tags":24,"author":28,"license":15,"version":29,"description":30,"allowed-tools":31,"compatible-with":32},[25,26,27],"saas","ai","anthropic","Jeremy Longshore \u003Cjeremy@intentsolutions.io>","1.0.0","Build Claude streaming and Message Batches API workflows.\nUse when implementing real-time streaming responses, SSE event handling,\nor processing bulk requests with the 50% cheaper Batches API.\nTrigger with phrases like \"claude streaming\", \"anthropic batch\",\n\"message batches api\", \"SSE events anthropic\", \"stream claude response\".\n","Read, Write, Edit, Bash(npm:*), Grep","claude-code","main","99825ad3f3bcc6597ddcc7294a14e6e922f2b67b","skills\u002Fsaas-packs--anthropic-pack--anth-core-workflow-b",0,"https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills","https:\u002F\u002Fgithub.com\u002Fjukeyman","https:\u002F\u002FRJBUSINESSSOLUTIONS.ORG","Credit and Finance Expert | Developer\r\n\r\nI'm Rick Jefferson, a seasoned credit and finance expert with over a decade of experience in financial literacy,","2026-07-13 07:03:29",{"source":8,"skillName":5,"commands":43,"prompt":53,"zipAvailable":54},[44,47,50],{"tool":45,"command":46},"npx","npx skills add jukeyman\u002Fjukeyman-skills --skill anth-core-workflow-b",{"tool":48,"command":49},"bunx","bunx skills add jukeyman\u002Fjukeyman-skills --skill anth-core-workflow-b",{"tool":51,"command":52},"pnpm","pnpm dlx skills add jukeyman\u002Fjukeyman-skills --skill anth-core-workflow-b","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fsaas-packs--anthropic-pack--anth-core-workflow-b\u002FSKILL.md",true,[],[57,64,71,78,85,93],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":61,"categories":62,"keywords":63,"publishedAt":19},"01M79ANS2SM329NEP5ZCX106RR","zustand-store-creator","Create zustand store creator operations. Auto-activating skill for Frontend Development.\nTriggers on: zustand store creator, zustand store creator\nPart of the Frontend Development skill category. Use when working with zustand store creator functionality. Trigger with phrases like \"zustand store creator\", \"zustand creator\", \"zustand\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzustand-store-creator\u002FSKILL.md",[],[],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":19},"01M79AMZKP4YDEZ7EHG1Y7PP74","zero-trust-config-helper","Configure with zero trust config helper operations. Auto-activating skill for Security Advanced.\nTriggers on: zero trust config helper, zero trust config helper\nPart of the Security Advanced skill category. Use when configuring systems or services. Trigger with phrases like \"zero trust config helper\", \"zero helper\", \"zero\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzero-trust-config-helper\u002FSKILL.md",[],[],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":19},"01M79AMJSBCEJQNBTYNAHYN5HM","zapier-integration-helper","Assist with zapier integration helper operations. Auto-activating skill for Business Automation.\nTriggers on: zapier integration helper, zapier integration helper\nPart of the Business Automation skill category. Use when working with APIs or building integrations. Trigger with phrases like \"zapier integration helper\", \"zapier helper\", \"zapier\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fzapier-integration-helper\u002FSKILL.md",[],[],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":19},"01M79AHJZGVMARS13VFQYRR1MP","yaml-config-validator","Validate yaml config validator operations. Auto-activating skill for DevOps Basics.\nTriggers on: yaml config validator, yaml config validator\nPart of the DevOps Basics skill category. Use when configuring systems or services. Trigger with phrases like \"yaml config validator\", \"yaml validator\", \"yaml\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fyaml-config-validator\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":89,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M79AHGDZRN0020RDQSQDPAM8","xvary-stock-research","Thesis-driven equity analysis from public SEC EDGAR and market data; \u002Fanalyze, \u002Fscore, \u002Fcompare workflows with bundled Python tools (Claude Code, Cursor, Codex).","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxvary-stock-research\u002FSKILL.md",[],[],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":19},"01M79AHCYJ9FV9RMHQ24HDRN33","xss-vulnerability-scanner","Scan xss vulnerability scanner operations. Auto-activating skill for Security Fundamentals.\nTriggers on: xss vulnerability scanner, xss vulnerability scanner\nPart of the Security Fundamentals skill category. Use when working with xss vulnerability scanner functionality. Trigger with phrases like \"xss vulnerability scanner\", \"xss scanner\", \"xss\".","https:\u002F\u002Fgithub.com\u002Fjukeyman\u002Fjukeyman-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxss-vulnerability-scanner\u002FSKILL.md",[],[]]