view-component
Installation
SKILL.md
Rails ViewComponent
Build cohesive, accessible Rails UI with explicit component contracts and rendered-output verification. Apply the installed ViewComponent version and the application's design system rather than assuming that every renderable Ruby object implements ViewComponent's API.
Start with the actual contract
- Read every applicable
AGENTS.mdand nearby component or design-system documentation. - Identify the implementation before proposing or editing anything:
- Search dependency manifests and lockfiles for
view_component. - Inspect the component's superclass and base class.
- Inspect existing generators, configuration, neighboring components, previews, and tests.
- Record the installed gem version. Do not use a newer API without confirming it exists locally.
- Search dependency manifests and lockfiles for
- For adoption or conversion work, read references/migration.md before designing the target contract.
- Define the component's responsibility, inputs, caller-provided regions, output states, interaction states, and accessibility contract before choosing APIs.
Route to the relevant guidance
Read only the references the task needs: