rails-design-system

📁 pproenca/dot-skills 📅 1 day ago
27
总安装量
2
周安装量
#13942
全站排名
安装命令
npx skills add https://github.com/pproenca/dot-skills --skill rails-design-system

Agent 安装分布

amp 2
opencode 2
kimi-cli 2
codex 2
github-copilot 2
claude-code 2

Skill 文档

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

Priority Category Impact Prefix
1 Design Decisions CRITICAL decide-
2 Design Tokens CRITICAL token-
3 Turbo Integration HIGH turbo-
4 Partial Patterns HIGH partial-
5 Component Architecture HIGH comp-
6 Form System MEDIUM-HIGH form-
7 Helper Patterns MEDIUM helper-
8 Stimulus Behaviors MEDIUM stim-
9 Consistency & Organization LOW-MEDIUM org-

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

File Description
references/_sections.md Category definitions and ordering
assets/templates/_template.md Template for new rules
metadata.json Version and reference information