Figma Extract Design System logo

Figma Extract Design System

Organization
southleft
figma-extract-design-system

Extract a design system from vibe-coded production apps that never had one: inventory components, mine de-facto styling into DTCG tokens, scaffold a Storybook package, port components, and optionally round-trip tokens/components into Figma. Use when the user wants to 'extract a design system', 'create a design system from this app/codebase', 'reverse-engineer our components into Storybook', 'turn our app styles into tokens', or 'consolidate the UI of several AI-built products'. Works best with the figma-console-mcp local server connected (figma_ds_* tools); includes an agent-driven fallback.

Overview

Publishersouthleft
Repositoryfigma-console-mcp-skills
Skill namefigma-extract-design-system
Stars
94
Forks
4
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by southleft on GitHub. Read the source before you install it.

Installation

Install the Figma Extract Design System AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/southleft/figma-console-mcp-skills/tree/main/skills/figma-extract-design-system
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/southleft/figma-console-mcp-skills.git /tmp/figma-console-mcp-skills
mkdir -p .claude/skills
cp -r /tmp/figma-console-mcp-skills/skills/figma-extract-design-system .claude/skills/figma-extract-design-system
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Figma Extract Design System in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Figma Extract Design System on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Figma Extract Design System is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

figma-extract-design-system — production app(s) → design system

Organizations let small teams vibe-code products with AI. The products work — but there's no design system underneath, so nothing is consistent, reusable, or versionable. This skill runs the extraction engagement: app(s) → component inventory → DTCG tokens → Storybook package → (optionally) Figma.

Two valid stopping points:

  • Code-led org: stop at the Storybook package. It becomes the versioned source of truth that gets packaged and re-imported into the products.
  • Design-led org: continue into Figma — tokens become variables (figma_import_tokens), key components become Figma component sets.

Tooling modes

  • Preferred — figma-console-mcp connected (Local Mode): use the five figma_ds_* tools. They are deterministic, bounded, and persist manifests under <outDir>/.extraction/ so the engagement survives session boundaries.
  • Fallback — no console MCP: do the same phases yourself with Read/Grep/Bash (slower, less deterministic). Keep the same artifacts: an analysis.json you write yourself, DTCG tokens/tokens.json, and the same package layout. For the Figma round-trip use the figma-import-tokens skill (official Figma MCP use_figma).

Phase 0 — Discovery (talk first)

Establish with the user before scanning:

  1. Target app path(s) — absolute paths. Multiple apps is a feature: the real design system is the intersection of their products.
  2. Code-led or design-led? Decides whether Phase 6 (Figma) happens.
  3. Brand/naming context — product name, existing brand color names if any. Needed for the semantic-naming pass.
  4. Where the design system lives — default <first app>/design-system, or a separate dir in the monorepo.

Phase 1 — Analyze

figma_ds_analyze { targets: ["/abs/path/app"], outDir: "/abs/path/app/design-system" }

Review the summary with the user before proceeding — especially the architecture block, which is what separates a design system from a UI kit:

  • specializations are usage-named components (FollowButton, ModerationMenu, NodeCard) — each is really a generic component (Button, Menu, Card) plus a usage. The usage is what makes it a "follow button"; the component is just a button.
  • missingPrimitives is the build list: generics the app implies but never made.
  • levels is the atomic-design read (atom/molecule/organism/template) — heuristic; confirm the org's vernacular with the user.

Generalization pass (after review, before/during porting): if the design-systems-assistant MCP is connected, ground decisions in it (search_design_knowledge for naming conventions, component API design, atomic hierarchy — it carries the cross-industry best practices). Then:

  1. Build each agreed missingPrimitive as a generic component with a variant/prop API wide enough to cover its observed specializations.
  2. Re-express each specialization as a recipe: either a story on the generic ("Button → Recipes/Follow") or a thin wrapper in a recipes/ tier — never a sibling primitive. The product keeps its follow button; the SYSTEM ships Button.
  3. Organize Storybook by the chosen layers (e.g. Primitives/, Components/, Patterns/) instead of one flat Components/ list.
  4. Not every specialization collapses — positional qualifiers (LeftNav) or true one-off organisms (ThreadCanvas) may stay; the report proposes, the user disposes.

Also review the classic items:

  • Classification matters. vendored (shadcn-style copied source) and bespoke get ported as-is; wrapped gets ported keeping the vendor package as a peer dep; pure-vendor (raw MUI/Chakra usage) is NOT ported — it's represented by theme/tokens and usage docs.
  • duplicateGroups are the vibe-code smell (three Button.tsx files). Decide the canonical one per group with the user; record losers as skipped in figma_ds_status with a note.
  • Porting order = the tool's usage ranking (topByUsage). Don't port long-tail components nobody uses without asking.

Phase 2 — Extract tokens

figma_ds_extract_tokens { outDir, formats: [...match the app's styling method...] }
  • declared tokens (CSS vars, @theme, SCSS vars, tailwind theme, shadcn HSL triples) keep their names and carry sources provenance. .dark / [data-theme=dark] values become a real Light/Dark multi-mode structure.
  • inferred tokens are frequency-promoted raw values — review them with the user; the belowThreshold list is worth a skim for near-misses.

Semantic-naming pass (your job, not the tool's): structural names (color/blue/500, color/extracted/hex-22c55e) are correct but not shippable. With the user's brand context, layer semantic alias tokens (color/primary → {color.blue.500}) by editing tokens/tokens.json — add to the Semantic group, reference primitives with {dot.path} aliases, never delete the primitives. Re-run figma_ds_extract_tokens only if the codebase changed (it regenerates; hand edits to generated projections are lost, edits to tokens.json are the input for scaffold).

Phase 3 — Scaffold + Storybook

figma_ds_scaffold { outDir, packageName: "@org/design-system" }
cd <outDir> && npm install && npm create storybook@latest -- --yes --no-dev
figma_ds_setup_storybook { outDir }    # AFTER init — wires the workshop to the extraction

figma_ds_setup_storybook generates .storybook/preview.css (extracted tokens + the source app's @theme mapping, @utility definitions, @layer base, and @font-face rules so production class names and fonts render faithfully), copies self-hosted fonts, and patches main.js (tailwind vite plugin + automatic JSX runtime) and preview.jsx (theme toolbar/decorator from the extracted mode names). Apply any manualSteps it returns, then restart the dev server. Verify .storybook/main story globs include src/**/*.mdx — the generated src/docs/*.mdx pages are the token/typography/iconography showcases.

Phase 4 — Port components (the loop)

Per component, in usage-rank order:

  1. figma_ds_extract_component { outDir, component: "Button" } — gives source, local import closure, prop contract, observed call-site variants, style touchpoints, and a CSF3 story scaffold.
  2. Port into <outDir>/src/components/<Name>/ — each component gets its own directory, component file, stories file, and index (never monolithic files). Decouple app-specific imports (routing, data fetching, global state); replace hardcoded values with tokens (check styleTouchpoints.customProperties against tokens.json).
  3. Adapt the story scaffold — one story per real variant (observedProps), tags: ['autodocs'].
  4. Visually verify in Storybook (browser) before calling it done.
  5. figma_ds_status { outDir, update: { component, status: "ported", storyFile } }.

Long engagements: figma_ds_status { outDir } at session start tells you exactly where you left off.

Phase 5 — Code-led stopping point

Buildable, versioned package: components + tokens + Storybook. Set up whatever publishing/versioning the org uses (changesets, private registry). The products then consume @org/design-system instead of their local copies — that migration is a separate engagement.

Phase 6 — Design-led: into Figma

  1. Tokens → variables: figma_import_tokens with tokens/tokens.json (top-level groups become collections; Light/Dark modes come across). Preview with strategy: "dry-run" first.
  2. Components → Figma: rebuild key components as component sets using the existing tools (figma_create_component_set, figma_execute) or the figma-generate-library / prototype-to-figma workflows — bind fills/strokes/radii to the imported variables so Figma and code share one token source.
  3. From then on the sync loop is figma_export_tokens / figma_import_tokens diff-aware merge.

Boundaries & gotchas

  • figma_ds_* tools are Local Mode only (they read/write the local filesystem).
  • Extraction never mutates the target app — everything lands under outDir.
  • Absolute paths always: the MCP server's working directory is not the project.
  • Don't hand-edit generated projections (tokens.css, theme.css, …); edit tokens.json (or the source app) and regenerate.
  • Provenance lives in $extensions["figma-console-mcp.extraction"] on every token — use it to justify decisions to the user ("this is your primary because it appears 214 times").

Frequently asked questions

What does the Figma Extract Design System AI skill do?

Extract a design system from vibe-coded production apps that never had one: inventory components, mine de-facto styling into DTCG tokens, scaffold a Storybook package, port components, and optionally round-trip tokens/components into Figma. Use when the user wants to 'extract a design system', 'create a design system from this app/codebase', 'reverse-engineer our components into Storybook', 'turn our app styles into tokens', or 'consolidate the UI of several AI-built products'. Works best with the figma-console-mcp local server connected (figma_ds_* tools); includes an agent-driven fallback.

Why use Figma Extract Design System on TypingMind?

Because you install it once and use it with any model. Figma Extract Design System is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Figma Extract Design System in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/southleft/figma-console-mcp-skills/tree/main/skills/figma-extract-design-system. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Figma Extract Design System?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Figma Extract Design System?

As many as you like. As long as a model supports skills, you can use Figma Extract Design System with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Figma Extract Design System AI skill free?

Yes. It is published on GitHub by southleft under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇