stitch::extract-design-md
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."
What this skill does
# 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, spacing - `globals.css` / `global.css` — CSS custom properties (variables) - Any `theme.*` or `tokens.*` 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](references/react-tailwind.md) - **Vue / Nuxt** → [references/vue.md](references/vue.md) - **Svelte / SvelteKit** → [references/svelte.md](references/svelte.md) - **Angular** → [references/angular.md](references/angular.md) - **Plain CSS / SASS / Less** → [references/plain-css.md](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 `body` or 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 = information-dense. - **Color temperature**: Are the neutrals warm (creams, tans) or cool (blue-grays, slates)? - **Overall feel**: Synthesize into 1-2 rich sentences that capture the mood. 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: 1. **Primary Foundation** — Background and surface colors 2. **Accent & Interactive** — CTA buttons, active states, links 3. **Typography & Text Hierarchy** — Primary, secondary, tertiary text 4. **Functional States** — Success, error, warning, info 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 navigation **Deduplication 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:** - Check CSS `font-family`, Tailwind `fontFamily`, Google Fonts links, or local `@font-face` declarations. - Note the **character** of each font: geometric vs humanist, serif vs sans, the feeling it evokes. **Type scale (hierarchy):** - Find every heading level (H1-H6) and body text, noting: - `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?) - Map component usage: Which heading level do product cards use? What about hero sections? **Spacing principles:** - How does text spacing relate to the overall spacing scale? - Letter-spacing patterns on headings vs body - Line-height philosophy (generous/relaxed for body, tighter for display) #### 4. Component Stylings Analyze the 4-5 most important UI primitives: **Buttons:** - Corner radius (and what it communicates — playful? professional? minimal?) - Color scheme for primary, secondary, and ghost variants - Hover/focus/active states and transition timing - Padding ratios (horizontal vs vertical) **Cards / Containers:** - Corner radius (often different from buttons — slightly rounder) - Shadow strategy: flat, subtle hover shadows, or always elevated? - Border treatment: hairline borders, colored accents, or none? - Internal padding (generous or compact?) - Image treatment within cards (full-bleed, padded, rounded?) **Navigation:** - Layout pattern (horizontal bar, vertical sidebar, drawer) - Typo
Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.