streaming-api-patterns
Build Reliable Streaming APIs
Real-time APIs often fail under disconnects, slow consumers, and malformed stream handling. This skill provides focused SSE, WebSocket, ReadableStream, and LLM streaming patterns.
Install with my Agent
Copy this request to your Agent. It includes the canonical Skill page and manifest.
Review the Skillstore skill "streaming-api-patterns" from https://skillstore.io/skills/ariegoldkin-streaming-api-patterns.md and its manifest at https://skillstore.io/api/skills/ariegoldkin-streaming-api-patterns/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.Your Agent should still show its plan and request any confirmation required by the security policy.
Agent-readable resources
Use these links when an AI agent, crawler, or script needs clean context instead of reading the full page.
Test it
Using "streaming-api-patterns". Choose a transport for one-way AI response tokens in a browser.
Expected outcome:
- Recommendation: Server-Sent Events over a streamed HTTP response.
- Reasons: One-way delivery matches the workload, browser support is broad, and reconnection behavior is predictable.
- Implementation notes: Disable proxy buffering, handle cancellation, and measure time to first token.
Using "streaming-api-patterns". Review an SSE endpoint that exposes raw exceptions and never handles disconnects.
Expected outcome:
- Priority finding: Replace internal exception text with a stable public error event.
- Reliability finding: Stop upstream work when the request signal reports cancellation.
- Verification: Test newline errors, early disconnects, slow clients, and proxy buffering.
Using "streaming-api-patterns". Plan a WebSocket chat service for many authenticated users.
Expected outcome:
- Connection controls: Authenticate upgrades, validate origins, and authorize channel membership.
- Message controls: Validate schemas, limit sizes, apply rate limits, and reject unexpected message types.
- Operations: Add heartbeats, bounded queues, reconnect jitter, connection metrics, and load tests.
Security Audit
Medium RiskStatic command findings are false positives caused by Markdown fences and TypeScript template literals; no shell execution exists. Network calls are expected examples for a streaming API skill and use local, relative, or standards documentation URLs. Two separate medium-risk example defects remain: unescaped error serialization and an unauthenticated, unvalidated WebSocket broadcast.
Confirmed security concerns (2)
Risk Factors
โ๏ธ External commands (13)
Share & cite this report
Share the versioned assessment report, neutral badge, embed card, and citations. Skillstore reports evidence without deciding whether this Skill is safe.
Copy report link
https://skillstore.io/skills/ariegoldkin-streaming-api-patterns/audits/9?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown badge
[](https://skillstore.io/skills/ariegoldkin-streaming-api-patterns?utm_source=security_passport_badge)HTML badge
<a href="https://skillstore.io/skills/ariegoldkin-streaming-api-patterns?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/ariegoldkin-streaming-api-patterns/security.svg" alt="Skillstore security assessment" loading="lazy"></a>Embed card
<iframe src="https://skillstore.io/embed/skills/ariegoldkin-streaming-api-patterns.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>Academic citations (APA ยท BibTeX ยท CFF)
APA citation
AI Agent Hub. (2026). streaming-api-patterns security audit report (audit version 9) [Author version 1.0.0]. Skillstore. https://skillstore.io/skills/ariegoldkin-streaming-api-patterns/audits/9BibTeX citation
@techreport{ai-agent-hub-ariegoldkin-streaming-api-patterns-2026,
author = {AI Agent Hub},
title = {streaming-api-patterns security audit report (audit version 9)},
institution = {Skillstore},
year = {2026},
number = {9},
url = {https://skillstore.io/skills/ariegoldkin-streaming-api-patterns/audits/9},
note = {Author version 1.0.0}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "streaming-api-patterns security audit report (audit version 9)"
version: "1.0.0"
type: report
authors:
- name: "AI Agent Hub"
date-released: "2026-07-23"
url: "https://skillstore.io/skills/ariegoldkin-streaming-api-patterns/audits/9"
identifiers:
- type: other
value: "skillstore:ariegoldkin-streaming-api-patterns:audit:9"
description: "Skillstore immutable audit report identifier"
Skillstore Score
Why this score Evidence Confidence: HighWhat You Can Build
Stream LLM Responses
Design a browser experience that displays model output as tokens arrive and handles cancellation or interruption.
Deliver Live Product Updates
Select and implement a transport for notifications, progress events, dashboards, or collaborative features.
Review Streaming Readiness
Evaluate a streaming design for reconnection, backpressure, security controls, proxy behavior, and operational testing.
Try These Prompts
Compare SSE, WebSockets, and ReadableStream for [feature]. Recommend one based on direction, browser support, reconnection, and expected message frequency.
Design a TypeScript SSE endpoint for [framework] that streams [data]. Include headers, cancellation, keepalives, structured events, and safe error handling.
Create a resilient client for [stream URL]. Include exponential backoff, jitter, connection state, partial-frame parsing, cancellation, and observable error reporting.
Review this streaming architecture for [traffic profile] and [deployment platform]. Address authentication, authorization, backpressure, proxy buffering, rate limits, load testing, and monitoring.
Best Practices
- Validate authentication, authorization, origins, message schemas, and payload sizes before opening or using a streaming connection.
- Handle cancellation, timeouts, backpressure, and reconnection as core behavior rather than optional error paths.
- Test partial frames, slow consumers, proxy buffering, long connections, concurrent clients, and controlled service failures.
Avoid
- Do not broadcast unvalidated client messages or trust a connection solely because its transport succeeded.
- Do not expose internal exception messages or build structured stream events through string interpolation.
- Do not assume each network chunk contains a complete SSE event or valid text boundary.
Frequently Asked Questions
What does this skill cover?
When should I choose SSE?
When should I choose WebSockets?
Are the examples production ready?
Can Claude, Codex, and Claude Code use this skill?
Does the skill handle backpressure and reconnection?
Developer Details
Author
AI Agent HubLicense
MIT
Author version
v1.0.0
Skillstore revision
r2
Ref
89edfdc710d0846129dcee6a929477b04f08052c
Maintenance freshness
7/24/2026
Usage
7 downloads ยท 278 views
File structure