ワンクリックで
viewcomponent
ViewComponent patterns, naming conventions, and structure for this Rails codebase
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
ViewComponent patterns, naming conventions, and structure for this Rails codebase
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Create, execute, update, and complete implementation plans and trackers following Linkvan API conventions
Standardized Ruby gem update workflow with version checking, breaking change analysis, security advisory detection, and testing
Controller patterns, service delegation, strong parameters, and HTTP conventions for this Rails codebase
RuboCop metrics, Brakeman security, code style conventions, and quality checks for this Rails codebase
Database migration patterns, reversible migrations, indexes, and conventions for this Rails codebase
ActiveRecord model patterns, validations, scopes, and conventions for this Rails codebase
| name | viewcomponent |
| description | ViewComponent patterns, naming conventions, and structure for this Rails codebase |
All components inherit from ViewComponent::Base:
class Features::CardComponent < ViewComponent::Base
def initialize(feature:)
super()
@feature = feature
end
def private_method
# Helper methods
end
end
Namespace::Name pattern (e.g., Facilities::CardComponent)features/card_component.rbapp/components/ directory (namespaced)super() in initializeinitialize (e.g., feature:)@ prefixapp/components/
├── facilities/
│ └── card_component.rb
└── features/
└── card_component.rb
spec/components/type: :component in RSpec specs# Render component with arguments
<%= render Features::CardComponent.new(feature: @feature) %>
# Or with shorthand
<%= render Features::CardComponent.new(@feature) %>
Features::, Facilities::)type: :component in RSpec