Figma Preflight logo

Figma Preflight

Community
senlindesign
figma-preflight

Triggers on 'let's start', 'begin', 'preflight', 'start the session', or when a Figma file URL is first shared. Verifies MCP connection, reads CLAUDE.md, audits connected libraries, and loads a Token Map of all Styles and Variables — required before any design work.

Overview

Publishersenlindesign
Repositoryclaude2figma
Skill namefigma-preflight
Stars
206
Forks
17
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 senlindesign on GitHub. Read the source before you install it.

Installation

Install the Figma Preflight 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/senlindesign/claude2figma/tree/main/.claude/skills/figma-preflight
  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/senlindesign/claude2figma.git /tmp/claude2figma
mkdir -p .claude/skills
cp -r /tmp/claude2figma/.claude/skills/figma-preflight .claude/skills/figma-preflight
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Figma Preflight 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 Preflight 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 Preflight 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 Preflight

Run at the start of every design session. Do NOT start design work until all steps pass.

Prerequisite: Load figma-use skill before any use_figma call.


Step A — Connection + Config (parallel)

Run these two in parallel:

  1. MCP Connection: Call mcp__figma__whoami. Must return user email and plan. Fail → stop, re-authenticate.
  2. CLAUDE.md: Read CLAUDE.md. Extract Figma file URL (required — stop if missing), font families, session goal. If fonts field is a placeholder, auto-populate after Step C using STRING variables starting with "Family".

Step B — File + Libraries (parallel)

Parse fileKey from the Figma URL, then run in parallel:

  1. File Access: Call get_metadata with extracted nodeId and fileKey. Must return file name and pages.
  2. Libraries: Call get_libraries with fileKey. Store subscribed libraries as Library Registry (name, libraryKey, description). These enable search_design_system to find library styles and components during design work.

Step C — Styles + Variables + Components (single use_figma call)

Combine all three inventories in one script:

javascript
const textStyles = await figma.getLocalTextStylesAsync();
const paintStyles = await figma.getLocalPaintStylesAsync();
const collections = await figma.variables.getLocalVariableCollectionsAsync();
const variables = await figma.variables.getLocalVariablesAsync();

const grouped = {};
for (const v of variables) {
  const key = v.resolvedType;
  if (!grouped[key]) grouped[key] = [];
  grouped[key].push({ name: v.name, scopes: v.scopes });
}

const components = {};
for (const page of figma.root.children) {
  await figma.setCurrentPageAsync(page);
  const sets = page.findAll(n => n.type === "COMPONENT_SET");
  const solos = page.findAll(n => n.type === "COMPONENT" && n.parent.type !== "COMPONENT_SET");
  if (sets.length > 0 || solos.length > 0) {
    components[page.name] = {
      sets: sets.map(c => c.name),
      solos: solos.map(c => c.name).slice(0, 15),
    };
  }
}

return {
  textStyles: textStyles.map(s => s.name),
  paintStyles: paintStyles.map(s => s.name),
  collections: collections.map(c => c.name),
  variableCount: variables.length,
  byType: Object.fromEntries(
    Object.entries(grouped).map(([type, vars]) => [type, vars.map(v => v.name)])
  ),
  components
};

Store names only in context. IDs are looked up on-demand during design work. Library styles/variables are discovered via search_design_system.


Token Map

After Step C, derive a semantic index from variables grouped by scopes:

RoleScopeExample names
Background fillFRAME_FILL, SHAPE_FILLbackground/surface, color/neutral-100
Text colorTEXT_FILLtext/primary, color/neutral-900
Border / strokeSTROKE_COLORborder/default, color/neutral-300
GapGAPgap/sm, spacing/xxs
PaddingPADDINGpadding/md, spacing/section-xl
Border radiusCORNER_RADIUSradius/sm, radius/full

Status Report

✅ MCP Connection    — [name] ([email]) · [plan]
✅ CLAUDE.md         — Font: [primary] / [code] · Goal: [goal]
✅ Figma File        — [file name] · [N] pages
✅ Libraries         — [N] connected: [names]
✅ Styles            — [N] text + [N] paint
✅ Variables         — [N] across [N] collections
✅ Components        — [N] sets across [N] pages

── Token Map ──────────────────────────────
Background  : [names]
Text        : [names]
Border      : [names]
Gap         : [names]
Padding     : [names]
Radius      : [names]
────────────────────────────────────────────

Ready to design.

If any step fails, output ❌ with error and stop.

Frequently asked questions

What does the Figma Preflight AI skill do?

Triggers on 'let's start', 'begin', 'preflight', 'start the session', or when a Figma file URL is first shared. Verifies MCP connection, reads CLAUDE.md, audits connected libraries, and loads a Token Map of all Styles and Variables — required before any design work.

Why use Figma Preflight on TypingMind?

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

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/senlindesign/claude2figma/tree/main/.claude/skills/figma-preflight. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Figma Preflight?

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 Preflight?

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

Is the Figma Preflight AI skill free?

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