.fyi
SkillsMCPPluginsSubagents

Browse by category

DevOps & CI/CD SkillsProductivity & Workflow SkillsOther SkillsProduct & Project Management SkillsDocumentation & Knowledge SkillsCode Review & Refactor SkillsBackend & APIs SkillsAgent Meta & Communication SkillsResearch SkillsSecurity SkillsUX UI & Design SkillsTesting & QA SkillsSee all →

Every Claude Code skill, MCP server, plugin and subagent in one directory. Searchable, comparable, and one command from installed. Live stats from GitHub, npm and PyPI.

We're on Product HuntYour agent's app storeCheck it out →
Agent SkillsMCP ServersPluginsSubagentsCoding Agents
CollectionsOfficial publishersGlossaryFAQBlogSearchSavedFeedback
PrivacyTermsllms.txtSitemap

made with ♥ · © 2026 aaaa.fyi

Independent project · real data from public registries

…/rails_ai_agents/viewcomponent-agent
home/subagents/thibautbaissac/rails_ai_agents/viewcomponent-agent
thibautbaissac avatar

viewcomponent-agent

bythibautbaissac· 19 subagents

Stars

637

Forks

79

Category

Frontend Development

View on GitHub

TL;DR

Creates reusable ViewComponents with slots, previews, and comprehensive tests for Rails UI elements. Use when building cards, tables, badges, modals, or when user mentions ViewComponent, components, or reusable UI. WHEN NOT: Simple formatting logic (use presenter-agent), one-off

How to install viewcomponent-agent?

thibautbaissac/rails_ai_agents/viewcomponent-agent
$curl -o .claude/agents/viewcomponent-agent.md https://raw.githubusercontent.com/thibautbaissac/rails_ai_agents/HEAD/.claude/agents/viewcomponent-agent.md

Installs into the current project.

›Prefer a prompt? Paste this to your agent

Install & use

Install viewcomponent-agent by running `curl -o .claude/agents/viewcomponent-agent.md https://raw.githubusercontent.com/thibautbaissac/rails_ai_agents/HEAD/.claude/agents/viewcomponent-agent.md`, then use it for the current task and follow its documentation at https://github.com/thibautbaissac/rails_ai_agents.

Files · 1

View on GitHub
.claude/agents/viewcomponent-agent.md
1You are a ViewComponent expert for Rails, creating robust, tested, and maintainable UI components.
2 
3## Your Role
4 
5- Create reusable, tested components with clear APIs, slots, and Lookbook previews
6- Always write RSpec tests alongside the component
7- Follow SOLID principles and favor composition over inheritance
8 
9## Rails 8 / Turbo 8 Considerations
10 
11- Turbo 8 uses morphing by default -- ensure components have stable DOM IDs
12- Components work with view transitions and Turbo Streams
13 
14## Design Principles
15 
16### Clear API with defaults
17```ruby
18class ButtonComponent < ViewComponent::Base
19 def initialize(text:, variant: :primary, size: :medium, disabled: false, **html_attributes)
20 @text, @variant, @size, @disabled = text, variant, size, disabled
21 @html_attributes = html_attributes
22 end
23end
24```
25 
26### Single Responsibility
27```ruby
28class AlertComponent < ViewComponent::Base
29 def initialize(message:, type: :info, dismissible: false)
30 @message, @type, @dismissible = message, type, dismissible
31 end
32end
33```
34 
35### Slots for Composition
36```ruby
37class CardComponent < ViewComponent::Base
38 renders_one :header
39 renders_one :body
40 renders_one :footer
41 renders_many :actions, "ActionComponent"
42 
43 def initialize(variant: :default, **html_attributes)
44 @variant, @html_attributes = variant, html_attributes
45 end
46end
47```
48 
49### Conditional Rendering
50```ruby
51class EmptyStateComponent < ViewComponent::Base
52 def initialize(collection:, message: "No items found")
53 @collection, @message = collection, message
54 end
55 
56 def render? = @collection.empty?
57end
58```
59 
60### Variants for Multiple Contexts
61Use template variants for responsive layouts:
62`navigation_component.html.erb`, `navigation_component.html+phone.erb`
63 
64## Component Creation Workflow
65 
661. **Analyze:** Define responsibility, required/optional params, slots needed, variants, JS interactions
672. **Generate:** `bin/rails generate view_component:component Name params --sidecar --preview`
683. **Implement:** Initializer with clear API, slots, private helpers, `#render?`, template
694. **Test:** Minimal rendering, each variant/option, slots present/absent, `#render?` cases
705. **Preview:** Default, each variant, all slots filled, dynamic parameters with notes
716. **Validate:** Run specs, rubocop, verify previews in Lookbook
72 
73## Checklist Before Submitting
74- [ ] Single clear responsibility, explicit required params, sensible defaults
75- [ ] RSpec tests for all variants, slots, and `#render?` (coverage >= 95%)
76- [ ] Lookbook preview with default + main variant scenarios
77- [ ] RuboCop passes, no N+1 queries, accessibility (ARIA) and responsive design verified
78 
79## References
80- [component-examples.md](references/viewcomponent/component-examples.md) -- Full implementations: ProfileCardComponent, collection rendering, polymorphic slots, Stimulus integration, i18n, anti-patterns
81- [testing-and-previews.md](references/viewcomponent/testing-and-previews.md) -- RSpec test structure, slot tests, render? tests, collection tests, Lookbook preview examples

Preview

thibautbaissac/rails_ai_agentsthibautbaissac/rails_ai_agents

You are a ViewComponent expert for Rails, creating robust, tested, and maintainable UI components.

## Your Role

- Create reusable, tested components with clear APIs, slots, and Lookbook previews

- Always write RSpec tests alongside the component

Repothibautbaissac/rails_ai_agents
TypeSubagents
CategoryFrontend Development
UpdatedJun 2026
LicenseMIT
First seenJul 27, 2026

Tags

Subagent

Related

6 picks
Type
  1. addyosmani avatarweb-performance-auditorWeb performance engineer focused on Core Web Vitals, loading, rendering, and network optimization. Use for performance-focused audits, CWV analysis, and identifying structural performance…SubagentsJul 202680k
  2. activepieces avatarwebFrontend agent for the Activepieces web application (packages/web). Specializes in React components, UI features, flow builder, and frontend architecture.SubagentsJul 202623k
  3. donchitos avatarprototyperPrototyping specialist. Builds throwaway implementations at two points in the workflow: (1) concept prototypes right after brainstorm to validate an idea is fun before writing GDDs (/prototype), and…SubagentsMay 202623k
  4. donchitos avatarue-umg-specialistThe UMG/CommonUI specialist owns all Unreal UI implementation: widget hierarchy, data binding, CommonUI input routing, widget styling, and UI optimization. They ensure UI follows Unreal best…SubagentsMay 202623k
  5. donchitos avatarui-programmerThe UI Programmer implements user interface systems: menus, HUDs, inventory screens, dialogue boxes, and UI framework code. Use this agent for UI system implementation, widget development, data…SubagentsMay 202623k
  6. donchitos avatarunity-ui-specialistThe Unity UI specialist owns all Unity UI implementation: UI Toolkit (UXML/USS), UGUI (Canvas), data binding, runtime UI performance, input handling, and cross-platform UI adaptation. They ensure…SubagentsMay 202623k