Token导航 LogoToken导航TokenDH.com
前端设计external-servicegithub未标认证来源可访问许可证需确认审计提醒

generate-ui-from-brand从品牌生成 ui

Agent Skill

用于辅助界面设计、视觉规范、排版、配色、布局和交互体验优化。它适合让 Agent 根据产品场景整理页面结构、生成 UI 方案、检查视觉一致性或改进组件层级。使用时需要结合现有品牌、设计系统和用户任务,不应只堆装饰元素;涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出、对齐和响应式表现。

总安装

672

周安装

28

GitHub Stars

6

下载量

224
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:generate-ui-from-brand(从品牌生成 ui)
来源仓库:https://github.com/dembrandt/dembrandt-skills
仓库路径:skills/generate-ui-from-brand
安装命令:
npx skills add https://github.com/dembrandt/dembrandt-skills --skill generate-ui-from-brand
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/dembrandt/dembrandt-skills --skill generate-ui-from-brand

简介

辅助界面设计、视觉规范和布局优化。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中生成 UI 方案或检查一致性。
  • 通过 GitHub 安装,使用 npx skills add 命令添加技能。
  • 需结合品牌和设计系统,通过预览检查文本溢出和对齐问题。
  • generate-ui-from-brand 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

generate-ui-from-brand

Type: Pipeline / Orchestrator Input: URL or existing DESIGN.md Output: Actionable UI spec with decisions made


Step 1 — Extract

If a URL is provided and Dembrandt MCP is available:

get_design_tokens(url)
get_color_palette(url)
get_typography(url)
get_component_styles(url)
get_spacing(url)

If Dembrandt MCP is not available, run CLI:

npx dembrandt <url> --design-md --pages 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:

RoleTokenHow to identify
color-primaryMain brand colourUsed on primary buttons, links, key interactive elements
color-secondarySupporting brand colourUsed on secondary actions, accents
color-surfaceBackgroundPage or card background
color-surface-raisedElevated surfaceCards, panels, modals
color-borderBorder / dividerInput borders, separators
color-textPrimary textBody copy
color-text-secondarySecondary textLabels, metadata, captions
color-errorError stateRed — do not assign to any other role
color-warningWarning stateOrange/amber — do not assign to any other role
color-successSuccess stateGreen — 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).

TokenMin sizeRole
text-base16pxBody copy — never below 16px
text-sm14pxLabels, captions — use sparingly
text-lg20pxLead paragraph
text-h425pxSection subheading
text-h331pxSection heading
text-h239pxPage subheading
text-h149pxPage heading
text-display61pxHero / 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-primary to that action only
  • All other actions use neutral or outlined styles
  • Apply cursor: pointer to all interactive elements

Gestalt Grouping

  • Define spacing between related elements (tight: space-2) and between groups (loose: space-6 or space-8)
  • Confirm that related controls will be co-located in the layout

Accessibility (WCAG 2.2 AA)

Run contrast check on normalized tokens:

  • color-text on color-surface: must be ≥ 4.5:1
  • color-text-secondary on color-surface: must be ≥ 4.5:1
  • color-primary on 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-error is red and used only for errors
  • Confirm color-warning is 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:           <value>;
  --color-text:             <value>;
  --color-text-secondary:   <value>;
  --color-error:            <value>;
  --color-warning:          <value>;
  --color-success:          <value>;

  /* Typography */
  --font-sans:    <extracted font family>;
  --text-base:    1rem;
  --text-sm:      0.875rem;
  --text-lg:      1.25rem;
  --text-h4:      1.563rem;
  --text-h3:      1.938rem;
  --text-h2:      2.438rem;
  --text-h1:      3.063rem;

  /* Spacing */
  --space-1:  <base>px;
  --space-2:  <base×2>px;
  --space-4:  <base×4>px;
  --space-6:  <base×6>px;
  --space-8:  <base×8>px;

  /* Borders */
  --radius-button:  <extracted>px;
  --radius-card:    <extracted or radius-button + 2>px;

  /* Elevation */
  --shadow-card:   0 1px 3px rgba(0,0,0,.10), 0 1px 2px rgba(0,0,0,.06);
  --shadow-modal:  0 10px 15px rgba(0,0,0,.08), 0 4px 6px rgba(0,0,0,.05);
}

UX Audit (if auditing an existing UI)

CONTRAST ISSUES
  - color-text-secondary on color-surface: X.X:1 (required 4.5:1) → fix: darken to #...

HIERARCHY ISSUES
  - 3 primary buttons on same screen → reduce to 1 primary, 2 secondary

CONSISTENCY ISSUES
  - Button radius varies (4px, 8px, 12px) → standardize to --radius-button: 8px

MISSING STATES
  - No disabled state defined for inputs
  - No error state for form fields

FONT SIZE VIOLATIONS
  - Caption text at 12px → minimum 14px

Component Structure (if generating a layout)

Page layout:
  Header (fixed, 56px)
    Logo | Nav | [Global controls: small type]

  Main
    Hero section
      H1 (display scale) + lead text + primary CTA (color-primary, full)

    Feature grid (3-col)
      Card (shadow-card, radius-card) × 3
        Icon + H4 + body text

  Footer
    Links (text-sm, color-text-secondary)
    Language/currency selector (text-sm)

Primary action: CTA button in hero
Secondary actions: nav links, card CTAs (outlined)
Error states: inline, adjacent to field, red text + icon

Audit Checklist Before Handoff

  • All tokens named semantically, not by value (color-primary not color-blue-600)
  • Body text ≥ 16px everywhere
  • Contrast ratios verified for all text/background combinations
  • One primary button per view
  • All buttons share --radius-button
  • cursor: pointer on all interactive elements
  • Error colour reserved exclusively for errors
  • Warning colour (orange) reserved exclusively for warnings
  • Spacing derived from a single base unit

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.22%
按下载量换算79

Claude

31.46%
按下载量换算70

Cursor

19.34%
按下载量换算43

Gemini CLI

8.85%
按下载量换算20

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills