rails-ai:hotwire

Enhance Rails views with Hotwire Turbo and Stimulus controllers.

41|Updated Oct 30, 2025
One-click install
npx skills add https://github.com/zerobearing2/rails-ai --skill rails-ai-hotwire
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rails-ai:hotwire
Source: https://github.com/zerobearing2/rails-ai/tree/main/skills/hotwire
Command: npx skills add https://github.com/zerobearing2/rails-ai --skill rails-ai-hotwire

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables developers to add interactivity to Rails views using Hotwire (Turbo, Frames, Streams, Morph) and Stimulus controllers, reducing the need for custom JavaScript while preserving accessibility and progressive enhancement.

Core Features & Use Cases

  • Hotwire integration: leverage Turbo Drive for faster navigation, Turbo Streams for real-time updates, and Turbo Morph for state-preserving DOM updates.
  • Stimulus-driven UI: attach lightweight JavaScript behavior to HTML via data attributes for dynamic UI like modals, counters, and dropdowns.
  • Use Case: turn a traditional Rails app into an interactive, SPA-like experience with server-rendered HTML and minimal client code.

Quick Start

In a Rails project, add Turbo Rails and Stimulus, configure import maps or webpack, then annotate views with data-controller and data-turbo actions. Start by converting a list update to use Turbo Streams and morphing, and progressively enhance with Stimulus where needed.

Frequently Asked Questions about rails-ai:hotwire

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

FAQPage Schema
How do I add real-time interactivity to a Rails view without writing custom JavaScript?

You can add real-time interactivity to a Rails view by using Hotwire, which leverages Turbo Streams for server-driven updates and Stimulus for lightweight behavior attached via HTML data attributes, minimizing heavy custom JavaScript.

What is the best way to build an SPA-like experience in Rails using server-rendered HTML?

The best way to build a SPA-like Rails experience with server-rendered HTML is using Hotwire. It utilizes Turbo Drive for fast navigation and Turbo Morph for state-preserving DOM updates, avoiding the need for a heavy client-side framework.

How do I use Turbo Streams to broadcast updates for Rails dashboards and modals?

To broadcast updates for Rails dashboards and modals, use Turbo Streams to transmit server-rendered HTML fragments directly to the client, ensuring real-time UI synchronization while maintaining progressive enhancement and accessibility.

Does Hotwire work with standard Rails workflows like forms and controllers?

Yes, Hotwire works directly with standard Rails workflows. It integrates seamlessly with Rails views and controllers to enhance forms and modals using Turbo Drive, Turbo Streams, and Stimulus without requiring a complete application rewrite.

Why use Turbo Morph for DOM updates instead of standard Turbo Drive navigation?

Use Turbo Morph instead of standard Turbo Drive navigation when you need state-preserving DOM updates. Morphing efficiently refreshes page content while retaining client-side state, such as scroll positions or form inputs, providing smoother interactivity.

How do I attach dynamic UI behavior in Rails using Stimulus controllers?

You attach dynamic UI behavior in Rails by using Stimulus controllers, which connect lightweight JavaScript to your HTML using data-controller and data-turbo action data attributes, enabling features like modals and counters with progressive enhancement.