stitch::extract-design-md — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited stitch::extract-design-md (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
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.
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.
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 CSSAlso check for:
tailwind.config.js / tailwind.config.ts — Custom colors, fonts, spacingglobals.css / global.css — CSS custom properties (variables)theme.* or tokens.* fileschakra-theme.ts, vuetify.config.ts)#### 3. Read Framework-Specific Guidance
Consult the appropriate reference for extraction patterns:
These references contain framework-specific patterns for locating colors, typography, spacing, and component styles. Read the one that matches before proceeding.
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:
body or root element background? Lightcream (#f-range) signals airy/clean; dark (#0-#2 range) signals moody/dramatic.
Check padding/margin values on root containers, section wrappers, and card components.
many packed tight = information-dense.
Look for these signals in the source:
| Source Location | What It Tells You |
|---|---|
Root background-color or Tailwind bg-* on layouts | Overall lightness/darkness |
| Spacing scale in Tailwind config or CSS vars | Whitespace philosophy |
| Number of components vs. wrapper padding | Density |
Custom property naming (--warm-* vs --cool-*) | Color temperature intent |
| Comments in theme files | Design intent in the developer's own words |
#### 2. Color Palette & Roles
Extract every unique color from the codebase and assign functional roles. Search across all layers:
Where to find colors:
| Layer | What to Search |
|---|---|
| CSS custom properties | --color-*, --primary, --bg-* |
| Tailwind config | theme.extend.colors |
| Theme/token files | Color objects, palettes |
| Component styles | background-color, color, border-color |
| Inline/scoped styles | bg-*, text-* classes in templates |
| CSS-in-JS theme objects | colors, palette keys |
How to organize: Group colors by function, not by hue:
For each color, create a descriptive name that evokes the color's character rather than its raw hex value:
#294056 → "Blue"#294056 → "Deep Muted Teal-Navy" — Primary CTA, active navigationDeduplication matters. Codebases often have near-duplicate colors (e.g., #333 and #2C2C2C). Consolidate them under one name that best represents the intended color.
#### 3. Typography Rules
Extract the complete typographic system:
Font families:
font-family, Tailwind fontFamily, Google Fonts links, orlocal @font-face declarations.
the feeling it evokes.
Type scale (hierarchy):
font-size (in rem or px)font-weight (numeric value + descriptive name)letter-spacing (and why — elegance? compactness?)line-height (generous for readability? tight for display?)hero sections?
Spacing principles:
#### 4. Component Stylings
Analyze the 4-5 most important UI primitives:
Buttons:
Cards / Containers:
Navigation:
Inputs & Forms:
Domain-Specific Components:
dashboard widgets, chat bubbles) and describe their styling patterns.
#### 5. Layout Principles
Extract the structural system:
Grid & Structure:
max-width on containers)Whitespace Strategy:
Alignment & Visual Balance:
Responsive Behavior:
#### 6. Stitch Generation Notes
Synthesize the extraction into actionable prompts for Stitch:
key components in Stitch
Assemble everything into the standard DESIGN.md format. Place it at .stitch/DESIGN.md in the project directory (create the .stitch/ directory if it doesn't exist).
[!IMPORTANT] You MUST include the YAML frontmatter at the top of the file withnameandcolorsmapping, exactly as shown in the example at examples/DESIGN.md. This structured data is required for other skills to parse the design system.
>
Failure to include this YAML block with at least the core color tokens is a failure to use this skill correctly.
Use the format from the example at examples/DESIGN.md as your template. The file must start with the YAML block, followed by the markdown sections:
# Design System: [Project Name]
**Project ID:** [If known, otherwise omit]
## 1. Visual Theme & Atmosphere
[Rich 2-paragraph description of mood, philosophy, and key characteristics]
## 2. Color Palette & Roles
### Primary Foundation
### Accent & Interactive
### Typography & Text Hierarchy
### Functional States
## 3. Typography Rules
### Hierarchy & Weights
### Spacing Principles
## 4. Component Stylings
### Buttons
### Cards & [Domain-Specific Containers]
### Navigation
### Inputs & Forms
### [Domain-Specific Components]
## 5. Layout Principles
### Grid & Structure
### Whitespace Strategy
### Alignment & Visual Balance
### Responsive Behavior & Touch
## 6. Design System Notes for Stitch Generation
### Language to Use
### Color References
### Component Prompts
### Incremental IterationIf the user wants to push the design system into Stitch:
manage-design-system skill for the MCP create/update callsthe Stitch API integration
If the user just wants the document, you're done after Phase 3.
Before delivering the DESIGN.md, verify:
intent in code comments (/* hero section — breathable */) and commit messages. These are gold for understanding the why.
style-dictionary,@tokens-studio, or similar, these files are the most authoritative source of design values.
theme.ts thatdefines a palette tells you the intended design system; scattered inline styles in components tell you what actually shipped. Both matter, but start from the theme.
tailwind.config.js, that is the design system — extract from it first, then spot-check components for overrides.
--brand-primary, they're telling you this is a design token. Respect that.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.