Agent skill · writing content · aiskillstore
streaming-llm-responses
Implement real-time streaming UI patterns for AI chat applications. Use when adding response lifecycle handlers, progress indicators, client effects, or thread state synchronization. Covers onResponseStart/End, onEffect, ProgressUpdateEvent, and client tools. NOT when building basic chat without real-time feedback.
Why this skill is useful
Provides specific patterns and lifecycle management for real-time streaming in chat applications that the AI wouldn't reliably generate on its own.
What it needs
About 4k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.
What this skill does
Streaming LLM Responses Build responsive, real-time chat interfaces with streaming feedback. Quick Start --- Response Lifecycle --- Core Patterns 1. Response Lifecycle Handlers Lock UI during AI response to prevent race conditions: 2. Client Effects (Fire-and-Forget) Server sends effects to update client UI without expecting a response: Backend - Streaming Effects: Frontend - Handling Effects: 3. Progress Updates Show "Searching...", "Loading...", "Analyzing..." during long operations: 4. Thread Lifecycle Events Track thread changes for persistence and UI updates: 5. Client Tools (State Query) AI needs to read client-side state to make decisions: Backend - Defining Client Tool: Frontend - Handling Client Tools: --- Client Effects vs Client Tools Type Direction Response Required Use Case ------ ----------- ------------------- ---------- Client Effect Server → Client No (fire-and-forget) Update UI, show notifications Client Tool Server → Client → Server Yes (return value) Get client state for AI decision --- Common Patterns by Use Case Interactive Map/Canvas Form-Based UI Game/Simulation --- Thread Title Generation Dynamically update thread title based on conversation: --- Anti-Patterns 1. Not locking UI during response - Leads to race conditions 2. Blocking in effects - Effects should be fire-and-forget 3. Heavy computation in onEffect - Use requestAnimationFrame for DOM updates 4. Missing error handling - Always handle onError to unlock UI 5. Not persisting thread state - Use onThreadChange to save context --- Verification Run: python3 scripts/verify.py Expected: ✓ streaming-llm-responses skill ready If Verification Fails 1. Check: references/ folder has streaming-patterns.md 2. Stop and report if still failing References references/streaming-patterns.md - Complete streaming configuration
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aiskillstore/streaming-llm-responses