figma_ds_analyze
Analyze app codebases to inventory components, detect frameworks, styling methods, and vendor layers before design system extraction. Compare multiple targets to find shared design language.
Instructions
Analyze one or more production app codebases as the first step of design system extraction. Detects framework (React/Next/Angular/Web Components), styling methods (Tailwind v3/v4, CSS Modules, SCSS, Emotion, styled-components), and vendor component layers (shadcn/ui, Radix, MUI, Chakra, etc.); builds a component inventory with per-component classification (vendored / wrapped / pure-vendor / bespoke), prop contracts, real usage counts (porting rank), observed prop values (variant inference), and duplicate detection. Pass multiple targets to find the shared design language across several apps. Writes the full manifest to /.extraction/analysis.json and returns a compressed summary — read slices of the manifest for detail. Run this before figma_ds_extract_tokens and figma_ds_scaffold. Local Mode only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| outDir | No | Directory where the design-system package will be generated (manifests persist under <outDir>/.extraction/). Default: '<first target>/design-system'. | |
| exclude | No | Substring filters on relative paths to skip (node_modules, dist, .next etc. are always skipped). | |
| include | No | Substring filters on relative paths — when set, only matching files are scanned (e.g. ['src/', 'app/']). | |
| targets | Yes | App root directories to analyze. Absolute paths strongly recommended (the MCP server's working directory is not the project). Multiple targets = cross-app extraction: the inventory merges and duplicate components across apps are flagged. | |
| maxFiles | No | Hard cap on files scanned per target (default 5000). |