Figma Generate Library logo

Figma Generate Library

Organization
memi-design
figma-generate-library

Generate Figma component library from React/shadcn codebase with Code Connect parity

Overview

Publishermemi-design
Repositorydesign-skills
Skill namefigma-generate-library
Stars
7
Forks
0
Bundled files
1
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.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by memi-design on GitHub. Read the source before you install it.

Installation

Install the Figma Generate Library 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/memi-design/design-skills/tree/main/skills/figma-generate-library
  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/memi-design/design-skills.git /tmp/design-skills
mkdir -p .claude/skills
cp -r /tmp/design-skills/skills/figma-generate-library .claude/skills/figma-generate-library
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Figma Generate Library 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 Generate Library 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 Generate Library 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-generate-library — Create Component Library from Codebase

Generate Figma components from your React/shadcn codebase, establishing Code Connect for perfect design-code parity. Requires /figma-use.

Freedom Level: High

Full creative freedom for visual representation, but component structure must mirror the codebase exactly.

Prerequisites

  • /figma-use foundational skill loaded
  • Codebase has shadcn/ui or similar component library
  • memi connect active
  • figma_search_components called this session

Workflow

Step 1: Check Existing Mappings

get_code_connect_map → what's already mapped?

Skip components that already have Code Connect mappings. Only create what's missing.

Step 2: Scan Codebase Components

Read generated/ and src/components/ directories
Identify all React components with:
  - Props interface (variants, sizes, states)
  - shadcn/ui base components used
  - Tailwind classes → map to Figma properties
  - Atomic level (atom/molecule/organism)

Step 3: Create Variables First (Batch)

Before components, ensure design tokens exist:

figma_batch_create_variables (up to 100 per call):
  colors/ → all color tokens (primary, secondary, destructive, etc.)
  spacing/ → 0, 1, 2, 3, 4, 5, 6, 8, 10, 12, 16, 20, 24, 32, 40, 48, 64
  radius/ → none, sm, default, md, lg, xl, 2xl, full
  typography/ → font sizes, weights, line heights

Always use batch tools — 10-50x faster than individual calls.

Step 4: Build Components Bottom-Up

1. Create or find "Design System" page
2. Create Section per atomic level:
   ├── Section "Atoms"
   ├── Section "Molecules"
   ├── Section "Organisms"
   └── Section "Templates"
3. For each component:
   a. Use use_figma (preferred) or typed Mémoire Figma actions for creation
   b. Add variant properties matching React props
   c. Bind all visual properties to variables
   d. Apply correct sizing (hug/fill)
   e. Document with description
4. Arrange with figma_arrange_component_set
Atoms (shadcn/ui primitives)

Each atom becomes a Component Set with variant properties:

ComponentSet "Button"
├── variant=default, size=default
├── variant=destructive, size=default
├── variant=outline, size=sm
└── variant=ghost, size=lg

Properties:
  variant: default | destructive | outline | secondary | ghost | link
  size: default | sm | lg | icon
  state: default | hover | active | disabled | focused
  hasIcon: boolean
  label: text property
Molecules (composed atoms)
Component "FormField"
├── Label (instance of Atom/Label)
├── Input (instance of Atom/Input)
└── HelpText (instance of Atom/HelpText, optional)

Properties:
  state: default | error | success | disabled
  hasHelpText: boolean
  label: text
  placeholder: text
Organisms (composed molecules + atoms)
Component "LoginForm"
├── FormField (email)
├── FormField (password)
├── Checkbox (remember me)
├── Button (submit, fill width)
└── Links row

Properties:
  hasSocialLogin: boolean
  hasRememberMe: boolean

Step 5: Self-Healing Loop (per component)

Run the self-healing loop from /figma-use for each component. Additionally verify: matches codebase visually, all variants render, properties documented, PascalCase naming.

Step 6: Establish Code Connect (PRIMARY OUTPUT)

This is the most important step. Map every Figma component to code:

add_code_connect_map:
  Button → src/components/ui/button.tsx
  Input → src/components/ui/input.tsx
  Card → src/components/ui/card.tsx
  FormField → src/components/molecules/FormField.tsx
  LoginForm → generated/components/LoginForm/LoginForm.tsx

Step 7: Generate Mémoire Specs

For each component created:

memi spec component Button
memi spec component FormField
memi spec component LoginForm

shadcn/ui → Figma Mapping

shadcn ComponentFigma TypeAtomic LevelKey Properties
ButtonComponent SetAtomvariant, size, state, hasIcon
InputComponent SetAtomstate, type, hasIcon
LabelComponentAtomrequired (boolean)
BadgeComponent SetAtomvariant
CardComponentAtom—
SeparatorComponentAtomorientation
SelectComponent SetMoleculestate, hasPlaceholder
DialogComponent SetOrganismhasOverlay, size
SheetComponent SetOrganismside, size
TableComponent SetOrganismhasHeader, hasPagination
SidebarComponentOrganismcollapsed (boolean)
TabsComponent SetMoleculevariant, orientation
TooltipComponentAtomposition
AvatarComponent SetAtomsize, hasImage

Anti-Patterns

  • Creating components without variables (hardcoded colors/spacing)
  • Skipping Auto Layout (absolute positioning breaks responsiveness)
  • Not documenting component properties
  • Missing hover/active/disabled states
  • Forgetting to create the component set (just loose frames)
  • Not establishing Code Connect after creation — this is the whole point
  • Using individual variable creation instead of batch operations
  • Using raw Figma execution for design-system-aware creation when use_figma works

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Figma Generate Library AI skill do?

Generate Figma component library from React/shadcn codebase with Code Connect parity

Why use Figma Generate Library on TypingMind?

Because you install it once and use it with any model. Figma Generate Library 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 Generate Library in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/memi-design/design-skills/tree/main/skills/figma-generate-library. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Figma Generate Library?

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 Generate Library?

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

Is the Figma Generate Library AI skill free?

Yes. It is published on GitHub by memi-design 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 👇