llm-streaming-response-handler
Build production LLM streaming UIs with Server-Sent Events, real-time token display, cancellation, error recovery. Handles OpenAI/Anthropic/Claude streaming APIs. Use for chatbots, AI assistants, real-time text generation. Activate on "LLM streaming", "SSE", "token stream", "chat UI", "real-time AI". NOT for batch processing, non-streaming APIs, or WebSocket bidirectional chat.
npx skills add majiayu000/claude-skill-registry --skill llm-streaming-response-handler-curiositech-windags-skills --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# LLM Streaming Response Handler Expert in building production-grade streaming interfaces for LLM responses that feel instant and responsive. ## When to Use ✅ **Use for**: - Chat interfaces with typing animation - Real-time AI assistants - Code generation with live preview - Document summarization with progressive display - Any UI where users expect immediate feedback from LLMs ❌ **NOT for**: - Batch document processing (no user watching) - APIs that don't support streaming - WebSocket-based bidirectional chat (use Socket.IO) - Simple request/response (fetch is fine) ## Quick Decision Tree ``` Does your LLM interaction: ├── Need immediate visual feedback? → Streaming ├── Display long-form content (>100 words)? → Streaming ├── User expects typewriter effect? → Streaming ├── Short response (<50 words)? → Regular fetch └── Background processing? → Regular fetch ``` --- ## Technology Selection ### Server-Sent Events (SSE) - Recommended **Why SSE over WebSockets for LLM streaming**: - **Simplicity**: HTTP-based, works with existing infrastructure - **Auto-reconnect**: Built-in reconnection logic - **Firewall-friendly**: Easier than WebSockets through proxies - **One-way perfect**:
- When to Use
- Quick Decision Tree
- Technology Selection
- Server-Sent Events (SSE) - Recommended
- Streaming APIs
- Common Anti-Patterns
- Anti-Pattern 1: Buffering Before Display
- Anti-Pattern 2: No Stream Cancellation
- Anti-Pattern 3: No Error Recovery
- Anti-Pattern 4: Memory Leaks from Unclosed Streams
- Anti-Pattern 5: No Typing Indicator Between Tokens
- Implementation Patterns
- Pattern 1: Basic SSE Stream Handler
- Pattern 2: React Hook for Streaming
What does the llm-streaming-response-handler skill do?
Build production LLM streaming UIs with Server-Sent Events, real-time token display, cancellation, error recovery. Handles OpenAI/Anthropic/Claude streaming APIs. Use for chatbots, AI assistants, real-time text generation. Activate on "LLM streaming", "SSE", "token stream", "chat UI", "real-time AI". NOT for batch processing, non-streaming APIs, or WebSocket bidirectional chat.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill llm-streaming-response-handler-curiositech-windags-skills --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
