跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
设计与 UI

ai-assist-design-creator

Reverse-engineer a website's visual design system from a URL and produce a fully spec-compliant DESIGN.md file (https://github.com/google-labs-code/design.md). The output includes both machine-readable YAML design tokens (colors, typography, spacing, rounded corners, components) and human-readable markdown rationale sections (Overview, Colors, Typography, Layout, Elevation & Depth, Shapes, Components, Do's and Don'ts). Use this skill whenever the user wants to generate a DESIGN.md, create a design system file from a website, capture a site's visual identity, extract design tokens, build a design spec from a URL, clone a site's look and feel, or scaffold a DESIGN.md from scratch. Also triggers on: 'design system from URL', 'generate DESIGN.md', 'extract colors from site', 'what are this site's design tokens', 'capture design from website'.

jparkerweb · 已有 AI 审核记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add jparkerweb/ai-assist-skills --skill ai-assist-design-creator

技能说明


name: ai-assist-design-creator description: "Reverse-engineer a website's visual design system from a URL and produce a fully spec-compliant DESIGN.md file (https://github.com/google-labs-code/design.md). The output includes both machine-readable YAML design tokens (colors, typography, spacing, rounded corners, components) and human-readable markdown rationale sections (Overview, Colors, Typography, Layout, Elevation & Depth, Shapes, Components, Do's and Don'ts). Use this skill whenever the user wants to generate a DESIGN.md, create a design system file from a website, capture a site's visual identity, extract design tokens, build a design spec from a URL, clone a site's look and feel, or scaffold a DESIGN.md from scratch. Also triggers on: 'design system from URL', 'generate DESIGN.md', 'extract colors from site', 'what are this site's design tokens', 'capture design from website'." argument-hint: "[URL of the site to reverse-engineer, or leave blank to be prompted]"

DESIGN.md Creator

Reverse-engineer a website's visual design system and produce a fully spec-compliant DESIGN.md file following the google-labs-code/design.md format.

What this produces

A DESIGN.md file with two layers:

  1. YAML frontmatter — machine-readable design tokens: colors, typography, spacing, rounded corners, components
  2. Markdown body — human-readable rationale for each design decision, in 8 canonical sections

The output is ready for agents to consume immediately — no post-processing needed.

Step 1: Get the URL

If the user provided a URL via $ARGUMENTS, use it. Otherwise ask:

What website should I reverse-engineer? Provide the URL and I'll generate a DESIGN.md from its visual design.

Optionally, also tell me:

  • Where to save the file (default: DESIGN.md in the current directory)
  • Whether this is a dark-mode or light-mode site (I'll detect this automatically if you don't know)
  • Any specific components you want captured (buttons, cards, inputs, nav, etc.)

Wait for the URL before proceeding.

Step 2: Fetch and analyze the site

Fetch the page and all significant visual signals:

  1. Fetch the main URL — use whichever method your agent environment supports:
    • curl (works in any agent with shell access): curl -sL --max-time 15 -A "Mozilla/5.0" "<URL>" — captures raw HTML including <style> blocks and inline CSS
    • webfetch tool (if your agent provides it natively): use it directly for cleaner content extraction
    • If the initial fetch returns no CSS (JS-heavy SPA), also fetch the page's linked .css files: extract <link rel="stylesheet" href="..."> URLs from the HTML, resolve each href to an absolute URL using the page's final URL after redirects (e.g., /assets/app.css → https://example.com/assets/app.css, //cdn.example.com/app.css → https://cdn.example.com/app.css), de-duplicate, then curl each one
  2. Identify key sub-pages — if the site has a component library, style guide, or "About" page, fetch those too (up to 2–3 additional pages) to improve coverage
  3. Look for existing design system artifacts — check for /design-tokens.json, /tokens.json, tailwind.config.js, or any design system links in the page source

What to extract from the fetched content:

SignalWhere to look
Brand colorsCSS variables (--color-*, --primary, etc.), inline styles, og:image colors, logo
Typographyfont-family, font-size, font-weight, line-height, letter-spacing in CSS
Spacing scale--spacing-*, padding/margin patterns, grid gutter values
Corner radiiborder-radius values across buttons, cards, inputs
Elevationbox-shadow, backdrop-filter, z-index layering patterns
Component stylesButton, card, input, nav, badge styles from class names or CSS
Design personalityLogo, imagery, copy tone, overall layout density

Note: You're inferring from observed CSS/HTML. Be honest about what you can directly observe vs. what you're inferring from visual patterns. Dark-mode sites typically have low-luminance surface colors and high-contrast text; light-mode sites are the inverse. When you can't determine an exact hex value, make a design-coherent choice and note it in the prose.

Step 3: Build the DESIGN.md

Read references/design-md-spec.md for the complete token schema and section rules.

Token extraction rules

Colors — Extract the site's full color role set. At minimum:

  • primary — main brand/action color
  • secondary — supporting accent or secondary brand color
  • neutral / surface — background/surface color
  • on-primary, on-surface — text colors on those surfaces
  • Include semantic colors if detectable: error, warning, success
  • Name tokens semantically (primary, secondary, tertiary, neutral) or use Material Design role names if the site uses a Material-style palette

Typography — Identify the main type scale. Typically 5–12 levels:

  • Display/headline levels (large, impactful headings)
  • Body levels (body-lg, body-md, body-sm)
  • Label levels (captions, tags, small UI text)
  • Include all detectable properties: fontFamily, fontSize, fontWeight, lineHeight, letterSpacing
  • Dimensions must include units: px, em, or rem

Spacing — Extract the spacing scale. Common pattern: a base unit (4px or 8px) with named steps: xs, sm, md, lg, xl. Also include layout-specific values like gutter, margin, container-max.

Rounded — Extract corner radius values. Name them: sm, DEFAULT, md, lg, xl, full (for pill shapes).

Components — Capture 4–8 key components. For each, include as many valid properties as observed: backgroundColor, textColor, typography (token ref), rounded (token ref), padding, height, width. Use token references like {colors.primary} instead of hardcoded hex values wherever pos

阅读完整来源 ↗