rails-view-components-advanced

Organize complex Rails ViewComponent UI patterns with composition, slots, and lifecycle guidance.

4|2|Updated Dec 12, 2025
One-click install
npx skills add https://github.com/rubakas/agent-notes --skill rails-view-components-advanced
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rails-view-components-advanced
Source: https://github.com/rubakas/agent-notes/tree/main/rails-view-components-advanced
Command: npx skills add https://github.com/rubakas/agent-notes --skill rails-view-components-advanced

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Streamlines the design and maintenance of complex ViewComponent-based UIs in Rails by providing a structured set of patterns and best practices.

Core Features & Use Cases

  • Best-practice patterns for component composition, slots, and lifecycle management.
  • Clear organizational strategies for general-purpose vs application-specific components.
  • Guidance on testing, naming conventions, and extraction strategies to maximize reusability.
  • Real-world use cases: building modular dashboards, forms, and reusable UI blocks across codebases.

Quick Start

Include the advanced ViewComponent index in your CLAUDE.md to start applying these patterns.

Frequently Asked Questions about rails-view-components-advanced

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What are the best practices for organizing ViewComponent patterns in Rails?

ViewComponent patterns in Rails are best organized by separating general-purpose UI blocks from application-specific components to maximize reusability. This strategy streamlines maintenance and provides clear structural boundaries across complex codebases.

How do I use slots and lifecycle management for Rails UI components?

Slots and lifecycle management in Rails UI components enable advanced composition by allowing flexible content injection and controlled initialization phases. These patterns help structure complex dashboards and reusable forms effectively.

How do I test ViewComponent components in a Rails application?

Testing ViewComponent components in Rails involves validating individual UI blocks like modals and forms through dedicated component tests. Applying structured testing patterns ensures reliable rendering and behavior verification across reused elements.

When should I extract reusable UI blocks into ViewComponent in Rails?

Extract reusable UI blocks into ViewComponent in Rails when modular elements like dashboards or forms are repeated across multiple pages. Component extraction strategies maximize reusability and reduce duplication in heavily component-based interfaces.

What naming conventions should I follow for Rails ViewComponent?

Rails ViewComponent naming conventions should clearly distinguish between general-purpose and application-specific components to maintain organizational clarity. Following standardized naming patterns streamlines component discovery and design maintenance.

Can I build complex dashboards using ViewComponent composition?

Building complex dashboards with ViewComponent composition is fully supported in Rails through advanced patterns like slots and lifecycle management. This approach enables the assembly of modular panels and forms into cohesive reusable interfaces.