action-view-best-practices
CommunityModernize Rails Views with Hotwire & ViewComponents
AuthorCodySwannGT
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill addresses the common issues of complex, hard-to-maintain Rails views by guiding the refactoring process towards modern, efficient patterns like Hotwire and ViewComponents.
Core Features & Use Cases
- Modernization: Updates legacy Rails views to leverage Turbo Frames, Turbo Streams, and Stimulus controllers for enhanced interactivity without a build step.
- Code Quality: Refactors views to eliminate inline Ruby logic, HTML-returning helpers, and deeply nested partials, promoting cleaner, more testable code.
- Componentization: Guides the extraction of reusable UI patterns into ViewComponents and organizes display logic using presenters.
- Use Case: Refactor a large, complex ERB file containing inline JavaScript and multiple partials into a set of well-defined ViewComponents and Stimulus controllers, improving maintainability and performance.
Quick Start
Use the action-view-best-practices skill to refactor the provided Rails view code into modern Hotwire patterns.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: action-view-best-practices Download link: https://github.com/CodySwannGT/lisa/archive/main.zip#action-view-best-practices Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.