/superpowers-rails:rails-view-conventionsfrom superpowers-rails
Defines conventions for Rails views, partials, and ViewComponents. Uses Hotwire/Turbo for dynamic updates, Stimulus for JavaScript, and prohibits custom helpers. Promotes dumb views and ViewComponents for presentation logic.
Ships in superpowers-rails. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Views are dumb templates. Presentation logic lives in ViewComponents, domain logic lives in models.
app/helpers/ is prohibited. Use ViewComponents insteadWhy? Testability. Logic in views cannot be unit tested.
Use for: formatting, conditional rendering, computed display values — anything that would go in a helper.
Models vs ViewComponents: Models answer domain questions ("what is the deadline?"). ViewComponents answer presentation questions ("how do we display it?" — colors, icons, formatting).
Ask models, don't reach into their internals (see rails-model-conventions for the full pattern):
<%# WRONG - reaching into associations %>
<% if current_user.bookmarks.exists?(academy: academy) %>
<%# RIGHT - ask the model %>
<% if current_user.bookmarked?(academy) %>
form_with for all forms| Do | Don't |
|---|---|
current_user.bookmarked?(item) | current_user.bookmarks.exists?(...) |
task.requires_review? | task.review_criteria.any? in component |
| Turbo frames for updates | JSON API calls |
| Stimulus for JS behavior | Inline JavaScript |
| Partials for simple markup | Duplicated markup |
| ViewComponents for logic | Custom helpers |
Remember: Views render. ViewComponents present. Models decide.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub fryga-io/superpowers-rails --plugin superpowers-rails23 skills in this plugin
/brainstormingYou MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation./diagnosing-superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness./dispatching-parallel-agentsUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesOther plugins' skills for the same job