turbo-streams
Installation
SKILL.md
Turbo Streams
Build real-time, push-driven features using Turbo Streams with Rails. This skill covers stream delivery, custom actions, broadcasting, morphing, optimistic UI, cross-tab sync, and list animations.
Core Workflow
Step 1: Identify What Needs Real-Time Updates
Look for lists, counters, notifications, status indicators, collaborative editing surfaces, and any UI that should reflect server-side changes without a full page reload.
Step 2: Choose Delivery Method
- HTTP response streams (
.turbo_stream.erbtemplates): For request/response cycles — form submissions, AJAX actions. - WebSocket broadcasts (
broadcasts_to,turbo_stream_from): For pushing updates to other users or tabs without a request. - Inline stream tags: For client-side-only stream operations embedded in ERB.
Step 3: Select the Stream Action
Pick the most precise action: