generate-ui-from-brand
БесплатноБез исполняемых скриптовНе проверенPipeline from a URL or DESIGN.md to tokens, decisions and a UI spec. Use when building UI for an existing brand, auditing a design system or fixing visual…
от dembrandt★ 249 звёзд на GitHubОб этом скилле
generate-ui-from-brand
Type: Pipeline / Orchestrator
Input: URL or existing DESIGN.md
Output: Actionable UI spec with decisions made
Step 1 — Extract
Extraction needs Node.js 20 or newer. The CLI fetches its own Chromium on first run; the MCP server does not, so run dembrandt install-browser once if a job fails on browser launch. Without Node or a DESIGN.md, say so and stop. Never guess the tokens.
If a URL is provided and Dembrandt MCP is available:
All MCP extraction tools are async: they return a job_id immediately. Wait with get_job_status and wait_seconds, then read the extraction with include_result: true, or hand the job_id to generate_design_md for a compact brand guide.
{ job_id } = get_design_tokens({ url })
get_job_status({ job_id, wait_seconds: 50 }) // repeat while status is "running"
{ result } = get_job_status({ job_id, include_result: true })
Run these in sequence (each extraction launches a browser):
get_design_tokens, get_color_palette, get_typography, get_component_styles, get_spacing
If Dembrandt MCP is not available, run CLI:
dembrandt <url> --design-md --crawl 3
If DESIGN.md already exists: parse it directly — skip extraction.
Step 2 — Normalize Tokens
Do not use raw extracted values directly. Map them to a semantic system first.
Colours
Identify the role of each extracted colour:
| Role | Token | How to identify |
|---|---|---|
color-primary |
Main brand colour | Used on primary buttons, links, key interactive elements |
color-secondary |
Supporting brand colour | Used on secondary actions, accents |
color-surface |
Background | Page or card background |
color-surface-raised |
Elevated surface | Cards, panels, modals |
color-border |
Border / divider | Input borders, separators |
color-text |
Primary text | Body copy |
color-text-secondary |
Secondary text | Labels, metadata, captions |
color-error |
Error state | Red — do not assign to any other role |
color-warning |
Warning state | Orange/amber — do not assign to any other role |
color-success |
Success state | Green — do not assign to any other role |
Decision rule: if the extracted palette has more than 2 brand colours competing for color-primary, pick the one with highest usage on interactive elements.
Typography
Map extracted sizes to a scale. Verify ratio coherence — if sizes do not follow a consistent ratio, round them to the nearest modular scale step (base 16px, ratio 1.25 recommended).
| Token | Min size | Role |
|---|---|---|
text-base |
16px | Body copy — never below 16px |
text-sm |
14px | Labels, captions — use sparingly |
text-lg |
20px | Lead paragraph |
text-h4 |
25px | Section subheading |
text-h3 |
31px | Section heading |
text-h2 |
39px | Page subheading |
text-h1 |
49px | Page heading |
text-display |
61px | Hero / landing only |
Decision rule: if extracted body text is below 16px, override to 16px.
Spacing
Identify the base spacing unit from the most common small margin/padding value. Derive a scale:
base = extracted smallest recurring value (usually 4px or 8px)
scale = base × 1, 2, 3, 4, 6, 8, 12, 16
Border Radius
Extract the most common radius value used on interactive elements (buttons, inputs). This becomes --radius-button — applied uniformly to all buttons regardless of variant.
Step 3 — Apply UX Decisions
With normalized tokens, make the following decisions explicitly. Do not leave these open:
Visual Hierarchy
- Identify the single primary action for the UI being built
- Assign
color-primaryto that action only - All other actions use neutral or outlined styles
- Apply
cursor: pointerto all interactive elements
Gestalt Grouping
- Define spacing between related elements (tight:
space-2) and between groups (loose:space-6orspace-8) - Confirm that related controls will be co-located in the layout
Accessibility (WCAG 2.2 AA)
Run contrast check on normalized tokens:
color-textoncolor-surface: must be ≥ 4.5:1color-text-secondaryoncolor-surface: must be ≥ 4.5:1color-primaryon white/surface (button label): must be ≥ 4.5:1
If any fail, darken or lighten the token to meet the threshold. Document the adjustment.
Error / Status Colours
- Confirm
color-erroris red and used only for errors - Confirm
color-warningis orange/amber and used only for warnings - If the brand uses orange as a primary colour, it cannot double as a warning — a distinct amber must be defined for warning states
Step 4 — Output UI Spec
Produce a concrete, copy-pasteable output. Choose the format that fits the request:
Design Token File (CSS)
:root {
/* Colours */
--color-primary: <value>;
--color-secondary: <value>;
--color-surface: <value>;
--color-surface-raised: <value>;
--color-border:
Установить generate-ui-from-brand в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл generate-ui-from-brand?
Pipeline from a URL or DESIGN.md to tokens, decisions and a UI spec. Use when building UI for an existing brand, auditing a design system or fixing visual inconsistency.
Как установить скилл generate-ui-from-brand?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл generate-ui-from-brand запускает скрипты?
Нет, скилл состоит только из инструкций (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