Implement real-time data streaming with Server-Sent Events (SSE), WebSockets, and ReadableStream APIs. Master backpressure handling, reconnection strategies, and LLM streaming for 2025+ real-time applications.
SkillScore86Maintained
Automatic
◆Coding packstreamingssewebsocket
Last verified 9/2/2026
What it changes
Passed 19 of 22 test cases with the skill, and 18 of 22 without it.
Without skill82%
With skill86%
Checks it passed that the model alone missed
The endpoint response sets the Cache-Control header to no-cache.
The endpoint response sets the Content-Type header to text/event-stream.
Encodes string chunks with TextEncoder before calling controller.enqueue().
and 3 more in the full report
2 fixed17 passed either way2 still failing1 broke
Pass-rate lift
+5 pp
Tokens
+68%
Agent turns
0%
Response time
-12%
Model gemini-3.6-flashMeasured 9/2/2026v119 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 2 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 2
Prompt
I am building a chat UI in Next.js using the OpenAI API. Can you write a POST endpoint handler that streams the model's text generation back to the client, along with a corresponding frontend async function that reads and logs each incoming token chunk as it arrives?
What was checked, without and with the skill
Checked
Without skill
With skill
The endpoint response sets the Content-Type header to text/event-stream.
Missed
Passed
The endpoint response sets the Cache-Control header to no-cache.
Missed
Passed
The route handler formats enqueued stream chunks with the SSE data prefix and trailing double newlines.
Missed
Passed
The client function reads response.body with a reader and decodes tokens from data-prefixed lines.
Missed
Passed
case-01 · gemini-3.6-flash · 9/2/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md250 lines2 files
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.
Search code by AST structure using ast-grep. Find semantic patterns like function calls, imports, class definitions instead of text patterns. Triggers on: find all calls to X, search for pattern, refactor usages, find where function is used, structural search, ast-grep, sg.