skills/pproenca/dot-skills/rails-hotwire

rails-hotwire

SKILL.md

Community Rails Hotwire Best Practices

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.

When to Apply

Reference these guidelines when:

  • Configuring Turbo Drive navigation, prefetching, and caching behavior
  • Adding Turbo Frames for partial page updates and lazy loading
  • Delivering Turbo Streams for surgical DOM mutations
  • Broadcasting real-time updates over ActionCable
  • Enabling Turbo 8 morphing for page refreshes
  • Writing Stimulus controllers for client-side behavior
  • Handling errors in Turbo navigation, frames, and WebSocket connections
  • Choosing between Drive, Frames, Streams, Morphing, and Stimulus
  • Testing Hotwire interactions in system and integration tests

Rule Categories by Priority

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-

Quick Reference

1. Navigation & Drive (CRITICAL)

2. Turbo Frames (CRITICAL)

3. Turbo Streams (HIGH)

4. Broadcasting & Real-Time (HIGH)

5. Morphing & Page Refresh (HIGH)

6. Performance Optimization (MEDIUM-HIGH)

7. Stimulus Patterns (MEDIUM-HIGH)

8. Architecture Decisions (MEDIUM)

9. Testing Hotwire (MEDIUM)

How to Use

Read individual reference files for detailed explanations and code examples:

Reference Files

File Description
references/_sections.md Category definitions and ordering
assets/templates/_template.md Template for new rules
metadata.json Version and reference information
Weekly Installs
40
GitHub Stars
71
First Seen
Feb 12, 2026
Installed on
codex37
opencode35
github-copilot35
gemini-cli35
kimi-cli32
amp31