hotwire-patterns

hotwire-patterns is a skill for Claude Code from maquina-app/rails-claude-code. It costs 152 tokens per session (2,924 once invoked), scanned A, original, MIT.

Guidance for building and debugging Rails applications with Hotwire, a set of tools that updates web pages with server-rendered HTML and small amounts of JavaScript.

In plain words
What is it for?
It covers Turbo Drive, Frames, Streams, morphing, ActionCable updates, Stimulus controllers, caching, and Hotwire Native apps for iOS and Android.
Why use it?
It helps choose between full-page refreshes, partial updates, and small browser-side behaviors without adding unnecessary client-side complexity.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the hotwire-patterns plugin — 1 skill shipped together

Good fit It covers Turbo Drive, Frames, Streams, morphing, ActionCable updates, Stimulus controllers, caching, and Hotwire Native apps for iOS and Android.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/maquina-app/rails-claude-code/hotwire-patterns
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 maquina-app/rails-claude-code --skill hotwire-patterns
Clone the repo
git clone --depth 1 https://github.com/maquina-app/rails-claude-code

Made for: Claude Code.

Or install hotwire-patterns, the plugin that ships this one along with the rest of its 1 skill.

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-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/maquina-app/rails-claude-code/hotwire-patterns/github.svg)](https://agentmods.dev/skills/maquina-app/rails-claude-code/hotwire-patterns)
Your own site
<a href="https://agentmods.dev/skills/maquina-app/rails-claude-code/hotwire-patterns"><img src="https://agentmods.dev/badge/skills/maquina-app/rails-claude-code/hotwire-patterns/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-patterns

Your own site · 80×15
<a href="https://agentmods.dev/skills/maquina-app/rails-claude-code/hotwire-patterns"><img src="https://agentmods.dev/badge/skills/maquina-app/rails-claude-code/hotwire-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 152 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,924 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00152 $0.02924
Opus 5.5 $0.00061 $0.01170
Sonnet 5.5 $0.00030 $0.00585
Haiku 4.5 $0.00015 $0.00292

Measured 3mo ago against content hash 83a1e7579cbd, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

hotwire-patterns 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 3mo 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.

hotwire-patterns/skills/hotwire-patterns/SKILL.md · 105 lines

How it starts

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

Hotwire Patterns

Internals-informed patterns for building and debugging Hotwire applications. Core philosophy: enhance the browser, don't reinvent it. Start by imagining a JS-free, plain-HTML version of every feature, then compose the separate pages into an integrated UI with Turbo. HTML is the source of truth for state, everywhere.

The escalation ladder (choose the cheapest tool that works)

Hotwire is a cost/benefit dial, not a single approach. Escalate only when the previous rung stops being a good tradeoff:

  1. Turbo Drive + Morphing refreshes — re-render everything server-side; fastest to build.
  2. Turbo Frames — decompose the page; localize updates without touching the rest.
  3. Turbo Stream actions — surgical DOM updates; more precise, more maintenance cost.
  4. Stimulus — small client-side behavior where a server round-trip makes no sense.
  5. Island of reactive framework (React/Vue) or API calls — only for genuinely high-interactivity widgets (maps, editors).

Different parts of one app can sit on different rungs; it all composes.

Turbo Drive essentials

  • Drive intercepts link clicks and form submissions, fetches via fetch, replaces <body> wholesale, and diff-merges <head> children (identical nodes untouched → assets not re-parsed; that's the speed win). Order of head children isn't preserved and doesn't matter.
  • Assets must live in <head>. Modern async scripts + HTTP/2 remove old reasons for body-bottom scripts.
  • UJS replacements: data: {turbo_method: :delete} for non-GET links; data: {turbo_confirm: "..."} for confirm dialogs (works on forms and non-GET links; add turbo_method: :get to use on plain links). Customize globally via Turbo.config.forms.confirm = (message, formEl, submitter) => Promise<boolean>.
  • Submit buttons auto-disable during submission. turbo:submit-start / turbo:submit-end events carry event.detail.formSubmission.submitter — use for loaders.
  • Failed form submissions must return 4xx (render :new, status: :unprocessable_entity). Turbo requires a redirect on success; it renders 4xx bodies happily.
  • Turbo.visit(location) is the programmatic navigation entry point; Turbo.visit(location, { frame }) navigates a frame.
  • Non-GET links work by Turbo building a hidden form on the fly and submitting it — everything true of forms is true of these links.
  • Visit types: advance (link click), replace (redirect after form submit), restore (history). This matters for morphing (below).
  • Link prefetch fires after 100ms hover on plain GET links (no turbo-stream expectation, no confirm dialog). GET idempotency becomes mandatory; the X-Sec-Purpose: prefetch header identifies prefetches server-side if you must special-case.

Read the full file on GitHub · 105 lines

Files

What ships with it

5 files 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. 3mo ago First seen · 105 lines · 152 tokens per session scan A 83a1e7579cbd

Subscribe to this mod's changes

hotwire-patterns is a skill published in the GitHub repository maquina-app/rails-claude-code (48 stars, last pushed 10d ago), licensed MIT. It adds 152 tokens to every session and 2,924 once invoked, about $0.0006 per session on Opus 5.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

hotwire-patterns compared with skills from other repositories

hotwire-patterns next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
hotwire-patternsmaquina-app/rails-claude-codeSkill4810d agoMITA152Claude Code
systematic-debuggingopen-metadata/OpenMetadataSkill16ktodayApache-2.0A37Claude Code
log-error-digestzebbern/claude-code-guideSkill4.7ktodayMITA71Claude Code, Codex
observability-audit-sessionsIBM/mcp-context-forgeSkill4.9ktodayApache-2.0A64Claude Code, Codex
cwv-optimizeradobe/skillsSkill342todayApache-2.0A112Claude Code
ci-fixersipyourdrink-ltd/bernsteinSkill1.2ktodayApache-2.0A15Claude Code, Codex
verus-query-timinglbx154/ArgusSkill337yesterdayMITA28Claude Code, Codex