streaming-llm-responses

Stream AI chat responses with lifecycle and progress event handlers.

2|Updated Dec 24, 2025
One-click install
npx skills add https://github.com/Asmayaseen/hackathon-2 --skill streaming-llm-responses-asmayaseen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: streaming-llm-responses
Source: https://github.com/Asmayaseen/hackathon-2/tree/main/.claude/skills/streaming-llm-responses
Command: npx skills add https://github.com/Asmayaseen/hackathon-2 --skill streaming-llm-responses-asmayaseen

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a structured approach to implement real-time streaming of AI chat responses, enabling immediate token-level feedback, progress indicators, and client-driven effects during a conversation. It helps developers build responsive chat interfaces where partial results are shown as they arrive, while user interactions remain controlled.

Core Features & Use Cases

  • Response Lifecycle Handlers: coordinate UI state with onResponseStart and onResponseEnd to lock/unlock interactions.
  • Client Effects & Progress Updates: emit and consume streaming client effects and progress updates to keep the UI in sync.
  • Thread & Client Tool Hooks: track thread changes and query client state to inform AI decisions.
  • Use Case: Building a live-chat dashboard where users see tokens streaming in and the UI updates with status banners and live metrics.

Quick Start

Use the streaming-llm-responses skill to wire a chat UI that shows a loading indicator while tokens stream, handles onEffect events to update UI, and uses onClientTool to read current UI state for AI decisions.

Frequently Asked Questions about streaming-llm-responses

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement real-time streaming for AI chat responses in a web client?

To implement real-time streaming for AI chat responses, wire your interface to handle event-driven lifecycle hooks like onResponseStart and onResponseEnd, rendering partial tokens and progress indicators as they arrive across web and mobile clients.

What are streaming client effects and when do I need them in an interactive chat interface?

Streaming client effects are UI updates triggered by onEffect events during an AI conversation. You need them to keep your interface in sync with progress updates, status banners, and live metrics while tokens actively stream.

How do I keep user interactions controlled while LLM tokens are still streaming?

You can keep user interactions controlled while tokens stream by coordinating UI state with the onResponseStart and onResponseEnd lifecycle handlers to lock interactions when the response starts and unlock them upon completion.

Can I query current UI state to inform AI decisions during a live chat?

Yes, you can query current UI state to inform AI decisions by using the onClientTool handler, which queries client state during the conversation to provide context for the AI's next response.

How do I track thread changes during a streaming chat session?

You track thread changes during a streaming chat session by satisfying the onThreadChange handler, which monitors thread transitions and maintains a predictable, event-driven streaming workflow throughout the conversation.