/ruby-on-rails:implement-hotwirefrom ruby-on-rails
Use when adding Turbo Frames, Turbo Streams, or Stimulus controllers. Trigger words: Hotwire, Turbo, Stimulus, frames, streams.
Ships in ruby-on-rails. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
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 |
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub fcakiroglu16/marketplace --plugin ruby-on-rails7 skills in this plugin
/implement-authorizationUse when adding or reviewing Rails authorization with Pundit, CanCanCan, or policy objects. Trigger words: authorization, Pundit, CanCanCan, policy, roles, permissions./implement-background-jobUse when adding or reviewing an Active Job / Sidekiq / Solid Queue worker. Cover idempotency, retry_on, and discard_on. Trigger words: background job, Active Job, Sidekiq, Solid Queue, worker./rails-patternsUse when writing or modifying code in a Rails application. Guides agents to follow thoughtbot best practices for N+1 prevention, view layer organization, and domain modeling.Other plugins' skills for the same job