rails-design-system
БесплатноБез исполняемых скриптовНе проверенRuby on Rails design system guidelines for building consistent, maintainable UI with minimal abstraction. This skill should be used when creating or…
от pproenca★ 231 звезда на GitHubОб этом скилле
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)
decide-three-uses-rule- Extract only after a pattern appears in 3+ placesdecide-partial-vs-component- Choose partials for simple reuse, components for complex logicdecide-helper-vs-partial- Use helpers for tiny HTML fragments, partials for layout blocksdecide-prove-then-extract- Prove patterns in production before abstractingdecide-avoid-wrapper-components- Avoid thin wrappers that add indirection without valuedecide-design-system-scope- Scope the design system to what the app actually needs
2. Design Tokens (CRITICAL)
token-tailwind-theme- Define tokens with Tailwind CSS @theme directivetoken-semantic-color-names- Name colors by purpose, not appearancetoken-spacing-scale- Use a constrained spacing scale for consistent layouttoken-typography-scale- Define a typography scale for headings, body, and UI texttoken-component-tokens- Create component-level tokens for repeated patternstoken-share-tokens-with-ruby- Share token values between CSS and Ruby when needed
3. Turbo Integration (HIGH)
turbo-drive-defaults- Let Turbo Drive handle navigation by defaultturbo-frame-decompose- Decompose pages into Turbo Frames for targeted updatesturbo-frame-naming- Name Turbo Frames with dom_id conventionsturbo-frame-vs-stream- Choose Turbo Frames vs Turbo Streams by scope of changeturbo-stream-crud- Use Turbo Streams for multi-element page updatesturbo-stimulus-coordination- Coordinate Turbo and Stimulus without conflicts
4. Partial Patterns (HIGH)
partial-explicit-locals- Always pass locals explicitly to partialspartial-presenter-objects- Use presenter objects to encapsulate view logicpartial-naming-conventions- Name partials by what they render, prefixed with underscorepartial-yield-blocks- Use yield blocks for flexible partial layoutspartial-collection-with-spacer- Use collection rendering with spacer templatespartial-shared-directory- Place cross-controller partials in app/views/shared
5. Component Architecture (HIGH)
- [`comp-when-
Установить rails-design-system в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл rails-design-system?
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.
Как установить скилл rails-design-system?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл rails-design-system запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
frontend-design
Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making…
от Anthropicwebapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing…
от Anthropicbrand-guidelines
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand…
от Anthropicweb-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use…
от Anthropic