Token导航 LogoToken导航TokenDH.com
前端设计需要联网github未标认证来源可访问许可证需确认审计提醒

design-system-extractor设计系统提取器

Agent Skill

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

总安装

420

周安装

17

GitHub Stars

5

下载量

132
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/kalilfagundes/design-system-extractor-skill --skill design-system-extractor

简介

用于从 Figma 设计文件中提取结构化设计令牌,转换为代码可用的格式。

  • 适合建立设计到开发的自动化流水线,支持颜色、间距和组件变量的同步。
  • 使用前需安装 Python 依赖并运行预处理脚本,仅保留文本内容过滤 SVG 标签。
  • 输出遵循 W3C 令牌标准,兼容主流框架如 Tailwind 和 React Native。
  • design-system-extractor 属于前端设计类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

File Location: All Python files are in the tools/ folder of this skill:.agents/skills/design-system-extractor/tools/ ├── design_system_extractor.py ├── extract_tokens.py └── requirements.txt

Required Flow:

# Navigate to the tools folder
cd .agents/skills/design-system-extractor/tools/

# Install dependencies (first time only)
pip install -r requirements.txt

# Run the Python pre-processor
python design_system_extractor.py <URL>

What the Python script does: Step A: HTML Sanitization

  • Removes ALL <svg>, <path>, <script>, <noscript>, <iframe>, <style> tags
  • Removes base64 data (src="data:image...")
  • Keeps only structure: <header>, <main>, <section>, <h1>-<h6>, <p>, <a>, <button>, and CSS classes

Step B: External CSS Extraction

  • Identifies <link rel="stylesheet"> tags in <head>
  • Fetches .css files
  • Uses regex to extract ONLY:

- :root {...} block (90% of Design Tokens) - @font-face rules - Important global classes (.btn, .card, .container, h1, h2, h3)

Step C: Utility Framework Detection

  • Detects Tailwind patterns: text-[16px], bg-[#RRGGBB], leading-tight
  • Spacing patterns: m-4, p-8, gap-16, w-full
  • Typography: font-bold, text-xl, tracking-wide

</data_collection_and_sanitization>

<data_analysis> Using the JSON returned by Python, analyze:

Colors:

  • Prioritize colors from CSS variables (:root)
  • If no:root exists, use colors detected in HTML/Tailwind
  • Classify into: Brand, Black, White, Gray (light/medium/dark/text/muted/social)
  • Detect gradients and opacities
  • Document usage of each color (CTAs, text, background, borders)

Typography:

  • Font-family from CSS variables or @font-face
  • If Google Fonts are used, extract from the tag in HTML
  • Font-size: mega (130px), hero (86px), display (66px), h1-h6, body, small
  • Font-weight: 400, 500, 600, 700
  • Line-height: tight (0.94), snug (1.03), normal (1.2), relaxed (1.25), loose (1.65)
  • Letter-spacing: tighter (-0.05em), tight (-0.035em), normal (-0.03em), wide (0.175em)

Spacing:

  • Based on a 4px unit
  • Space system: 1(4px), 2(8px), 4(12px), 6(16px), 8(20px), 10(24px), 16(40px), 24(60px), 40(90px), 75(150px), 100(200px), 125(250px)
  • Container widths: max (1920px), content (1400px), narrow (1360px), small (1200px), text (800px), tight (780px)

</data_analysis>

<component_catalog> Use the components detected by Python and expand:

Buttons (Minimum 4 types):

  • Primary: brand background, pill radius (100px), height 40px
  • Chip: gray background, pill radius, hover/active states
  • Link: text only, with animated arrow suffix
  • FAB: fixed position, backdrop-filter, pulse animation
  • Padding, border-radius, font-size, font-weight, transitions

Cards (Minimum 3 types):

  • Project Card: media with image, content, title, subtitle
  • Partner Card: image left, content right, max-width 310px
  • Pane Card: index number, title, subtitle with divider line
  • Borders (15-20px radius), shadows, hover effects, image aspect ratios

Forms:

  • Textfield: animated underline, large label, height 56px
  • Selectbox: underline + chevron suffix
  • Filebox: dashed border, drag & drop style
  • Checkbox: custom control with checkmark
  • Input styles, labels, validation states, focus states

Navigation:

  • Sticky header with transition
  • Logo + horizontal menu + CTA button
  • Dropdown with arrow animation
  • Scroll-based color change

</component_catalog>

<assets_and_media> CRITICAL FOR VISUAL IMMERSION:

  • Capture and USE the real image URLs from the site (original logo, banners, profile photos, card images).
  • The generated HTML MUST incorporate these "real pieces" of the site in tags and component backgrounds. Do not use only solid colors if the original site uses rich imagery.
  • This ensures the generated documentation has the look and feel of the original site.

Images:

  • Extract URLs from src (always use the originals from the site)
  • Identify format (WebP, JPG, PNG, SVG)
  • Document aspect ratios (e.g. 55% padding-top for cards)
  • Note border-radius and effects (hover scale, etc.)

Icons and Logos:

  • Insert the exact URL of the original site's logo in the sidebar and headers.
  • Library (FontAwesome, Material, Phosphor, custom SVG)
  • Style (filled, outline, duotone)
  • Extract inline SVGs when possible, or use the original URLs

</assets_and_media>

<animations_and_interactions>

  • Transition durations: fast (0.15s), normal (0.25s), slow (0.5s)
  • Timing functions: ease-smooth cubic-bezier(0.65, 0.05, 0.36, 1)
  • Keyframe animations: heartbeat, fade, slide, scale, pulse, ticker
  • Scroll-based animations (GSAP, ScrollMagic, AOS)
  • Hover effects: transform, opacity, background-color </animations_and_interactions>

<grid_and_layout>

  • Container max-widths
  • Grid system (CSS grid, flexbox)
  • Breakpoints (1024px, 768px)
  • Gaps and gutters
  • Z-index scale: base (1), dropdown (2), header (3), sticky (10), fixed (55), overlay (100) </grid_and_layout>

<anti_hallucination_guidelines> CRITICAL: To avoid fabricating data:

Base tokens STRICTLY on the data from the JSON returned by Python.

If the site uses heavy minification (classes.a,.b,.c) and no CSS is mapped:

  • Infer the Design System by analyzing numeric patterns
  • Use industry defaults (4px grid, 1.25 type scale)

NEVER invent colors or fonts that are not present in the analyzed data.

If information is missing, use default values documented as "Default".

NO EMPTY PLACEHOLDERS: Instead of leaving [URL] or generic gray images, ALWAYS inject the REAL image, photo, and logo URLs extracted from the site into the HTML. The documentation should look like a piece of the real site. </anti_hallucination_guidelines>

<output_format> HTML file (design_pattern.html) Generate ONLY the final HTML code. Do not add explanations before or after the code. Use the template below and REPLACE the [Site Name], #HEX, and value placeholders with the actual extracted properties. IMPORTANT: Replace ALL placeholders such as,, or text reading "LOGO" with the REAL image URLs captured from the site. Keep all CSS boilerplate exactly as provided, only modifying the:root block. <html_template>

</html_template> </output_format>

<validation_checklist> Before delivering, verify: Design Tokens:

All primary colors extracted (brand, black, white, 6+ gray shades)

Font-family identified and imported from Google Fonts

Complete type scale (minimum 10 levels: mega, hero, display, h1-h6, body)

Line-heights documented (tight, snug, normal, relaxed, loose)

Letter-spacing documented (tighter, tight, normal, wide)

Complete spacing system (minimum 10 values)

Container widths defined

Border radius system (sm, md, lg, full, pill)

Shadows documented

Transitions (fast, normal, slow) + easing

Z-index scale

Components and Visuals:

Real logos and images from the site have been injected into the final HTML (no empty placeholders)

Minimum 4 button types (primary, chip, link, fab)

Minimum 3 card types populated with REAL EXTRACTED IMAGES (project, partner, pane)

Form elements (textfield, selectbox, filebox, checkbox)

Navigation example (sticky nav with real logo + menu + CTA)

Badges & Chips with states

Icons documented (inline SVG)

Numbers & Stats with mega typography

Awards list with animation

Footer example (4 columns)

Animations demonstrated (fade, slide, scale, pulse)

Structure:

CSS variables in:root (all categories)

Functional sidebar navigation

Scroll progress indicator

Smooth scroll navigation

Active navigation on scroll

Responsive (media queries: 1024px, 768px)

Code examples in each section

Utility classes (margin, color, text-align) </validation_checklist>

<required_tools>

Python 3.x — For pre-processing

requests — Python library for HTTP requests

beautifulsoup4 — Python library for HTML parsing

write — To create the HTML file

Location: All files are in tools/ inside this skill. </required_tools>

<usage_example> User Input: "Extract the design system from this site: https://example.com"

Execution Flow:

Navigate to the tools folder and install dependencies: cd.agents/skills/design-system-extractor/tools/ pip install -r requirements.txt

Run the Python pre-processor: python design_system_extractor.py https://example.com

Analyze the returned JSON: {"url": "https://example.com", "fonts": ["Inter", "Roboto"], "css_variables": {"color-brand": "#0070F3", "color-black": "#000000"}, "colors": ["#0070F3", "#000000", "#FFFFFF"], "components": [{"type": "button", "count": 5}, {"type": "card", "count": 12}], "images": "[https://example.com/logo.png", "https://example.com/banner.jpg"]}

Generate HTML with extracted data, replacing tags with real image URLs from the JSON.

Save file as design_pattern.html

Deliver with a summary of the main elements (Colors, Fonts, Components, and the generated file). </usage_example>

<section_templates>

Color Card Template

Type Item Template

Spacing Item Template

Icon Card Template

Button Card Template

Project Card Template

Partner Card Template

Pane Card Template

Form Elements Template

Number Stats Template

Award Item Template

Animation Card Template

Code Block Template

Utility Classes.ds-mb-0 {margin-bottom: 0;}.ds-mb-8 {margin-bottom: var(--space-8);}.ds-mb-16 {margin-bottom: var(--space-16);}.ds-mb-24 {margin-bottom: var(--space-24);}.ds-mb-40 {margin-bottom: var(--space-40);}

.ds-text-brand {color: var(--color-brand);}.ds-text-gray {color: var(--color-gray-text);}.ds-text-center {text-align: center;}

.ds-bg-black {background-color: var(--color-black);}.ds-bg-white {background-color: var(--color-white);}.ds-bg-gray {background-color: var(--color-gray-light);} </section_templates>

<best_practices> Always use CSS variables for consistency Always inject REAL images from the site (logos, banners, card photos) into the generated HTML to create a visual catalog identical to the original, functioning as literal pieces of the site Always document states (hover, active, focus, disabled) Always include code examples in each section Maintain fidelity to the original design Use descriptive token names (brand, gray-light, etc.) Document responsive breakpoints (1024px, 768px) Include animations and transitions with timing functions Follow the layout structure: sidebar + main content Implement scroll progress indicator Add smooth scroll and active navigation Use utility classes for margins and colors Include at least 10 spacing levels Document line-heights and letter-spacing for typography Create at least 4 button types and 3 card types populated with real media </best_practices>

<required_css_structure> Base Layout.ds-layout {display: grid; grid-template-columns: 280px 1fr; min-height: 100vh;}

.ds-sidebar {position: sticky; top: 0; height: 100vh; background-color: var(--color-black); color: var(--color-white); padding: var(--space-40) var(--space-24); overflow-y: auto;}

.ds-main {padding: var(--space-50) var(--space-75); max-width: var(--container-max);}

Header.ds-header {margin-bottom: var(--space-100); padding-bottom: var(--space-50); border-bottom: 1px solid var(--color-gray-light);}

.ds-title {font-size: var(--text-mega); font-weight: var(--font-weight-bold); line-height: var(--leading-tight); letter-spacing: var(--tracking-tighter);}

.ds-subtitle {font-size: var(--text-5xl); font-weight: var(--font-weight-medium); color: var(--color-gray-text);}

Sections.ds-section {margin-bottom: var(--space-100);}

.ds-section-title {font-size: var(--text-5xl); font-weight: var(--font-weight-bold); margin-bottom: var(--space-40); padding-bottom: var(--space-16); border-bottom: 3px solid var(--color-brand); display: inline-block;}

.ds-section-description {font-size: var(--text-lg); color: var(--color-gray-text); margin-bottom: var(--space-40); max-width: var(--container-text);}

Scroll Indicator.ds-scroll-indicator {position: fixed; top: 0; left: 0; height: 3px; background-color: var(--color-brand); z-index: var(--z-fixed); width: 0%; transition: width 0.1s;} </required_css_structure>

<setup_and_metadata> Python Dependencies: Install before using:

# Navigate to the tools folder
cd .agents/skills/design-system-extractor/tools/

# Install dependencies
pip install -r requirements.txt

Or directly:

pip install requests beautifulsoup4

requirements.txt:

requests>=2.31.0
beautifulsoup4>=4.12.0

Location: tools/requirements.txt inside this skill.

Versioning: Version: 2.0.0 (Optimized with Python) Last updated: 2026-03-19

v2.0 Improvements:

  • Python pre-processing — Prevents context window overflow
  • HTML sanitization — Removes SVGs, scripts, base64
  • Selective CSS extraction — Focuses on:root, ignores the rest
  • Tailwind detection — Token inference from utility classes
  • Anti-hallucination — Strict guidelines to prevent fabricated data
  • Optimized output — Generates only HTML with real image injection

File Structure:

.agents/skills/design-system-extractor/
├── SKILL.md                        # This skill (you are here)
└── tools/
    ├── design_system_extractor.py  # Main Python script
    ├── extract_tokens.py           # Standalone CSS token extractor
    ├── requirements.txt            # Python dependencies
    └── README.md                   # Tools documentation

Important: Always run Python scripts from the tools/ folder:

cd .agents/skills/design-system-extractor/tools/
python design_system_extractor.py <URL>

</setup_and_metadata>

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

34.75%
按下载量换算46

Claude

28.95%
按下载量换算38

Cursor

18.82%
按下载量换算25

Gemini CLI

8.63%
按下载量换算11

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

需要联网

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

安装前确认

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

来源信息

继续浏览同类 Skills