Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

ui-design-system

БесплатноЗапускает вложенные скриптыНе проверен

Generates a design-token system from a brand colour, checks its contrast, and specs component variants. Use when turning a chosen colour into tokens…

borgheiот borghei★ 1 250 звёзд на GitHub

Об этом скилле

UI Design System

The direction is already chosen: there is a brand colour and a style. This skill turns that into a token system people can build with: a 10-step primary and complementary secondary scale (50-200 are near-white tints for backgrounds and hover), fixed neutral, semantic and surface colours, a 1.25 modular type scale, an 8pt spacing grid, component sizes, radius, shadows, motion, breakpoints and z-index. It exports them as JSON, CSS custom properties or SCSS variables. A checker then computes WCAG contrast for every pair that carries text and, when the brand hex fails, names the primary shade that passes. The rest of the skill specs components on top of those tokens and hands them off.

The deliverable states contrast ratios only as the checker printed them. Ratios guessed by eye are wrong often enough that a pasted number is the only one worth trusting.

When to use this skill

  • A brand colour is fixed and the team needs tokens for a new product or a rebrand
  • Exporting tokens for a stack: CSS variables, Tailwind 4 @theme, SCSS, a JS theme
  • Checking whether a brand colour works as button fill and link colour, and which shade to use if it does not
  • Extending an existing generated token set with component variants, states and sizes
  • Writing the handoff that maps tokens to components and frameworks

If there is no direction yet (no brand colour, no style, only a product brief), start with product-team/design-direction, which picks the direction. This skill turns that direction into a working token system.

Inputs the skill expects

  • A brand colour as hex (#RRGGBB or #RGB) and a style preset: modern, classic or playful (fonts, radius and shadow set).
  • The target stack, so the export and the integration snippet match it.
  • For an existing system: the tokens JSON this generator produced (the checker reads that shape; other token files go through product-team/design-direction's checker).

Clarify First

Settle the inputs below before generating. When one is missing and would change the result, ask; when it would not, use the default and say so.

  • Brand colour, and whether it is negotiable: a fixed logo colour that fails contrast is kept for decorative use and a darker step carries text. Ask whether the team will accept that before presenting it as a fix.
  • Style preset: decides fonts, radius and shadows. Default modern.
  • Stack: CSS, Tailwind 4, Sass or a JS theme. This decides the export and the snippet.
  • AA or AAA: AAA fails the brand, muted text and three of the four semantic labels on the bundled sample. Agree it before any palette work, so nobody reworks the palette after the build.
  • Light only or dark too: the generator emits a light palette only. Dark mode is a separate, checked palette, so it changes the scope of the work.

Ask the two or three that matter for this request. If the user wants tokens straight away, generate with defaults and put the assumptions at the top.

Quick Start

Run from the skill folder:

# Generate tokens (JSON), then check contrast on them
python3 scripts/design_token_generator.py "#0066CC" modern json > /tmp/tokens.json
python3 scripts/token_contrast_checker.py --tokens /tmp/tokens.json

# Bundled samples: sound (exit 0) and flawed (exit 1)
python3 scripts/token_contrast_checker.py --tokens assets/sample_tokens.json
python3 scripts/token_contrast_checker.py --tokens assets/sample_tokens_flawed.json

# Extra pairs a component adds: hover fill with a white label, focus ring at 3:1 (non-text)
python3 scripts/token_contrast_checker.py --tokens assets/sample_tokens.json \
  --pair surface.background:primary.600 --pair primary.DEFAULT:surface.background:3

# Other exports and a summary
python3 scripts/design_token_generator.py "#0066CC" modern css > /tmp/design-tokens.css
python3 scripts/design_token_generator.py "#8B4513" classic scss > /tmp/_design-tokens.scss
python3 scripts/design_token_generator.py "#FF6B6B" playful --format text

Tools Overview

Script Input Output Exit codes
design_token_generator.py brand_color [style] [output] or --format text|json|css|scss Token system as JSON, CSS, SCSS or a summary 0 written, 2 bad colour, unknown style or unreadable presets
token_contrast_checker.py --tokens file.json|-, --target AA|AAA, --pair FG:BG[:MIN] (repeatable), --format text|json Ratio per text pair, failed pairs, suggested primary shade, verdict 0 all pass, 1 a pair fails, 2 unreadable or incomplete input

The checker tests five kinds of pair: body text (foreground on background), muted text (neutral-500), link text (brand on background), button label (background colour on a brand fill), and each semantic label (contrast on base). All use the normal-text threshold (4.5:1 AA, 7:1 AAA), because button labels and links are normal-size text. --pair adds any othe

Полный SKILL.md на GitHub

Установить ui-design-system в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

assets/sample_tokens.jsonassets/sample_tokens_flawed.jsonreferences/component-architecture.mdreferences/developer-handoff.mdreferences/responsive-calculations.mdreferences/token-generation.mdreferences/token-presets.jsonscripts/design_token_generator.pyscripts/token_contrast_checker.py

FAQ

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

Generates a design-token system from a brand colour, checks its contrast, and specs component variants. Use when turning a chosen colour into tokens, exporting CSS, SCSS or JSON, or extending a token set for components.

Как установить скилл ui-design-system?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл ui-design-system запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

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

Сравнить ui-design-system с