Token导航 LogoToken导航TokenDH.com
前端设计需要联网github未标认证来源可访问clear审计通过

design-system-lead设计系统主导

Agent Skill

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

总安装

4,703

周安装

194

GitHub Stars

103

下载量

1,536
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

请帮我安装这个 Agent Skill:design-system-lead(设计系统主导)
来源仓库:https://github.com/borghei/claude-skills
仓库路径:skills/design-system-lead
安装命令:
npx skills add https://github.com/borghei/claude-skills --skill design-system-lead
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/borghei/claude-skills --skill design-system-lead

简介

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。

  • 适合生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构或定位布局问题。
  • 使用时需结合项目现有设计系统、路由和构建方式,避免生成孤立片段;涉及页面改动时应配合本地预览确认视觉效果。
  • 支持通过命令行工具生成令牌、组件脚手架,并分析设计系统采用情况。
  • 安装前建议确认权限范围和维护状态,注意可能触发文件读写或命令执行。

SKILL.md

Design System Lead

The agent operates as a senior design system lead, delivering scalable component libraries, token architectures, governance processes, and adoption strategies for cross-functional product teams.

Workflow

  1. Assess maturity - Evaluate current design system maturity (Emerging, Defined, Managed, or Optimized). Audit existing patterns, inconsistencies, and custom components. Checkpoint: maturity level is documented with evidence.
  2. Define token architecture - Build a three-tier token structure: primitive (raw values), semantic (purpose-based aliases), and component (scoped to specific UI elements). Checkpoint: every semantic token references a primitive; no hardcoded values remain.
  3. Build component library - Design and implement components starting with primitives (Button, Input, Icon), then composites (Card, Modal, Dropdown), then patterns (Forms, Navigation, Tables). Checkpoint: each component has variants, sizes, states, props table, and accessibility requirements.
  4. Document everything - Create usage guidelines, code examples, do/don't rules, and accessibility notes for every component. Checkpoint: documentation covers installation, basic usage, all variants, and at least one accessibility note.
  5. Establish governance - Define the RFC-to-release contribution process. Set versioning strategy (SemVer). Checkpoint: contribution process is published and reviewed by both design and engineering leads.
  6. Measure adoption - Track coverage (% of products using DS), consistency (token compliance rate), efficiency (time to build), and quality (a11y score, bug reports). Checkpoint: adoption dashboard is updated monthly.

Design System Maturity Model

LevelCharacteristicsFocus
1: EmergingAd-hoc styles, no standardsEstablish foundations
2: DefinedDocumented guidelinesComponent library
3: ManagedShared component libraryAdoption, governance
4: OptimizedAutomated, measuredContinuous improvement

Token Architecture

Three-tier token system (primitive -> semantic -> component):

{
  "color": {
    "primitive": {
      "blue": {
        "50": {"value": "#eff6ff"},
        "500": {"value": "#3b82f6"},
        "600": {"value": "#2563eb"},
        "900": {"value": "#1e3a8a"}
      }
    },
    "semantic": {
      "primary": {"value": "{color.primitive.blue.600}"},
      "primary-hover": {"value": "{color.primitive.blue.700}"},
      "background": {"value": "{color.primitive.gray.50}"},
      "text": {"value": "{color.primitive.gray.900}"}
    },
    "component": {
      "button-primary-bg": {"value": "{color.semantic.primary}"},
      "button-primary-text": {"value": "#ffffff"}
    }
  },
  "spacing": {
    "primitive": {"1": {"value": "4px"}, "2": {"value": "8px"}, "4": {"value": "16px"}, "8": {"value": "32px"}},
    "semantic": {"component-padding": {"value": "{spacing.primitive.4}"}, "section-gap": {"value": "{spacing.primitive.8}"}}
  },
  "typography": {
    "fontFamily": {"sans": {"value": "Inter, system-ui, sans-serif"}, "mono": {"value": "JetBrains Mono, monospace"}},
    "fontSize": {"sm": {"value": "14px"}, "base": {"value": "16px"}, "lg": {"value": "18px"}, "xl": {"value": "20px"}}
  }
}

Example: Cross-Platform Token Generation

// style-dictionary.config.js
module.exports = {
  source: ['tokens/**/*.json'],
  platforms: {
    css: {
      transformGroup: 'css',
      buildPath: 'dist/css/',
      files: [{ destination: 'variables.css', format: 'css/variables' }]
    },
    scss: {
      transformGroup: 'scss',
      buildPath: 'dist/scss/',
      files: [{ destination: '_variables.scss', format: 'scss/variables' }]
    },
    ios: {
      transformGroup: 'ios',
      buildPath: 'dist/ios/',
      files: [{ destination: 'StyleDictionaryColor.swift', format: 'ios-swift/class.swift' }]
    },
    android: {
      transformGroup: 'android',
      buildPath: 'dist/android/',
      files: [{ destination: 'colors.xml', format: 'android/colors' }]
    }
  }
};

Component Library Structure

design-system/
+-- foundations/     (colors, typography, spacing, elevation, motion, grid)
+-- components/
|   +-- primitives/  (Button, Input, Icon)
|   +-- composites/  (Card, Modal, Dropdown)
|   +-- patterns/    (Forms, Navigation, Tables)
+-- layouts/         (page templates, content layouts)
+-- documentation/   (getting-started, design guidelines, code guidelines)
+-- assets/          (icons, illustrations, logos)

Component Specification: Button

## Variants
- Primary: main action
- Secondary: supporting action
- Tertiary: low-emphasis action
- Destructive: dangerous/irreversible action

## Sizes
- Small: 32px height, 8px/12px padding
- Medium: 40px height (default), 10px/16px padding
- Large: 48px height, 12px/24px padding

## States
Default -> Hover -> Active -> Focus -> Disabled -> Loading

## Props
| Prop      | Type        | Default   | Description      |
|-----------|-------------|-----------|------------------|
| variant   | string      | 'primary' | Visual style     |
| size      | string      | 'medium'  | Button size      |
| disabled  | boolean     | false     | Disabled state   |
| loading   | boolean     | false     | Loading state    |
| leftIcon  | ReactNode   | -         | Leading icon     |
| onClick   | function    | -         | Click handler    |

## Accessibility
- Minimum touch target: 44x44px
- Visible focus ring on keyboard navigation
- aria-label required for icon-only buttons
- aria-busy="true" when loading

Example: Button Implementation (React + CVA)

import { cva, type VariantProps } from 'class-variance-authority';

const buttonVariants = cva(
  'inline-flex items-center justify-center rounded-md font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50',
  {
    variants: {
      variant: {
        primary: 'bg-primary text-primary-foreground hover:bg-primary/90',
        secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80',
        destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90',
      },
      size: {
        sm: 'h-8 px-3 text-sm',
        md: 'h-10 px-4 text-sm',
        lg: 'h-12 px-6 text-base',
      },
    },
    defaultVariants: { variant: 'primary', size: 'md' },
  }
);

Governance: Contribution Process

1. REQUEST  - Create RFC describing problem and proposed component/change
2. REVIEW   - Design review + engineering review + accessibility review
3. BUILD    - Figma component + code implementation + unit tests + visual regression
4. DOCUMENT - API docs + usage guidelines + Storybook stories
5. RELEASE  - SemVer bump + changelog + announcement

Versioning Strategy

Change TypeVersion BumpExamples
BreakingMAJORComponent API change, token rename
New featureMINORNew component, new variant, new token
Bug fixPATCHStyle fix, docs update, perf improvement

Adoption Metrics Dashboard

Design System Health
  Adoption: 82% (12/15 products)
  Component Usage: 78% (45 components)
  Token Compliance: 95%
  Overrides: 23 (down from 38)

  Efficiency
  Avg time to build new feature: 3.2 days (was 5.1)
  Custom components created this quarter: 4 (was 12)

Scripts

# Token generator
python scripts/token_gen.py --source tokens.json --output dist/

# Component scaffolder
python scripts/component_scaffold.py --name DatePicker --category composite

# Adoption analyzer
python scripts/adoption_analyzer.py --repos repos.yaml

# Visual regression test
python scripts/visual_regression.py --baseline main --compare feature/new-button

Reference Materials

  • references/token_architecture.md - Token system design
  • references/component_patterns.md - Component best practices
  • references/governance.md - Contribution guidelines
  • references/figma_setup.md - Figma library management

Tool Reference

token_gen.py

Generates a three-tier design token system (primitive, semantic, component) from a brand color. Supports CSS, SCSS, and JSON output. Includes WCAG contrast ratio checking.

FlagTypeDefaultDescription
--color, -cstring#0066CCBrand color in hex
--format, -fchoicesummaryOutput format: json, css, scss, summary
--tiers, -tchoiceallToken tiers: all, primitive, semantic, component
--output, -ostring(stdout)Output directory for generated files
--jsonflagFalseShortcut for --format json
python scripts/token_gen.py --color "#0066CC"
python scripts/token_gen.py --color "#0066CC" --format css --output dist/
python scripts/token_gen.py --color "#8B4513" --tiers primitive --json

component_scaffold.py

Generates component documentation scaffolds with props tables, variants, states, accessibility requirements, anatomy, usage guidelines, and code examples.

FlagTypeDefaultDescription
--name, -nstring(required)Component name in PascalCase
--category, -cchoice(required)Category: primitive, composite, pattern
--variants, -vstring(category default)Comma-separated variant names
--sizes, -sstringsm,md,lgComma-separated size names
--jsonflagFalseOutput as JSON
python scripts/component_scaffold.py --name Button --category primitive
python scripts/component_scaffold.py --name DataTable --category pattern --variants "default,compact,striped"
python scripts/component_scaffold.py --name Modal --category composite --json

adoption_analyzer.py

Analyzes design system adoption across products by evaluating component coverage, token compliance, custom overrides, and accessibility scores. Produces a health dashboard with per-product and portfolio-level analysis.

FlagTypeDefaultDescription
inputpositional(required)CSV file with adoption data or "sample"
--threshold, -tint75Health score threshold for flagging
--jsonflagFalseOutput as JSON

CSV columns: product, total_components, ds_components, total_tokens, ds_tokens, custom_overrides, a11y_score, last_audit

python scripts/adoption_analyzer.py sample
python scripts/adoption_analyzer.py adoption_data.csv
python scripts/adoption_analyzer.py adoption_data.csv --threshold 80 --json

Troubleshooting

ProblemCauseSolution
Token overrides in productionTeams bypassing design systemRun adoption_analyzer monthly; add lint rules for hardcoded values
Inconsistent component behavior across productsVersion driftEnforce SemVer; automate DS dependency updates in CI
Low adoption in older productsMigration cost perceived as too highPrioritize high-traffic pages; create migration guides per product
Token naming conflictsNo naming convention enforcedAdopt CTI (Category-Type-Item) naming; document in governance
Component API breaking changesInsufficient versioning disciplineUse codemods for migration; deprecation period of 2 minor versions
Designers and developers out of syncFigma/code token driftUse Tokens Studio plugin; sync on every release
Contribution bottleneckRFC review queue backed upSet SLA for reviews (48h); rotate reviewers weekly

Success Criteria

CriterionTargetHow to Measure
Component coverage>80% across all productsadoption_analyzer component coverage metric
Token compliance>90% (no hardcoded values)adoption_analyzer token compliance metric
Custom overridesTrending downward quarter-over-quarterTrack total overrides in adoption report
Time to build new feature30%+ reduction vs pre-DS baselineCompare sprint velocity before/after DS adoption
Accessibility score>85% across all productsadoption_analyzer a11y score
Contribution rate2+ external contributions per quarterTrack merged RFCs from non-core-team members
Design-dev handoff time<1 day for standard componentsMeasure time from design approval to code PR

Scope & Limitations

In scope:

  • Three-tier token architecture design and generation
  • Component library structure and documentation scaffolding
  • Adoption tracking and health reporting
  • Cross-platform token export (CSS, SCSS, JSON)
  • Governance process definition
  • WCAG contrast ratio validation

Out of scope:

  • Visual regression testing execution (use Chromatic, Percy, or BackstopJS)
  • Figma plugin development (use Tokens Studio for token sync)
  • Runtime theme switching implementation (framework-specific)
  • Icon library creation and SVG optimization
  • Motion design and animation library
  • Component implementation code (scaffold generates docs, not runtime code)

Integration Points

Tool / PlatformIntegration MethodUse Case
Figma / Tokens StudioImport token_gen JSON outputSync design tokens between design and code
Style DictionaryUse token_gen JSON as sourceBuild multi-platform tokens (iOS, Android, web)
Storybookcomponent_scaffold output as stories templateAuto-generate component documentation
Chromatic / PercyPair with component_scaffold test checklistVisual regression testing pipeline
CI/CDadoption_analyzer --json in pipelineAutomated adoption health checks on PRs
Tailwind / CSS-in-JStoken_gen CSS/JSON exportTheme configuration from design tokens

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

补充不同宿主或平台的使用分布数据

能力 5

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

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

平台分布

Claude Code

28.72%
按下载量换算441

OpenCode

25.5%
按下载量换算392

Gemini CLI

18.26%
按下载量换算280

Antigravity

13.98%
按下载量换算215

Cursor

7.45%
按下载量换算114

Codex

3.38%
按下载量换算52

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills