erb-to-view-model

Community

Migrate ERB logic into precomputed ViewModels.

Authordailydm
Version1.0.0
Installs0

System Documentation

What problem does it solve?

ERB templates often mix presentation with business logic or rely on instance variables and helpers, making maintenance painful. This Skill guides migrating ERB templates to precomputed Ruby ViewModels that read only from explicit data, improving testability and separation of concerns.

Core Features & Use Cases

  • Precompute values in a dedicated ViewModel under app/view_models/, replacing @variables and helpers with view_model attributes.
  • Thin controllers that pass a single view_model to views and delegate logic to the ViewModel.
  • Bottom-up migration starting from deepest partials and moving upward, ensuring complete render-tree coverage.

Quick Start

Create a new or updated ViewModel using self.init(params) and render the view with locals: { view_model: @view_model }.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 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: erb-to-view-model
Download link: https://github.com/dailydm/skills/archive/main.zip#erb-to-view-model

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.