rails-design-system

v2026.09.24

Ruby on Rails design system guidelines for building consistent, maintainable UI with minimal abstraction. This skill should be used when creating or refactoring Rails views, partials, components, form builders, helpers, Stimulus controllers, Turbo Frames, Turbo Streams, or design tokens. Triggers on tasks involving ERB partials, Turbo navigation, Turbo Streams, ViewComponent, Phlex, Tailwind design tokens, custom form builders, view helpers, Stimulus behaviors, Import Maps, Lookbook previews, or design system consistency audits.

GitHub
安装命令
npx skhub add pproenca/rails-design-system
Markdown
SKILL.md

Community Ruby on Rails Design System Best Practices

Comprehensive design system guide for Ruby on Rails applications, maintained by Community. Contains 51 rules across 9 categories, prioritized by impact to guide automated refactoring and code generation. Covers the full Rails frontend stack: Turbo (Drive, Frames, Streams), Stimulus, ERB partials, design tokens, form builders, and view helpers. Complements rails-dev (controllers, models, queries) and tailwind (CSS patterns) by covering the systematic UI component architecture layer.

When to Apply

Reference these guidelines when:

  • Deciding whether to extract a partial, component, or helper
  • Defining design tokens with Tailwind CSS @theme
  • Creating or refactoring ERB partials with explicit locals
  • Decomposing pages into Turbo Frames for targeted updates
  • Using Turbo Streams for multi-element CRUD updates
  • Coordinating Turbo navigation with Stimulus controllers
  • Building ViewComponent or Phlex components for complex UI
  • Implementing a custom FormBuilder for consistent forms
  • Writing view helpers for badges, icons, and conditional classes
  • Adding Stimulus controllers for interactive behaviors
  • Managing JavaScript dependencies with Import Maps
  • Auditing the codebase for UI duplication and naming drift

Rule Categories by Priority

PriorityCategoryImpactPrefix
1Design DecisionsCRITICALdecide-
2Design TokensCRITICALtoken-
3Turbo IntegrationHIGHturbo-
4Partial PatternsHIGHpartial-
5Component ArchitectureHIGHcomp-
6Form SystemMEDIUM-HIGHform-
7Helper PatternsMEDIUMhelper-
8Stimulus BehaviorsMEDIUMstim-
9Consistency & OrganizationLOW-MEDIUMorg-

Quick Reference

1. Design Decisions (CRITICAL)

2. Design Tokens (CRITICAL)

3. Turbo Integration (HIGH)

4. Partial Patterns (HIGH)

5. Component Architecture (HIGH)

6. Form System (MEDIUM-HIGH)

7. Helper Patterns (MEDIUM)

8. Stimulus Behaviors (MEDIUM)

9. Consistency & Organization (LOW-MEDIUM)

How to Use

Read individual reference files for detailed explanations and code examples:

Reference Files

FileDescription
references/_sections.mdCategory definitions and ordering
assets/templates/_template.mdTemplate for new rules
metadata.jsonVersion and reference information
发现
标签

此技能尚未发布标签。

版本
最新版本元数据

版本

v2026.09.24

发布时间

2026年9月24日

分类

未分类

许可证

MIT

源路径

skills/.experimental/rails-design-system

默认分支

master

最新提交

cf93c57

Tree SHA

afbb575