mcpField
R
rails-design-system

rails-design-system

github.com/pproencaDesign & UI218265 installsUpdated 11w ago
Repository

About rails-design-system

rails-design-system is a skill of UI architecture guidelines for Ruby on Rails applications. It covers Turbo, Stimulus, ERB, design tokens, forms, components, and helpers to help teams make consistent design-system decisions and refactor views.

Key features

  1. 01Guidance for design-system decisions
  2. 02Tailwind design-token patterns
  3. 03Turbo Frames and Streams practices
  4. 04ERB partial and component patterns
  5. 05Consistent forms and view helpers
  6. 06Stimulus and Import Maps guidance

Use cases

  1. 01Choosing between partials, helpers, and components
  2. 02Breaking pages into Turbo Frames
  3. 03Standardizing form markup and errors
  4. 04Auditing duplicated view patterns

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/pproenca/dot-skills --skill rails-design-system

After installing, type/rails-design-systemin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

metadata.json
assets/templates/
_template.md
references/
_sections.md
comp-explicit-args.md
comp-slots-for-markup.md
comp-test-rendered-output.md
comp-when-to-use.md
decide-avoid-wrapper-components.md
decide-design-system-scope.md
decide-helper-vs-partial.md
decide-partial-vs-component.md
decide-prove-then-extract.md
decide-three-uses-rule.md
form-accessible-labels.md
form-button-consistency.md
form-custom-builder.md
form-error-display.md
form-group-wrapper.md
form-set-default-builder.md
helper-badge-pattern.md
helper-conditional-classes.md
helper-icon-helper.md
helper-scope-to-domain.md
helper-tag-helpers.md
org-deduplication-audit.md
org-document-design-decisions.md
org-file-structure.md
org-import-maps.md
org-naming-conventions.md
org-preview-with-lookbook.md

Details

From the project README

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

Comments

Markdown supported