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

frontend-design · jwynia — скилл для Claude Code: дизайн-система из кода

Аудит существующего CSS, извлечение токенов и генерация палитр, типографики и компонентов. Пригодится, когда интерфейс выглядит как типовой вывод ИИ.

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

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

Скилл закрывает две задачи: разобрать то, что уже написано, и собрать новое. В режиме анализа скрипты на Deno проходят по CSS, собирают инвентарь цветов, размеры шрифтов и отступы, находят расхождения и проверяют контраст, фокусные состояния и размеры зон нажатия по WCAG. В режиме генерации те же скрипты делают палитру от seed-цвета, типографическую шкалу, файл дизайн-токенов и шаблон компонента.

Внутри — набор TypeScript-скриптов: analyze-styles.ts, extract-tokens.ts, analyze-accessibility.ts, generate-palette.ts, generate-typography.ts, generate-tokens.ts, generate-component.ts. Токены выгружаются в css, scss, tailwind, style-dictionary или tokens-studio. Компоненты генерируются под React, Vue, Svelte и обычный HTML/CSS, стилизация — в том числе через tailwind.

Для запуска нужен Deno с правами --allow-read и --allow-write. Если Deno в проекте нет, скрипты просто не стартуют — это первое, что стоит проверить перед установкой. Анализ без входных CSS-файлов тоже не имеет смысла, так что режим аудита подключайте, когда есть что разбирать.

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

  • найти расхождения в цветах и отступах по всему CSS
  • вытащить дизайн-токены из старой кодовой базы
  • собрать палитру от одного seed-цвета
  • построить типографическую шкалу с внятной иерархией
  • проверить контраст и фокусные состояния перед релизом

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

  • проанализируй styles.css и покажи, где цвета и отступы расходятся
  • сгенерируй палитру от #2563eb в тёплой теме и выведи в css
  • сделай компонент Button для react со стилями на tailwind

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

1Через Skills CLI (Vercel)

npx skills add jwynia/agent-skills --skill frontend-design -a claude-code

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

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

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

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

Вопросы о frontend-design

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

Выполните npx skills add jwynia/agent-skills --skill frontend-design -a claude-code. После этого файл скилла лежит в ~/.claude/skills/frontend-design/SKILL.md.

Что делает frontend-design?

Анализирует существующий CSS на расхождения и доступность, извлекает дизайн-токены, а затем генерирует палитры, типографические системы, файлы токенов и шаблоны компонентов.

Что нужно для работы скилла?

Рантайм Deno с правами --allow-read и --allow-write — на нём запускаются все скрипты. Для режима анализа понадобятся сами CSS- или дизайн-файлы.

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

SKILL.md · MIT
---
name: frontend-design
description: "Create distinctive, production-grade frontend interfaces with high design quality. Provides analysis tools for auditing existing designs and generation tools for creating color palettes, typography systems, design tokens, and component templates. Supports React, Vue, Svelte, and vanilla HTML/CSS. Use when building web components, pages, or applications. Keywords: design, UI, frontend, CSS, components, palette, typography, tokens, accessibility."
license: MIT
compatibility: Requires Deno with --allow-read, --allow-write permissions
metadata:
  author: agent-skills
  version: "1.0"
  type: generator
  mode: generative
  domain: development
---

# Frontend Design

Create distinctive, production-grade frontend interfaces that avoid generic "AI slop" aesthetics. This skill combines design philosophy guidance with practical TypeScript tooling for analyzing existing designs and generating design system artifacts.

**Core Principle**: Choose a clear aesthetic direction and execute it with precision. Bold maximalism and refined minimalism both work - the key is intentionality, not intensity.

## When to Use This Skill

**Use when**:
- Building web components, pages, or applications
- Auditing existing CSS for design inconsistencies
- Extracting design tokens from legacy codebases
- Generating color palettes and typography systems
- Creating component templates across frameworks
- Checking accessibility compliance for design elements

**Don't use when**:
- Simple text content changes
- Backend-only work
- Non-visual functionality

## Prerequisites

- **Deno** runtime (for script execution)
- Optional: Existing CSS/design files for analysis
- Optional: Design tokens file for reference

## Quick Start

This skill operates in three modes:

### 1. Analyze Mode
Audit existing styles, extract tokens, check accessibility.

```bash
# Audit CSS for design patterns and inconsistencies
deno run --allow-read scripts/analyze-styles.ts styles.css

# Extract design tokens from existing CSS
deno run --allow-read scripts/extract-tokens.ts ./src --format css

# Check accessibility (contrast, focus states)
deno run --allow-read scripts/analyze-accessibility.ts component.tsx
```

### 2. Specify Mode
Create JSON specifications defining what to generate. See `assets/` for schema examples.

### 3. Generate Mode
Create palettes, typography systems, tokens, and components.

```bash
# Generate a color palette
deno run --allow-read --allow-write scripts/generate-palette.ts --seed "#2563eb" --theme warm

# Generate typography system
deno run --allow-read --allow-write scripts/generate-typography.ts --display "Playfair Display" --body "Source Sans Pro"

# Generate design tokens file
deno run --allow-read --allow-write scripts/generate-tokens.ts tokens-spec.json ./output/

# Generate a component
deno run --allow-read --allow-write scripts/generate-component.ts --name Button --framework react --styling tailwind
```

---

## Instructions

### Phase 1: Analysis (Optional but Recommended)

Before creating new designs, audit existing code to understand current patterns.

#### 1a. Style Analysis

Analyze CSS files to identify colors, typography, spacing, and inconsistencies:

```bash
deno run --allow-read scripts/analyze-styles.ts <input> [options]

Options:
  --tokens <file>    Compare against existing design tokens
  --pretty           Pretty-print JSON output
  --format <type>    Output format: json (default), summary
```

**Output includes**:
- Color usage inventory with hex normalization
- Typography patterns (fonts, sizes, weights)
- Spacing value distribution
- Inconsistencies and recommendations

#### 1b. Token Extraction

Extract design tokens from CSS files into standardized formats:

```bash
deno run --allow-read scripts/extract-tokens.ts <input> [options]

Options:
  --format <type>    Output: css, scss, tailwind, style-dictionary, tokens-studio
  --output-css       Also output CSS variables file
```

#### 1c. Accessibility Audit

Check design-related accessibility issues:

```bash
deno run --allow-read scripts/analyze-accessibility.ts <input> [options]

Options:
  --format <type>    Output: json, summary
  --level <AA|AAA>   WCAG conformance level (default: AA)
```

**Checks include**:
- Color contrast ratios
- Focus indicator presence
- Touch target sizes
- Motion preference respect

---

### Phase 2: Generation

#### 2a. Color Palette Generation

Generate cohesive color palettes from seed colors or themes:

```bash
deno run --allow-read --allow-write scripts/generate-palette.ts [options] <output>

Options:
  --seed <color>     Primary seed color (hex)
  --theme <type>     warm, cool, neutral, vibrant, muted, dark, light
  --style <type>     minimalist, bold, organic, corporate, playful
  --shades           Generate 50-950 shade scale
  --semantic         Generate success/warning/error colors
  --contrast <lvl>   Target contrast: AA (default), AAA
  --format <type>    css, scss, tailwind, tokens, json
```

**Example specification** (`palette-spec.json`):
```json
{
  "seedColors": {
    "primary": "#2563eb",
    "accent": "#f59e0b"
  },
  "theme": "cool",
  "generateShades": true,
  "generateSemantics": true,
  "contrastTarget": "AA",
  "outputFormat": "css"
}
```

#### 2b. Typography System Generation

Generate typography systems with font stacks and scales:

```bash
deno run --allow-read --allow-write scripts/generate-typography.ts [options] <output>

Options:
  --display <font>   Display/heading font family
  --body <font>      Body text font family
  --mono <font>      Monospace font family
  --scale <type>     minor-second, major-second, minor-third, major-third, perfect-fourth, golden-ratio
  --base <px>        Base font size (default: 16)
  --line-height      tight, normal, relaxed
  --responsive       Generate responsive breakpoints
  --format <type>    css, scss, tailwind, tokens
```

**Type scales**:
| Scale | Ratio | Character |
|-------|-------|-----------|
| minor-second | 1.067 | Subtle, conservative |
| major-second | 1.125 | Balanced, professional |
| minor-third | 1.200 | Clear hierarchy |
| major-third | 1.250 | Strong presence |
| perfect-fourth | 1.333 | Bold, impactful |
| golden-ratio | 1.618 | Dramatic, artistic |

#### 2c. Design Token Generation

Generate comprehensive design token files in multiple formats:

```bash
deno run --allow-read --allow-write scripts/generate-tokens.ts <spec> <output-dir>
```

**Specification structure**:
```json
{
  "name": "my-design-system",
  "tokens": {
    "color": { "primary": "#2563eb", "secondary": "#64748b" },
    "spacing": { "xs": "0.25rem", "sm": "0.5rem", "md": "1rem" },
    "typography": {
      "fontFamilies": { "display": "Playfair Display", "body": "Inter" },
      "fontSizes": { "sm": "0.875rem", "base": "1rem", "lg": "1.125rem" }
    },
    "shadow": { "sm": "0 1px 2px rgba(0,0,0,0.05)" },
    "border": { "radius": { "sm": "0.25rem", "md": "0.5rem" } },
    "animation": { "duration": { "fast": "150ms", "normal": "300ms" } }
  },
  "outputFormats": ["css", "scss", "tailwind", "ts"]
}
```

#### 2d. Component Generation

Generate component templates with design-focused styling:

```bash
deno run --allow-read --allow-write scripts/generate-component.ts [options] <output-dir>

Options:
  --name <name>      Component name (required)
  --type <type>      button, card, input, modal, navigation, hero, custom
  --framework <fw>   react, vue, svelte, html
  --styling <type>   css, tailwind, css-modules, styled-components, emotion
  --aesthetic <type> minimal, bold, organic, brutalist, glassmorphism, neumorphism
  --animation <lvl>  none, subtle, expressive
  --dark-mode        Include dark mode support
  --tokens <file>    Use design tokens file
```

**Framework output examples**:

React with Tailwind:
```tsx
export function Button({ variant = 'primary', children }: ButtonProps) {
  return (
    <button className="px-4 py-2 rounded-lg font-medium transition-all">
      {children}
    </button>
  );
}
```

Vue with scoped CSS:
```vue
<template>
  <button :class="['btn', `btn--${variant}`]"><slot /></button>
</template>
<script setup lang="ts">
defineProps<{ variant?: 'primary' | 'secondary' }>();
</script>
<style scoped>.btn { /* styles */ }</style>
```

Svelte:
```svelte
<script lang="ts">
  export let variant: 'primary' | 'secondary' = 'primary';
</script>
<button class="btn btn--{variant}"><slot /></button>
<style>.btn { /* styles */ }</style>
```

---

## Examples

### Example 1: Audit and Modernize Legacy CSS

```bash
# 1. Analyze existing styles
deno run --allow-read scripts/analyze-styles.ts ./legacy/styles.css --pretty > audit.json

# 2. Extract tokens from the analysis
deno run --allow-read scripts/extract-tokens.ts ./legacy/styles.css --format css > tokens.css

# 3. Generate improved palette from dominant color
deno run --allow-read --allow-write scripts/generate-palette.ts --seed "#336699" --shades --format css palette.css
```

### Example 2: Create Design System from Scratch

```bash
# 1. Generate color palette
deno run --allow-read --allow-write scripts/generate-palette.ts \
  --seed "#8b5cf6" --theme vibrant --shades --semantic --format css colors.css

# 2. Generate typography system
deno run --allow-read --allow-write scripts/generate-typography.ts \
  --display "Space Grotesk" --body "Inter" --scale major-third --responsive --format css typography.css

# 3. Generate comprehensive tokens
deno run --allow-read --allow-write scripts/generate-tokens.ts design-spec.json ./tokens/
```

### Example 3: Generate Component Library

```bash
# Generate button component for React with Tailwind
deno run --allow-read --allow-write scripts/generate-component.ts \
  --name Button --framework react --styling tailwind --aesthetic bold ./components/

# Generate card component for Vue with CSS modules
deno run --allow-read --allow-write scripts/generate-component.ts \
  --name Card --framework vue --styling css-modules --aesthetic glassmorphism ./components/

# Generate input for Svelte
deno run --allow-read --allow-write scripts/generate-component.ts \
  --name Input --framework svelte --styling css --aesthetic minimal ./components/
```

### Example 4: Accessibility Check Before Launch

```bash
# Audit all components
deno run --allow-read scripts/analyze-accessibility.ts ./src/components --level AAA --format summary
```

---

## Script Reference

| Script | Purpose | Permissions |
|--------|---------|-------------|
| `analyze-styles.ts` | Audit CSS for patterns and inconsistencies | `--allow-read` |
| `extract-tokens.ts` | Extract design tokens from CSS | `--allow-read` |
| `analyze-accessibility.ts` | Check design accessibility | `--allow-read` |
| `generate-palette.ts` | Generate color palettes | `--allow-read --allow-write` |
| `generate-typography.ts` | Generate typography systems | `--allow-read --allow-write` |
| `generate-tokens.ts` | Generate multi-format tokens | `--allow-read --allow-write` |
| `generate-component.ts` | Generate framework components | `--allow-read --allow-write` |

---

## Design Philosophy

Avoid generic "AI slop" aesthetics. See `references/design-philosophy.md` for detailed guidance.

**Key principles**:
- **Typography**: Choose distinctive fonts, not defaults (avoid Arial, Inter, Roboto)
- **Color**: Dominant colors with sharp accents, not timid palettes
- **Motion**: Orchestrated reveals over scattered micro-interactions
- **Composition**: Asymmetry, overlap, grid-breaking elements
- **Texture**: Gradients, noise, patterns - not flat solid colors

**Never converge on**:
- Purple gradients on white backgrounds
- System fonts or overused families
- Predictable card-based layouts
- Cookie-cutter Bootstrap aesthetics

---

## Common Issues

**"CSS parsing failed"**
- Ensure valid CSS syntax
- SCSS/PostCSS may need preprocessing first

**"Color contrast check failed"**
- Check for CSS variables that couldn't be resolved
- Provide the actual color values or tokens file

**"Unknown framework"**
- Supported: react, vue, svelte, html
- Check spelling and lowercase

**"Token format not supported"**
- Supported: css, scss, tailwind, style-dictionary, tokens-studio, json, ts

---

## Additional Resources

- `references/design-philosophy.md` - Detailed anti-slop aesthetics guide
- `references/token-formats.md` - Design token format specifications
- `references/framework-templates.md` - Framework-specific patterns
- `assets/*.json` - JSON schema files for specifications

---

## Related Skills

- `web-search` - Research design inspiration and trends
- `research-workflow` - Deep dive into design systems

© agent-skills · MIT · jwynia/agent-skills

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

Всё по теме «Фронтенд и UI» →

Сначала — frontend-design от других авторов.

frontend-design официальный anthropics Скилл задаёт осмысленное визуальное направление для новых интерфейсов и редизайна. Подойдёт, когда стандартный шаблонный UI не устраивает. 1 025 790установок frontend-design bytedance Скилл задаёт агенту направление в дизайне до того, как он напишет код. Пригодится, когда нужен лендинг, дашборд или компонент, а не очередной фиолетовый градиент. CX Codex +1 3 700установок frontend-design nexu-io Скилл для создания фронтенд-интерфейсов с продуманной типографикой, цветом и вёрсткой — от лендингов до дашбордов. CX Codex +1 4 800установок frontend-design sickn33 Учит агента создавать запоминающийся интерфейс вместо шаблонных макетов: выбирает эстетику, проверяет доступность и пишет чистый код. CX Codex +1 2 600установок frontend-design julianoczkowski Скилл задаёт правила вёрстки интерфейсов по конкретным эстетическим стилям. Он сканирует проект на готовые токены и компоненты перед генерацией кода. CX Codex +1 5 500установок design-systems-frontend-architecture hueyexe Помогает агенту превратить решения по UI и бренду в переиспользуемые компоненты, токены и правила вёрстки. CX Codex +1 635установок frontend-design-deslop samber Скилл для ИИ-кодинга, который уводит интерфейс от типового вида, который выдают модели по умолчанию: типографика, цвет, токены, тёмная тема. CX Codex +1 4 800установок Frontend Responsive Design Standards am-will Скилл задаёт агенту правила mobile-first вёрстки: брейкпоинты, относительные единицы, тач-цели и приоритет контента на мобильных. CX Codex +1 1 200установок top-design wondelai Скилл направляет агента на создание веб-интерфейсов уровня Awwwards с акцентной типографикой, выверенной анимацией и оценкой макета по десятибалльной шкале. CX Codex +1 7 100установок responsive-design-system patricio0312rev Скилл для ИИ-агента, который помогает строить мобильную вёрстку: брейкпоинты, container queries, текучая типографика и адаптивные сетки на Tailwind CSS. CX Codex +1 343установок visual-design-foundations Seth Hobson Скилл помогает задать типографику, цвета и интервалы для проекта. Подойдёт, когда вы создаёте дизайн-токены или приводите интерфейс к единому стилю. CX Codex 13 566установок

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

presentation-design Скилл проектирует презентации вокруг аудитории: структура, визуальная ясность, когнитивная нагрузка. Пригодится перед подготовкой доклада или разбором готовых слайдов. CX Codex +1 2 500установок requirements-analysis Скилл помогает разработчикам проверять идеи до написания кода: отделять реальные боли от надуманных решений, фиксировать ограничения и отсекать лишнее. CX Codex +1 2 300установок godot-best-practices Задаёт правила архитектуры и стандарты GDScript для Godot 4.x. Помогает агенту связывать узлы через сигналы, типизировать переменные и настраивать загрузку ресурсов. CX Codex +1 2 100установок web-search-tavily Скилл гоняет поисковые запросы через Tavily API и отдаёт структурированные результаты с оценкой релевантности. Пригодится, когда агенту нужны свежие данные из сети. CX Codex +1 1 100установок godot-asset-generator Скилл генерирует 2D-спрайты, тайлсеты и интерфейсы через нейросети и готовит их для Godot 4.x. Пригодится при сборке графики для прототипов и спрайтовых игр. CX Codex +1 1 000установок pdf-generator Скилл для работы с PDF из терминала: заполняет формы, ставит водяные знаки, склеивает документы и собирает новые файлы из JSON-описания. CX Codex +1 916установок story-coach Скилл ведёт писателя вопросами и разбором, но сам прозу, диалоги и сцены не пишет. Пригодится, когда черновик встал. CX Codex +1 884установок electron-best-practices Скилл ведёт ИИ-агента по разработке Electron-приложений на React: безопасность, типизированный IPC, сборка и подпись. Пригодится, когда агент пишет код main, preload или renderer. CX Codex +1 820установок

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

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