stitch::extract-design-md
它能做什么
这项技能通过研究前端源文件,在 DESIGN.md 文件中描述项目的视觉设计系统。适合希望记录或统一网站样式的人。
适用场景
- ✓当你想为现有前端项目记录其设计系统的时候。
- ✓当你想审计或统一整个代码库中的样式的时候。
- ✓当应用无法构建,但源代码可以获取的时候。
技能链接
https://github.com/google-labs-code/stitch-skills/blob/main/plugins/stitch-design/skills/extract-design-md/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请阅读我们 React 项目的样式和 Tailwind 配置,并编写一份描述我们颜色和排版的 DESIGN.md。”
每周 5 个新技能,1 分钟读完。
工作原理
它读取样式表、组件文件和主题设置,然后总结颜色、字体、间距和设计模式。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Extract Design System from Frontend Code
Analyze frontend source code to extract a comprehensive design system document (DESIGN.md) that captures the project's visual language — colors, typography, spacing, component patterns, and layout principles — directly from the source files, without needing to build or render the application.
Why This Exists
The design-md skill works from rendered HTML. But often you have a codebase
and want to understand its design system before you can even run the app —
maybe dependencies are missing, the build is broken, or you just want a quick
audit. This skill reads the source files themselves: stylesheets, component
files, theme configs, and Tailwind setups. It's faster and works anywhere.
When to Use
- User has a frontend codebase and wants to extract or document its design system
- User wants to migrate a project's visual identity into Stitch
- User asks to "audit the styling" or "understand the design language" of a repo
- User wants to create a DESIGN.md from existing source code
- The app can't be built/rendered but the source is available
- User wants to unify or reconcile inconsistent styles across a codebase
Prerequisites
- Access to the frontend project's source directory
- No build or runtime dependencies needed — this skill reads source files only
Workflow
Phase 1: Project Discovery
Start by understanding what you're working with. This determines which extraction patterns to use.
1. Detect the Framework and Stack
Scan the project root for telltale files:
| Signal File | Framework / Tool |
|---|---|
package.json with react |
React / Next.js |
package.json with vue |
Vue / Nuxt |
package.json with svelte |
Svelte / SvelteKit |
package.json with @angular/core |
Angular |
tailwind.config.js/ts |
Tailwind CSS |
postcss.config.js |
PostCSS pipeline |
styled-components or @emotion in deps |
CSS-in-JS |
.css / .scss / .less files only |
Plain CSS / SASS |
theme.js / theme.ts / tokens.js |
Design token files |
Read package.json first — it reveals the framework, CSS tooling, and any
design-token libraries (e.g., style-dictionary, @chakra-ui/react,
@mui/material, ant-design). This context tells you where to look for
styling information.
2. Map the Source Tree
Identify the key directories and files you'll analyze:
src/
├── components/ ← Component-level styles
├── styles/ ← Global stylesheets
├── theme/ ← Theme definitions, tokens
├── assets/ ← Fonts, images
├── app.css ← Root styles
└── index.css ← Entry CSS
Also check for:
tailwind.config.js/tailwind.config.ts— Custom colors, fonts, spacingglobals.css/global.css— CSS custom properties (variables)- Any
theme.*ortokens.*files - Component library config (e.g.,
chakra-theme.ts,vuetify.config.ts)
3. Read Framework-Specific Guidance
Consult the appropriate reference for extraction patterns:
- React / Next.js / Tailwind → references/react-tailwind.md
- Vue / Nuxt → references/vue.md
- Svelte / SvelteKit → references/svelte.md
- Angular → references/angular.md
- Plain CSS / SASS / Less → references/plain-css.md
These references contain framework-specific patterns for locating colors, typography, spacing, and component styles. Read the one that matches before proceeding.
Phase 2: Deep Extraction
Work through each design dimension systematically. For each one, gather raw data from the source files, then synthesize it into descriptive language.
The goal isn't to dump every CSS property — it's to understand the intent behind the styling choices and describe them in human, editorial language that another designer (or Stitch) can use to recreate the same visual feel.
1. Visual Theme & Atmosphere
Read the broadest styling first to understand the overall mood:
- Root background: What's the
bodyor root element background? Light cream (#f-range) signals airy/clean; dark (#0-#2 range) signals moody/dramatic. - Whitespace philosophy: Are spacing values generous (32px+) or tight? Check padding/margin values on root containers, section wrappers, and card components.
- Density: Count the components per page/section. Few with space = minimal; many packed tight =
常见问题
需要运行应用吗?
不需要。这项技能只读取源文件,因此不需要构建或运行应用。
它支持哪些框架?
这项技能支持 React、Vue、Svelte、Angular 以及纯 HTML 和 CSS。
生成的结果可以在 Stitch 中使用吗?
可以。该文档的设计是与 Stitch 兼容的。
详情
作者的原始描述
Extract a comprehensive design system (DESIGN.md) directly from frontend source code — React, Vue, Svelte, Angular, plain HTML/CSS, or any web framework. Analyzes component files, stylesheets, Tailwind configs, theme definitions, and design tokens to produce a rich, Stitch-compatible design system document. Use this skill whenever the user wants to reverse-engineer a design system from an existing codebase, audit the visual language of a project, extract design tokens from source files, or understand the styling patterns in a frontend repo — even if they just say "what does this app look like?
热度
- GitHub 星标
- 8.7k
- 排名
- #12342
- 许可证
- Apache-2.0
- 更新时间
- 2026/8/17
评论
- …
同一仓库的更多技能
stitch::react-components
8.7k帮你的智能体把 Stitch 设计转换为 React 和 Vite 组件,或更新现有组件以匹配最新设计,并进行检查。
stitch::react-native
8.7k帮你的智能体把 Stitch 网页设计转换为手机应用用的 React Native 组件,或更新现有的移动端界面以匹配较新的设计。
react-vite-dashboard
8.7k帮你的智能体根据 Stitch 设计构建数据密集型的 React 和 Vite 仪表盘,使用 TanStack Query,并从 DESIGN.md 文件中读取设计令牌。
shadcn-ui
8.7k帮你的智能体查找、安装并自定义 shadcn/ui 组件,这是一组使用 Radix 或 Base UI 以及 Tailwind CSS 构建、可直接复制到项目中的界面组件。