hotwire-turbo-stimulus

hotwire-turbo-stimulus is a skill for Claude Code, Codex from sandeepmvl/rails-skills. It costs 151 tokens per session (3,649 once invoked), scanned A, original, MIT.

A guide to building interactive Rails web pages with Hotwire: Turbo handles navigation and HTML updates, while Stimulus adds small pieces of JavaScript behavior.

In plain words
What is it for?
Use it for faster page navigation, lazy-loaded sections, server-sent updates, WebSocket broadcasts, and small interactive controls in Rails views.
Why use it?
It lets many Rails apps provide dynamic interactions without adding a separate JavaScript application, API layer, routing system, and client-side state model.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for faster page navigation, lazy-loaded sections, server-sent updates, WebSocket broadcasts, and small interactive controls in Rails views.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sandeepmvl/rails-skills/12-hotwire-turbo-stimulus
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add sandeepmvl/rails-skills --skill 12-hotwire-turbo-stimulus
Clone the repo
git clone --depth 1 https://github.com/sandeepmvl/rails-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for hotwire-turbo-stimulus

README.md
[![agentmods](https://agentmods.dev/badge/skills/sandeepmvl/rails-skills/12-hotwire-turbo-stimulus/github.svg)](https://agentmods.dev/skills/sandeepmvl/rails-skills/12-hotwire-turbo-stimulus)
Your own site
<a href="https://agentmods.dev/skills/sandeepmvl/rails-skills/12-hotwire-turbo-stimulus"><img src="https://agentmods.dev/badge/skills/sandeepmvl/rails-skills/12-hotwire-turbo-stimulus/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for hotwire-turbo-stimulus

Your own site · 80×15
<a href="https://agentmods.dev/skills/sandeepmvl/rails-skills/12-hotwire-turbo-stimulus"><img src="https://agentmods.dev/badge/skills/sandeepmvl/rails-skills/12-hotwire-turbo-stimulus.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 151 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,649 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00151 $0.03649
Opus 5 $0.00076 $0.01825
Sonnet 5 $0.00030 $0.00730
Haiku 4.5 $0.00015 $0.00365

Measured 12d ago against content hash 6bdf14cd7bff, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

hotwire-turbo-stimulus scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/12-hotwire-turbo-stimulus/SKILL.md · 374 lines

How it starts

The opening of the file, as written. The whole thing — 374 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Hotwire: Turbo + Stimulus

Build reactive Rails UIs without a JS framework. AI agents reach for React on every interactive feature — they grew up on SPAs and don't know that Hotwire covers ~90% of the same ground with server-rendered HTML. This skill encodes when Hotwire wins, what each Turbo primitive does, and how Stimulus fits.

Why this matters

Adding React/Vue to a Rails app means: a build pipeline, a separate state model, duplicate routing, an API layer, and an entirely different testing story. Most apps don't need it. Hotwire keeps you in Rails for the UI, sending HTML over the wire and letting Turbo + Stimulus handle interactivity.

The opinion

Hotwire (Turbo + Stimulus) is the default for Rails 8 UI. Reach for React/Vue only when (a) you need offline-first, (b) you need native-feel mobile-web with heavy client-side state, (c) you have an existing component library that's worth keeping, or (d) the team has explicit JS-framework expertise that outweighs the integration cost.

Counter-positions:

  • React with Inertia.js — server-rendered React via Rails controllers. Best of both worlds for teams that want React's component model but Rails' routing. See v0.2 react-with-rails.
  • htmx — even more minimal than Turbo. Fine if you don't need Stimulus's state model. Not the Rails-native answer.

The four primitives

Turbo Drive   ← Page navigation (replaces the browser's default — faster, no full page reload)
Turbo Frames  ← Lazy/independent HTML islands within a page
Turbo Streams ← Server-pushed HTML updates (WebSocket or response body)
Stimulus      ← Sprinkled JS controllers for client-side state

Core patterns

Pattern 1: Turbo Drive — navigation that feels SPA-fast

Default behavior (Rails 8): every link click and form submit is intercepted by Turbo. The new HTML is fetched, the <body> is swapped, no full reload. Looks and feels instant.

What you need to know:

  • <script> tags in the new HTML don't re-evaluate (each <script> runs once per page lifetime; only re-fires if you <script data-turbo-eval="true">).
  • window.onload / DOMContentLoaded fire only once on the original load. Use turbo:load instead.
  • Stimulus controllers re-attach automatically on Turbo navigation.

Read the full file on GitHub · 374 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 374 lines · 151 tokens per session scan A 6bdf14cd7bff

Subscribe to this mod's changes

hotwire-turbo-stimulus is a skill published in the GitHub repository sandeepmvl/rails-skills (21 stars, last pushed 3mo ago), licensed MIT. It adds 151 tokens to every session and 3,649 once invoked, about $0.0008 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

ratatui-ruby

This skill should be used when the user asks to "create a TUI", "terminal interface", "terminal UI", "ratatui", "ratatui-ruby", "inline viewport", "full-screen terminal app", "terminal widgets", "tui.draw", "tui.pollevent", or mentions RatatuiRuby.run, managed loop, terminal rendering, Tea MVU, or building CLI…

hoblin/claude-ruby-marketplace · 119 tokens

openui-forge-ruby

OpenUI generative UI with a Ruby on Rails backend. SSE streaming via ActionController::Live, forwarding the OpenAI API stream with Net::HTTP.

OthmanAdi/openui-forge · 38 tokens

rails-views

ERB templates, helpers, layouts, partials, and view patterns.

Shoebtamboli/rails_claude_skills · 18 tokens

rails-views-patterns

Analyzes Rails view templates, partials, layouts, helpers, and form patterns for best practices. Use when reviewing ERB templates, improving view performance with fragment caching, fixing form helpers, organizing partials, adding accessibility attributes, or evaluating collection rendering. NOT for Stimulus/Turbo…

ag0os/rails-dev-plugin · 79 tokens

tui-expert

Design, build, review, or refine responsive Terminal User Interfaces (TUIs), especially Rust Ratatui and Ruby TTY/cli-ui applications. Use for TUI state and event architecture, terminal layout, navigation, keyboard and text-input behavior, async data loading, accessibility, rendering, resizing, empty/error/loading…

damacus/agent-skills · 94 tokens

compiler-port

Port a compiler pass from TypeScript to Rust. Gathers context, plans the port, implements in a subagent with test-fix loop, then reviews.

react/react · 35 tokens