All skills
google-labs-code avatar

/extract-design-md

@681a283 official

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?" or "pull out the design from this code."

  • 7 files
  • 39.7 KB
  • Updated 5 months ago
  • GitHub

Use this Skill: https://skilld.dev/gh/google-labs-code/stitch-skills/extract-design-md

This session only. Nothing lands on disk.

referencesvue.md

≈770 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Vue / Nuxt Extraction Patterns

Vue projects have a distinctive styling architecture. Styles are often co-located with components inside <style> blocks, and Nuxt adds convention-based directories.

File Discovery Order

  1. nuxt.config.ts / nuxt.config.js — May contain global CSS paths, font configuration, and Tailwind/UnoCSS module config.

  2. assets/css/main.css (or similar) — Global styles, CSS custom properties, and font imports.

  3. tailwind.config.js (if Tailwind is used) — Same as React; extract custom theme values directly.

  4. plugins/vuetify.ts (if Vuetify) — Theme definition with custom palette and typography.

  5. Component <style> blocks — Co-located styles (scoped or global).

Single-File Component (SFC) Patterns

Vue components bundle template, script, and style together:

<template>
  <div class="card">
    <h2 class="card__title">{{ title }}</h2>
  </div>
</template>

<style scoped>
.card {
  background: var(--color-surface);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.card__title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text-primary);
}
</style>

Key extraction points:

  • var(--*) references → trace back to global CSS for the actual values
  • scoped styles → component-specific, but reveal consistent patterns
  • BEM naming (.card__title) → hints at component hierarchy

Vuetify Theme Extraction

Vuetify projects define their design system explicitly:

// plugins/vuetify.ts
export default createVuetify({
  theme: {
    defaultTheme: 'light',
    themes: {
      light: {
        colors: {
          primary: '#294056',
          secondary: '#6B6B6B',
          background: '#FCFAFA',
          surface: '#F5F5F5',
          error: '#EF4444',
          success: '#10B981',
        }
      }
    }
  }
})

This is the design system declaration. Map each key to a functional role and descriptive name.

Quasar / PrimeVue / Element Plus

These component libraries use their own theming systems:

  • Quasar: quasar.config.js → framework.config.brand for colors
  • PrimeVue: CSS themes in assets/ or theme preset configuration
  • Element Plus: SCSS variables in element-variables.scss

Look for the override file — that's where the project's unique values live.

CSS Scoping Behavior

Vue's scoped attribute adds data attributes for CSS isolation. When scanning for patterns, look at multiple components to find repeated values (same border-radius, similar padding, consistent color references). Repeated patterns across scoped styles = design system conventions.

Nuxt-Specific Patterns

  • app.vue or layouts/default.vue — Root layout, reveals global background, font loading, and overall structure.
  • assets/ — Global CSS, fonts, and images.
  • composables/ — May contain useTheme or useDesignTokens.
  • nuxt.config.ts css array — Lists global stylesheets automatically injected into every page.

Source: SKILL.md on GitHub

No third-party reports yet.

Signed by skilld at 681a283. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Steadyupdated 5 months ago
What it can do
Runs commands Reads files Edits files
All 5 allowed tools
stitch*:*BashReadWriteweb_fetch

README badge

README badge for google-labs-code/stitch-skills/extract-design-md

Analyzes frontend source code (React, Vue, Svelte, Angular, plain CSS) to extract a comprehensive design system document (DESIGN.md) that captures colors, typography, spacing, and component patterns without building or rendering the app. Use this when you need to audit styling, document visual language, or understand design tokens directly from source files.

Generated from the current SKILL.md.

Does this skill work without building or running the app?
Yes. It reads source files directly — stylesheets, component files, theme configs, Tailwind setups — so you don't need dependencies installed or the app running.
What frameworks does this skill support?
React, Next.js, Vue, Nuxt, Svelte, SvelteKit, Angular, and plain CSS/SASS/Less. It also handles CSS-in-JS libraries like styled-components and Emotion, plus Tailwind and design token files.
What does the output look like?
A DESIGN.md file placed at `.stitch/DESIGN.md` with YAML frontmatter and sections covering visual theme, color palette, typography, component styles, layout principles, and Stitch generation notes.
Can this extract colors, fonts, and spacing from Tailwind config?
Yes. The skill reads tailwind.config.js/ts to extract custom colors, fonts, and spacing scales, along with scanning component files and stylesheets.
Is this skill different from the design-md skill?
Yes. The design-md skill analyzes rendered HTML. This skill works from source code only, making it faster and useful when the app can't be built or run.

Generated from the current SKILL.md. These answers refresh after source changes.