hotwire-patterns

hotwire-patterns is a skill for Claude Code from slbug/claude-ruby-grape-rails. It costs 49 tokens per session (1,430 once invoked), scanned A, original, MIT.

A set of patterns for Hotwire, Rails tools for building interactive web pages with little JavaScript, including partial updates and live changes.

In plain words
What is it for?
Use it for Turbo Frames, Turbo Streams, Stimulus controllers, live updates, model broadcasts, and Action Cable integrations in Rails apps.
Why use it?
It helps choose between page navigation, scoped updates, server-sent changes, and small browser controllers without duplicating application state.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the ruby-grape-rails plugin — 52 skills, 19 agents, 17 hooks shipped together

Good fit Use it for Turbo Frames, Turbo Streams, Stimulus controllers, live updates, model broadcasts, and Action Cable integrations in Rails apps.

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

Made for: Claude Code.

Or install ruby-grape-rails, the plugin that ships this one along with the rest of its 52 skills, 19 agents, 17 hooks.

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/slbug/claude-ruby-grape-rails/hotwire-patterns/github.svg)](https://agentmods.dev/skills/slbug/claude-ruby-grape-rails/hotwire-patterns)
Your own site
<a href="https://agentmods.dev/skills/slbug/claude-ruby-grape-rails/hotwire-patterns"><img src="https://agentmods.dev/badge/skills/slbug/claude-ruby-grape-rails/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/slbug/claude-ruby-grape-rails/hotwire-patterns"><img src="https://agentmods.dev/badge/skills/slbug/claude-ruby-grape-rails/hotwire-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,430 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 warn 7 Sept 2026
SkillSpector: 3 findings, up to high

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • high Prompt Injection · line 41
    Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
    Fix: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
  • high Prompt Injection · line 55
    Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
    Fix: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
  • high Prompt Injection · line 101
    Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.
    Fix: Audit all comments and invisible characters. Remove any instructions that direct the agent to perform unauthorized actions. Use plain, reviewable content.
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.00049 $0.01430
Opus 5.5 $0.00020 $0.00572
Sonnet 5.5 $0.00010 $0.00286
Haiku 4.5 $0.00005 $0.00143

Measured 3mo ago against content hash 2b984b3a09ca, 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.

plugins/ruby-grape-rails/skills/hotwire-patterns/SKILL.md · 176 lines

How it starts

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

Hotwire Patterns

Iron Laws

  1. Keep server-rendered interactions simple before reaching for custom JS.
  2. Broadcast after commit when Turbo Stream updates depend on committed state.
  3. Keep Stimulus controllers focused on browser concerns, not business rules.
  4. Avoid duplicating the same state in DOM, session, cache, and Current without a clear source of truth.
  5. Use Turbo Frames for scoped navigation; Turbo Streams for server-driven updates.
  6. Progressive enhancement: pages work without JavaScript, enhanced with it.

Overview

Hotwire provides tools for building modern web applications with minimal JavaScript:

  • Turbo Drive — Handles page navigation without full reloads
  • Turbo Frames — Scoped page updates, independent navigation
  • Turbo Streams — Server-driven page changes via WebSocket or HTTP
  • Stimulus — JavaScript controllers for progressive enhancement

Quick Decision Guide

Use Case Tool Example
Page navigation Turbo Drive Click links, instant page loads
Modal/dialog Turbo Frame Login modal, settings panel
Independent scrollable area Turbo Frame Comments section, sidebar
Real-time updates Turbo Streams Notifications, live comments
Form validation Stimulus Character counter, date picker
Complex UI interaction Stimulus Drag and drop, autocomplete

Turbo Frames

<!-- Frame that updates independently -->
<%= turbo_frame_tag "comments" do %>
  <%= render @comments %>
<% end %>

<!-- Link targets specific frame -->
<%= link_to "Load more", comments_path(page: 2), data: { turbo_frame: "comments" } %>

See Turbo Architecture for Drive, Frames, and Streams.

Turbo Streams

<!-- Broadcast from model -->
<%= turbo_stream_from @post %>

<!-- In view, streams update automatically -->
<%= turbo_frame_tag dom_id(@post) do %>
  <%= render @post %>
<% end %>
# Controller action
class CommentsController < ApplicationController
  def create
    @comment = @post.comments.create!(comment_params)
    
    respond_to do |format|
      format.turbo_stream
      format.html { redirect_to @post }
    end
  end
end

Read the full file on GitHub · 176 lines

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 · 176 lines · 49 tokens per session scan A 2b984b3a09ca

Subscribe to this mod's changes

hotwire-patterns is a skill published in the GitHub repository slbug/claude-ruby-grape-rails (7 stars, last pushed yesterday), licensed MIT. It adds 49 tokens to every session and 1,430 once invoked, about $0.0002 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-31.

Related

hotwire-patterns compared with skills from other repositories

hotwire-patterns next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
hotwire-patternsslbug/claude-ruby-grape-railsSkill7yesterdayMITA49Claude Code
omh-code-reviewrlaope/oh-my-hermesSkill6.2ktodayMITA18Claude Code
omh-rustrlaope/oh-my-hermesSkill6.2ktodayMITA19Claude Code
redteam-web-detail-packNetw0rkNoob/VulnClawSkill4.0k1mo agoMITA38Claude Code, Codex
android-pentestNetw0rkNoob/VulnClawSkill4.0k1mo agoMITA32Claude Code, Codex
schedule-querychrisblattman/claudeblattmanSkill49812d agoMITA17Claude Code
manage-schemasjpicklyk/task-orchestratorSkill215todayMITA207Claude Code