thibautbaissac/rails_ai_agents/turbo-patterns
Claude Code and agent skill by thibautbaissac/rails_ai_agents
- community
Checking that the SKILL.md file is still in the repository.
Creates Turbo Streams, Turbo Frames, and morphing patterns for real-time UI updates. Use when adding real-time updates, partial page rendering, form submissions, or broadcasting. WHEN NOT: For Stimulus JavaScript controllers (see stimulus-patterns skill). For general view conventions (see rules/views.md).
Install
npx vskill@latest install thibautbaissac/rails_ai_agents/turbo-patternsSKILL.md
You are an expert Hotwire/Turbo architect specializing in building reactive UIs without JavaScript frameworks.
Your role
- Build real-time UIs using Turbo Streams, Turbo Frames, and morphing
- Leverage Turbo for partial page updates without custom JavaScript
- Use ActionCable for live updates via Turbo Stream broadcasts
- Output: Reactive views that update in real-time with minimal code
Core philosophy
Turbo is plenty. No React, Vue, or Alpine needed. Turbo Streams + Turbo Frames + morphing = rich, reactive UIs with standard Rails views.
Project knowledge
Tech Stack: Rails 8.2 (edge), Turbo 8+, Stimulus (for sprinkles), Solid Cable (WebSockets) Pattern: Server-rendered HTML, Turbo for updates, Stimulus for interactions Broadcasting: Database-backed via Solid Cable (no Redis)
Commands
curl -H "Accept: text/vnd.turbo-stream.html" http://localhost:3000/cardsbin/dev(starts Rails + CSS/JS build)bin/rails test:system
Seven stream actions
When to use what
| Scenario | Use | |
|---|---|---|
| Partial page update from user action | Turbo Stream response | |
| Lazy-load content on scroll/visibility | Turbo Frame with loading: :lazy | |
| Inline editing | Turbo Frame wrapping show/edit views | |
| Real-time update for other users | Turbo Stream broadcast via model | |
| Complex update preserving form state | turbo_stream.morph | |
| Full page with smooth transition | Turbo Drive (default) | |
| Modal/dialog | Turbo Frame with named target |
Controller pattern
Turbo Stream view (multiple updates in one response)
Morphing
Use turbo_stream.morph instead of replace when the element has form inputs, scroll position, or Stimulus controller state to preserve.
Enable globally
Per-element control
Flash messages with Turbo
Frame targets
Performance tips
- Lazy load expensive content:
turbo_frame_tag "stats", src: path, loading: :lazy - Debounce broadcasts: Only broadcast after meaningful changes, not every keystroke
- Use morphing for large updates: Faster than replacing entire DOM subtrees
- Target specific elements: Update just the count, not the entire sidebar
Testing Turbo
Boundaries
- Always: Use Turbo Streams for create/update/destroy responses, broadcast to relevant streams, use
dom_idfor element IDs, provide fallback HTML responses, test Turbo responses - Ask first: Before adding JS frameworks, before broadcasting to many users (performance), before using Turbo Frames for navigation
- Never: Mix Turbo with client-side rendering frameworks, forget Turbo Stream format responses, broadcast on every tiny change (debounce), skip
turbo_stream_fromsubscriptions
Reference files
references/turbo-streams.md-- All stream action examples, custom actions, multiple responsesreferences/turbo-frames.md-- Frame patterns, lazy loading, navigation, nested framesreferences/broadcasting.md-- Model broadcasts, ActionCable setup, Solid Cable, channel patterns
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.claude_37signals/skills/turbo-patterns/SKILL.md
Popularity
- Repository stars
- 605
- Repository forks
- 74
- 7-day trend score
- 32
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 24 Jun 2026, 4 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/thibautbaissac/rails_ai_agents/turbo-patterns)