From rails-agent-skills
Creates Hotwire UIs with progressive enhancement in Rails: Stimulus controllers, Turbo Frame markup, Turbo Stream responses, ActionCable broadcasts, and degraded mode verification.
How this skill is triggered — by the user, by Claude, or both
Slash command
/rails-agent-skills:implement-hotwireThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Build modern Rails frontends with Hotwire using progressive enhancement.
Build modern Rails frontends with Hotwire using progressive enhancement.
| Need | Hotwire choice |
|---|---|
| Replace part of a page after a link/form | Turbo Frame |
| Broadcast server-side changes | Turbo Stream |
| Client-only behavior beyond Turbo | Stimulus controller |
| Full page navigation | Normal Rails navigation, not a frame |
ALWAYS start with HTML-only, enhance with Hotwire progressively
NEVER use Turbo Frames for full page navigation
ALWAYS test without JavaScript first
turbo_frame_tag. Validate: confirm <turbo-frame> appears in the DOM with the correct id.text/vnd.turbo-stream.html in DevTools Network tab; for ActionCable, verify the subscription appears in the Action Cable log.application.getControllerForElementAndIdentifier(el, 'name') returns the controller instance in the browser console.rails test:system with the Capybara :rack_test driver) and confirm all hold without JS: forms submit, links navigate, data persists after reload.<%= turbo_frame_tag "post_#{@post.id}" do %>
<h1><%= @post.title %></h1>
<%= link_to "Edit", edit_post_path(@post) %>
<% end %>
<%= turbo_stream.append "posts", partial: "post", locals: { post: @post } %>
import { Controller } from "@hotwired/stimulus"
export default class extends Controller {
static targets = ["name"]
greet() { alert(`Hello ${this.nameTarget.value}!`) }
}
Register in app/javascript/controllers/index.js:
import GreetController from "./greet_controller"
application.register("greet", GreetController)
When implementing Hotwire, your output MUST include:
Load these files only when their specific content is needed:
| Skill | When to chain |
|---|---|
| write-tests | For system specs and failing interaction coverage |
| apply-stack-conventions | For Rails + Hotwire + Tailwind stack alignment |
| code-review | After the UI behavior and degraded mode are verified |
npx claudepluginhub igmarin/rails-agent-skillsGuides writing, reviewing, and refactoring Hotwire-powered Rails code with patterns for Turbo Drive, Turbo Frames, Turbo Streams, Turbo 8 morphing, and Stimulus controllers.
Implements Hotwire Turbo (Drive, Frames, Streams, Morph) and Stimulus controllers in Rails views for SPA-like interactivity, real-time updates, and progressive enhancement.
Guides building reactive Rails apps with Hotwire (Turbo Drive/Frames/Streams, Stimulus): installation, ActionCable/Redis setup, core patterns.