jonathanbelolo/composable-svelte
Overview
This skill provides transport-agnostic streaming chat and collaborative features for Composable Svelte. It combines a StreamingChat state machine with presence, typing, cursor tracking, and WebSocket integration to build real-time LLM chat interfaces. Use the provided components and reducers to add streaming LLM responses, file attachments, voice input, and multi-user collaboration quickly.
How this skill works
The skill exposes store-based components (Minimal, Standard, Full, and StreamingChat) that wire into a streaming sendMessage dependency implemented as an async generator. Collaborative features use a separate reducer with WebSocket connect/disconnect handlers to broadcast presence, typing, and cursor events. UI primitives like PresenceAvatarStack, TypingIndicator, and CursorOverlay consume derived store data to render live user state.
When to use it
- Building chat interfaces that stream LLM outputs token-by-token or chunk-by-chunk.
- Adding real-time presence, typing indicators, and live cursors for multi-user conversations.
- Embedding voice input, file attachments (images, PDFs, audio), and transcription workflows.
- Connecting to custom WebSocket backends for synchronization and presence management.
- Creating both lightweight embedded chat (Minimal) and full-featured chat apps (Full).
Best practices
- Implement sendMessage as an async generator to yield streaming chunks from your LLM or proxy.
- Keep WebSocket lifecycle logic inside connectWebSocket and return a cleanup function to close connections.
- Use StandardStreamingChat for most cases; upgrade to FullStreamingChat only when attachments and reactions are required.
- Provide optional dependencies (uploadFile, transcribeVoice) only if you need attachments or voice features.
- Debounce typing events and send compact presence updates to minimize WebSocket traffic.
Example use cases
- A support chat that streams LLM suggestions while agents collaborate and see typing status.
- A collaborative document Q&A where multiple users chat, share PDFs, and track live cursors.
- A voice-enabled assistant that records audio, uploads files, and transcribes with Whisper or similar.
- An embedded widget for customer websites that uses a minimal chat UI and a streaming LLM proxy.
- A team chat app with reactions, attachments, and offline presence indicators.
FAQ
Yes. Implement sendMessage as an async generator that yields streaming text from your chosen provider (OpenAI, Anthropic, Ollama, etc.).
How do I handle file uploads and voice transcription?
Provide optional dependencies uploadFile and transcribeVoice. FullStreamingChat exposes UI for attachments and voice input that call these hooks.
8 skills
This skill enables real-time streaming chat and collaborative features for Composable Svelte apps, improving LLM conversations, presence, typing indicators,
This skill helps you implement state-driven navigation and Motion One animations for modals, sheets, and route transitions in Composable Svelte.
This skill enables editing, highlighting, and visual scripting with Composable Svelte code components to accelerate editor UIs and node-based workflows.
This skill helps you implement interactive map features with Maplibre/Mapbox, including markers, layers, popups, and geospatial visualizations in Composable
This skill helps you create interactive charts with Svelte using Observable Plot and D3, including zoom, tooltips, and responsive charts.
This skill guides production deployment of Composable Svelte SSR apps with Docker and Fly.io, including multi-stage builds, security hardening, and backend
This skill helps you select and integrate Composable Svelte components with props, state, and accessibility patterns for fast, cohesive UI development.
This skill enables robust testing of Composable Svelte apps using TestStore and mocks to validate reducers, effects, and interactions.