Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add ArieGoldkin/claude-forge --skill streaming-api-patternsgit clone --depth 1 https://github.com/ArieGoldkin/claude-forgeWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/ariegoldkin/claude-forge/streaming-api-patterns)<a href="https://agentmods.dev/skills/ariegoldkin/claude-forge/streaming-api-patterns"><img src="https://agentmods.dev/badge/skills/ariegoldkin/claude-forge/streaming-api-patterns/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/ariegoldkin/claude-forge/streaming-api-patterns"><img src="https://agentmods.dev/badge/skills/ariegoldkin/claude-forge/streaming-api-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00030 | $0.01532 |
| Opus 5.5 | $0.00012 | $0.00613 |
| Sonnet 5.5 | $0.00006 | $0.00306 |
| Haiku 4.5 | $0.00003 | $0.00153 |
Grade A, and why
streaming-api-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
This is a copy
91% identical to streaming-api-patterns — 20 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.
How it starts
The opening of the file, as written. The whole thing — 255 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Streaming API Patterns
Overview
Modern applications require real-time data delivery. This skill covers Server-Sent Events (SSE) for server-to-client streaming, WebSockets for bidirectional communication, and the Streams API for handling backpressure and efficient data flow.
Core Technologies
1. Server-Sent Events (SSE)
Best for: Server-to-client streaming (LLM responses, notifications)
// Next.js Route Handler
export async function GET(req: Request) {
const encoder = new TextEncoder()
const stream = new ReadableStream({
async start(controller) {
// Send data
controller.enqueue(encoder.encode('data: Hello\n\n'))
// Keep connection alive
const interval = setInterval(() => {
controller.enqueue(encoder.encode(': keepalive\n\n'))
}, 30000)
// Cleanup
req.signal.addEventListener('abort', () => {
clearInterval(interval)
controller.close()
})
}
})
return new Response(stream, {
headers: {
'Content-Type': 'text/event-stream',
'Cache-Control': 'no-cache',
'Connection': 'keep-alive',
}
})
}
// Client
const eventSource = new EventSource('/api/stream')
eventSource.onmessage = (event) => {
console.log(event.data)
}
2. WebSockets
Best for: Bidirectional real-time communication (chat, collaboration)
// WebSocket Server (Next.js with ws)
import { WebSocketServer } from 'ws'
const wss = new WebSocketServer({ port: 8080 })
wss.on('connection', (ws) => {
ws.on('message', (data) => {
// Broadcast to all clients
wss.clients.forEach((client) => {
if (client.readyState === WebSocket.OPEN) {
client.send(data)
}
})
})
})
// Client
const ws = new WebSocket('ws://localhost:8080')
ws.onmessage = (event) => console.log(event.data)
ws.send(JSON.stringify({ type: 'message', text: 'Hello' }))
3. ReadableStream API
Best for: Processing large data streams with backpressure
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3mo ago First seen · 255 lines · 30 tokens per session scan A f0c8d546fcab
streaming-api-patterns is a skill published in the GitHub repository ArieGoldkin/claude-forge (7 stars, last pushed 3mo ago), licensed MIT. It adds 30 tokens to every session and 1,532 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 91% identical to streaming-api-patterns, differing in 20 lines, and is treated as a copy.
streaming-api-patterns compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| streaming-api-patternsArieGoldkin/claude-forge | Skill | 7 | 3mo ago | MIT | A | 30 | Claude Code |
| inference-serving-sglangdavila7/claude-code-templates | Skill | 35k | today | MIT | A | 76 | Claude Code, Codex |
| amazon-location-serviceawslabs/agent-plugins | Skill | 957 | today | Apache-2.0 | A | 107 | Claude Code |
| amplify-workflowawslabs/agent-plugins | Skill | 957 | today | Apache-2.0 | A | 214 | Claude Code |
| aws-lambda-durable-functionsawslabs/agent-plugins | Skill | 957 | today | Apache-2.0 | A | 109 | Claude Code |
| api-gatewayawslabs/agent-plugins | Skill | 957 | today | Apache-2.0 | A | 108 | Claude Code |
| aws-lambdaawslabs/agent-plugins | Skill | 957 | today | Apache-2.0 | A | 74 | Claude Code |