Guides writing, reviewing, and refactoring Hotwire-powered Rails code with patterns for Turbo Drive, Turbo Frames, Turbo Streams, Turbo 8 morphing, and Stimulus controllers.
How this skill is triggered — by the user, by Claude, or both
Slash command
/pproenca-dot-skills-1:rails-hotwireThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Comprehensive guide for building interactive Rails applications with Hotwire (Turbo + Stimulus), maintained by Community. Contains 53 rules across 9 categories, prioritized by impact to guide automated refactoring and code generation. Follows the DHH "One Person Framework" philosophy: the server renders HTML, Turbo makes it feel like an SPA, Stimulus adds the sprinkle of JS where needed.
Comprehensive guide for building interactive Rails applications with Hotwire (Turbo + Stimulus), maintained by Community. Contains 53 rules across 9 categories, prioritized by impact to guide automated refactoring and code generation. Follows the DHH "One Person Framework" philosophy: the server renders HTML, Turbo makes it feel like an SPA, Stimulus adds the sprinkle of JS where needed.
Reference these guidelines when:
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Navigation & Drive | CRITICAL | drive- |
| 2 | Turbo Frames | CRITICAL | frame- |
| 3 | Turbo Streams | HIGH | stream- |
| 4 | Broadcasting & Real-Time | HIGH | bcast- |
| 5 | Morphing & Page Refresh | HIGH | morph- |
| 6 | Performance Optimization | MEDIUM-HIGH | perf- |
| 7 | Stimulus Patterns | MEDIUM-HIGH | stim- |
| 8 | Architecture Decisions | MEDIUM | arch- |
| 9 | Testing Hotwire | MEDIUM | test- |
drive-prefetch-links - Enable link prefetching for instant navigationdrive-form-submissions - Use Turbo Drive for form submissionsdrive-visit-actions - Control history with visit actionsdrive-cache-control - Configure Turbo cache for preview pagesdrive-selective-disable - Disable Turbo Drive on incompatible pagesdrive-progress-bar - Customize the Turbo progress bardrive-confirm-dialog - Use data-turbo-confirm for destructive actionsdrive-error-recovery - Handle Turbo navigation and fetch errors gracefullyframe-lazy-loading - Defer frame loading until viewport entryframe-scope-navigation - Scope navigation within framesframe-src-navigation - Use src for dynamic frame contentframe-break-out - Handle frame breakout for redirectsframe-promote-visits - Promote frame navigation to page visitsframe-dom-id - Use dom_id for frame identificationframe-empty-state - Provide meaningful frame loading statesstream-progressive-enhance - Always provide HTML fallback for streamsstream-action-selection - Choose the right stream action for DOM mutationsstream-multi-target - Use targets for multi-element updatesstream-http-delivery - Deliver streams via HTTP for form responsesstream-websocket-source - Connect WebSocket sources in the bodystream-custom-actions - Register custom stream actions for complex DOM updatesbcast-model-broadcasts - Use broadcasts_refreshes for simple model updatesbcast-debounce-n1 - Debounce broadcasts to prevent N+1 broadcast stormsbcast-scope-streams - Scope broadcast streams to accounts or usersbcast-refresh-over-replace - Prefer broadcast refresh over granular stream updatesbcast-avoid-view-logic-in-models - Keep broadcasting logic out of modelsbcast-signed-stream-names - Use signed stream names for securitybcast-reconnect-handling - Handle WebSocket disconnection and reconnectionmorph-enable-page-refresh - Enable morphing for page refreshesmorph-permanent-elements - Mark stateful elements as permanentmorph-scroll-preservation - Preserve scroll position during morphingmorph-stimulus-reconnect - Handle Stimulus controller reconnection after morphmorph-frame-refresh - Use refresh='morph' on frames for additive contentmorph-vs-streams - Choose morphing over complex stream orchestrationperf-optimistic-ui - Implement optimistic UI updates before server confirmationperf-batch-streams - Batch multiple stream updates into single responsesperf-frame-caching - Cache Turbo Frame responses with fragment cachingperf-prefetch-strategic - Disable prefetch on expensive endpointsperf-memory-leak-prevention - Clean up subscriptions and event listenersstim-outlets-communication - Use outlets for cross-controller communicationstim-values-reactive-state - Use Values API for reactive controller statestim-action-descriptors - Use declarative action descriptors over addEventListenerstim-small-reusable-controllers - Keep Stimulus controllers small and reusablearch-progressive-enhancement - Follow the progressive enhancement hierarchyarch-frame-vs-stream-decision - Use frames for scoped navigation, streams for multi-target updatesarch-importmap-management - Pin JavaScript dependencies with import mapsarch-avoid-client-state - Keep state on the server, not the clientarch-stimulus-boundaries - Use Stimulus only for client-side behaviortest-system-test-async - Wait for Turbo updates in system teststest-stream-assertions - Use Turbo Stream test helpers in integration teststest-broadcast-assertions - Assert broadcasts with Turbo test helperstest-frame-navigation - Test frame navigation with scoped assertionstest-websocket-timing - Handle WebSocket connection timing in system testsRead individual reference files for detailed explanations and code examples:
| File | Description |
|---|---|
| references/_sections.md | Category definitions and ordering |
| assets/templates/_template.md | Template for new rules |
| metadata.json | Version and reference information |
npx claudepluginhub joshuarweaver/cascade-code-general-misc-1 --plugin pproenca-dot-skills-1Creates Hotwire UIs with progressive enhancement in Rails: Stimulus controllers, Turbo Frame markup, Turbo Stream responses, ActionCable broadcasts, and degraded mode verification.
Provides mental models, decision frameworks, and debugging patterns for Hotwire (Turbo, Stimulus, Hotwire Native) in Rails apps. Activates on common issues like Turbo Frame not updating, morphing problems, or broadcast failures.
Guides building reactive Rails apps with Hotwire (Turbo Drive/Frames/Streams, Stimulus): installation, ActionCable/Redis setup, core patterns.