К основному содержанию
скилл CX Codex

design-systems — скилл для Claude Code: дизайн-система с нуля

Помогает агенту выстроить дизайн-токены, компонентную библиотеку и правила доступности в одном проекте.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add Mindrally/skills --skill design-systems -a claude-code
Открыть на GitHub

Что делает design-systems

Скилл задаёт агенту порядок работы над дизайн-системой: сначала инвентаризация существующего интерфейса, потом токены, атомарные компоненты, составные паттерны, документация и только затем тесты и правила приёма новых компонентов. Внутри — рекомендации по цвету, типографике, отступам, иконкам и архитектуре компонентов, включая состояния и варианты.

Отдельный блок про доступность: семантическая разметка, ARIA-подписи, навигация с клавиатуры, контраст по WCAG 2.1 AA и поддержка reduced motion. Есть примеры на CSS custom properties, компонент Button на React с типами и конфигурация Storybook с импортом токенов.

Токены скилл советует держать в CSS custom properties или в формате вроде Style Dictionary, а визуальные регрессии и линтинг доступности подключать через Chromatic и axe-core. Если в проекте уже есть своя библиотека компонентов, часть шагов придётся пропустить: аудит и определение токенов рассчитаны на то, что единого источника правды ещё нет.

Какие задачи решает

  • свести цвета, отступы и типографику к одному набору токенов
  • собрать атомарные компоненты с понятным API и типами
  • описать состояния и варианты компонента до начала вёрстки
  • настроить Storybook как живую документацию библиотеки
  • добавить проверку контраста и навигации с клавиатуры

Примеры запросов агенту

  • проведи аудит текущего UI и выпиши, какие компоненты и цвета дублируются
  • заведи дизайн-токены в CSS custom properties и переведи на них кнопку и поле ввода
  • настрой Storybook со стори для каждого варианта компонента и аннотациями по доступности

Как установить design-systems

1Через Skills CLI (Vercel)

npx skills add Mindrally/skills --skill design-systems -a claude-code

2Вручную: положить файлы

~/.claude/skills/design-systems/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/design-systems/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о design-systems

Как установить design-systems в Claude?

Выполните npx skills add Mindrally/skills --skill design-systems -a claude-code. Файл скилла окажется по пути ~/.claude/skills/design-systems/SKILL.md.

Что делает скилл design-systems?

Ведёт агента по шагам построения дизайн-системы: аудит UI, токены, базовые компоненты, паттерны, документация, тесты и правила контрибуции.

Какие требования по доступности заложены в скилл?

Ориентир — WCAG 2.1 AA: семантический HTML, ARIA-подписи, работа с клавиатуры, проверка скринридером и учёт reduced motion.

Исходный текст

SKILL.md · Apache-2.0
---
name: design-systems
description: "Comprehensive design system guidelines for building consistent, accessible, and scalable component libraries. Use when creating design tokens, building component libraries, implementing design systems, setting up theming architecture, or establishing UI governance processes."
metadata:
  maintainer: Mindrally
  source: https://github.com/Mindrally/skills
---

# Design Systems Best Practices

Guidelines for creating and maintaining design systems that ensure visual consistency, accessibility compliance, and scalable component architecture across digital products.

## Workflow: Setting Up a Design System

1. **Audit existing UI** — Inventory current components, colors, typography, and spacing across the product to identify inconsistencies and reusable patterns.
2. **Define design tokens** — Establish primitive tokens (colors, spacing, typography, shadows) as CSS custom properties or a token format (e.g., Style Dictionary) that serves as the single source of truth.
3. **Build foundational components** — Create atomic components (Button, Input, Text, Icon) that consume design tokens and expose a clear props API with TypeScript types.
4. **Compose patterns and layouts** — Assemble atomic components into higher-order patterns (forms, cards, navigation) with documented usage guidelines.
5. **Set up documentation and Storybook** — Configure Storybook with stories for every component variant, state, and accessibility annotation. Publish as a living style guide.
6. **Integrate testing and governance** — Add visual regression tests (e.g., Chromatic), accessibility linting (e.g., axe-core), and a contribution/review process for new components.
7. **Ship and iterate** — Publish the library as a versioned package, gather consumer feedback, and run regular accessibility and performance audits.

## Foundation Elements

### Color System

- Define primary, secondary, and accent colors
- Include semantic colors for success, warning, error, info states
- Ensure all color combinations meet WCAG contrast requirements
- Document color usage guidelines and contexts
- Provide light and dark mode variants

### Typography

- Establish a type scale with consistent ratios
- Define font families for headings and body text
- Set line heights and letter spacing standards
- Document font weights and their usage
- Ensure readability across screen sizes

### Spacing System

- Define consistent spacing scale (4px, 8px, 16px, 24px, etc.)
- Create layout primitives for common patterns
- Document margin and padding conventions
- Ensure responsive spacing behavior
- Use CSS custom properties for maintainability

### Icons and Imagery

- Maintain consistent icon style and sizing
- Define icon grid and stroke weights
- Document icon naming conventions
- Optimize assets for web performance
- Provide multiple formats when needed (SVG, PNG)

## Component Architecture

### Component Structure

- Create atomic, reusable components
- Define clear component APIs (props/attributes)
- Document variants and states
- Ensure components are accessible by default
- Provide clear naming conventions

### Component States

- Default state
- Hover state
- Focus state (keyboard navigation)
- Active/pressed state
- Disabled state
- Loading state
- Error state

### Component Variants

- Size variants (small, medium, large)
- Color/theme variants
- Layout variants
- Contextual variants

## Accessibility Requirements

- Follow WCAG 2.1 AA guidelines minimum
- Use semantic HTML elements
- Provide ARIA labels where needed
- Ensure keyboard navigation
- Test with screen readers
- Maintain color contrast ratios
- Support reduced motion preferences

## Documentation Standards

### Component Documentation

- Purpose and use cases
- Props/API reference
- Code examples
- Do's and don'ts
- Accessibility notes
- Related components

### Pattern Documentation

- When to use
- Anatomy breakdown
- Behavior specifications
- Responsive considerations
- Edge cases

## Implementation Guidelines

### CSS Architecture

- Use CSS custom properties for tokens
- Implement utility classes for common patterns
- Follow BEM or similar naming convention
- Ensure specificity is manageable
- Support theming and customization

### Component Libraries

- Framework-agnostic when possible
- Tree-shakeable exports
- TypeScript support
- Comprehensive test coverage
- Storybook integration

## Governance

### Contribution Guidelines

- How to propose new components
- Review and approval process
- Versioning strategy
- Breaking change policy
- Deprecation process

### Maintenance

- Regular accessibility audits
- Performance monitoring
- Browser compatibility testing
- Documentation updates
- Community feedback incorporation

## Design Tokens

### Token Categories

- Colors
- Typography (font sizes, weights, line heights)
- Spacing
- Border radius
- Shadows
- Breakpoints
- Animation durations
- Z-index values

### Token Implementation

```css
:root {
  /* Colors */
  --color-primary-500: #0066cc;
  --color-neutral-100: #f5f5f5;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-4: 16px;

  /* Typography */
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
}
```

### Example: React Button Component Using Design Tokens

```tsx
import React from "react";

interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
  variant?: "primary" | "secondary" | "danger";
  size?: "sm" | "md" | "lg";
  loading?: boolean;
}

const sizeStyles: Record<string, React.CSSProperties> = {
  sm: { padding: "var(--space-1) var(--space-2)", fontSize: "var(--font-size-sm)" },
  md: { padding: "var(--space-2) var(--space-4)", fontSize: "var(--font-size-base)" },
  lg: { padding: "var(--space-3) var(--space-6)", fontSize: "var(--font-size-lg)" },
};

export const Button: React.FC<ButtonProps> = ({
  variant = "primary",
  size = "md",
  loading = false,
  disabled,
  children,
  ...props
}) => (
  <button
    style={{
      ...sizeStyles[size],
      backgroundColor: `var(--color-${variant}-500)`,
      color: "var(--color-neutral-100)",
      borderRadius: "var(--radius-md)",
      boxShadow: "var(--shadow-sm)",
      cursor: disabled || loading ? "not-allowed" : "pointer",
      opacity: disabled ? 0.5 : 1,
    }}
    disabled={disabled || loading}
    aria-busy={loading}
    {...props}
  >
    {loading ? "Loading…" : children}
  </button>
);
```

### Example: Storybook Configuration

```ts
// .storybook/preview.ts
import type { Preview } from "@storybook/react";
import "../src/tokens.css"; // import design tokens globally

const preview: Preview = {
  parameters: {
    a11y: { element: "#storybook-root" },
    backgrounds: {
      default: "light",
      values: [
        { name: "light", value: "#ffffff" },
        { name: "dark", value: "#1a1a1a" },
      ],
    },
  },
};

export default preview;
```

## Quality Assurance

- Visual regression testing
- Accessibility automated testing
- Cross-browser testing
- Performance benchmarking
- Component unit testing
- Integration testing

When evolving the design system, validate changes against WCAG 2.1 AA, run visual regression tests, and ensure token updates propagate correctly across all consuming applications.

© Mindrally · Apache-2.0 · Mindrally/skills

Похожие скиллы

Всё по теме «Дизайн» →
tailwindcss-advanced-design-systems JosiahSiegel Скилл для сборки дизайн-системы на Tailwind v4: токены в @theme, цветовые шкалы, типографика, тени и тёмная тема. CX Codex +1 655установок design-systems-frontend-architecture hueyexe Помогает агенту превратить решения по UI и бренду в переиспользуемые компоненты, токены и правила вёрстки. CX Codex +1 635установок stitch::extract-design-md официальный google-labs-code Извлекает дизайн-систему в файл DESIGN.md прямо из исходников фронтенда без сборки проекта. Помогает перенести визуальные токены и правила вёрстки в формат Stitch. CX Codex +1 10 600установок ui-design-system Alireza Rezvani Скилл собирает дизайн-токены, палитры, типографику и структуру компонентов. Пригодится для дизайн-системы и передачи макетов разработчикам. 1 076установок design-system rampstackco Собирает или проверяет дизайн-систему: токены, библиотеку компонентов, правила именования, модель контрибуции и документацию. Пригодится, когда продукты расходятся по стилю. CX Codex +1 310установок design-systems-slds-apply forcedotcom Скилл учит агента собирать интерфейсы на Salesforce Lightning Design System: подбирать блюпринты, хуки стилей, утилитарные классы и иконки. CX Codex +1 6 000установок

Из того же набора168

security-best-practices Скилл задаёт правила безопасной разработки бэкенда и микросервисов. Помогает выстроить проверку пользовательского ввода, защиту API и аутентификацию без утечек секретов или стектрейсов. CX Codex +1 930установок flutter Задаёт правила разработки на Flutter и Dart: чистую архитектуру по фичам, управление состоянием через Riverpod или BLoC и ограничения на вложенность виджетов. CX Codex +1 925установок laravel-development Скилл задаёт агенту рамки Laravel-разработки: SOLID, PSR-12, Eloquent вместо сырого SQL. Пригодится, когда ИИ пишет код в Laravel-проекте. CX Codex +1 909установок unity Скилл задаёт агенту правила игры в Unity: компонентная архитектура, ScriptableObjects, пулы объектов и работа с профайлером. CX Codex +1 908установок wordpress Скилл wordpress задаёт агенту правила разработки под WordPress и WooCommerce на PHP. Он держит код в рамках стандартов WordPress, напоминает про хуки, nonce и подготовленные запросы. CX Codex +1 894установок mongodb-development Правила разработки на MongoDB: схемы, индексы, агрегации, Mongoose и Payload CMS. Пригодится, когда агент пишет бэкенд на TypeScript. CX Codex +1 891установок scikit-learn-best-practices Скилл задаёт агенту правила работы со scikit-learn: пайплайны, кросс-валидация, метрики, сохранение моделей. Пригодится, когда пишете ML-код на Python. CX Codex +1 888установок astro Скилл задаёт агенту правила работы с Astro: статическая генерация, частичная гидратация, файловый роутинг и минимум клиентского JavaScript. CX Codex +1 886установок

Спонсоры проекта

Компании, которые помогают держать аналитику открытой