شعار Figma Design Extract

Figma Design Extract

المجتمع
jeltehomminga
figma-design-extract

Extract exact design values from a Figma node into a build-ready spec table, instead of eyeballing a screenshot. Use when the user shares a figma.com node URL, or says "implement this Figma design", "build this component from Figma", "extract the Figma values", or "match the Figma". This is design-to-code only - to push code into Figma, use figma-generate-design instead.

نظرة عامة

الناشرjeltehomminga
المستودعfigma-design-skills
اسم المهارةfigma-design-extract
النجوم
5
التفريعات
1
الملفات المرفقة
4
الترخيصMIT
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • الملفات المرفقة: 4

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها jeltehomminga على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Figma Design Extract في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/jeltehomminga/figma-design-skills/tree/main/skills/figma-design-extract
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/jeltehomminga/figma-design-skills.git /tmp/figma-design-skills
mkdir -p .claude/skills
cp -r /tmp/figma-design-skills/skills/figma-design-extract .claude/skills/figma-design-extract
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Figma Design Extract في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Figma Design Extract تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Figma Design Extract بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

Figma Design Extract — get the real design out of Figma

Read a Figma node into a design-spec table of exact values mapped to your codebase, before writing any component code. The table is both your build contract and the input to the companion design-fidelity-verify skill, which proves the running app matches it.

This skill is the design→code direction (read Figma, produce a spec). It is not a code→Figma generator — that's Figma's own figma-generate-design skill.

Why this exists (the failure mode it fixes)

Screenshot-as-truth. A model reads a Figma screenshot as "button, top-right" but cannot see that the radius is 8 not 12, the weight is 500 not 600, or the gap is 12 not 8. A screenshot is a visual reference only. Exact values come from Figma's structured data — variables and metadata — not from pixels. The bar is fidelity to the design's decisions — the right token — not literal pixel coordinates. Skip this and the design drifts the moment you start typing.

When to use

Trigger phrases: "implement this Figma screen/component", "build this design", "extract the Figma values", "get the tokens/spacing/colors from Figma", "match the Figma", or a figma.com/design/...node-id=... URL shared to build from.

Scope: any frontend repo (web or mobile). Backend/API repos have no UI to build.

Prerequisite: the Figma MCP server (Dev Mode MCP) connected, so get_variable_defs, get_metadata, get_design_context, and get_screenshot are available.


The extraction workflow

0. Resolve the node (don't trust stale IDs)

Get the node from the URL the designer shared, or from your issue tracker / design handoff. The node id is the node-id=NNNN-MMMM part of a Figma URL (the - becomes : in API calls, e.g. 1234:5678).

  • Node ids go stale between handoff and build. Try the given id with get_design_context first; if it returns "node not found", search by a stable numeric prefix rather than the frame name (names get renamed and double-spaced).
  • Dark mode often lives on a mirror page with identical frame names — look on the sibling page, don't search globally.
  • Keep every call node-scoped. get_metadata on a 40-frame section blows the token budget. Always pass the specific node id.

1. Structure — get_design_context(nodeId)

Use it for structure only: auto-layout → flex direction / gap, hierarchy, where component boundaries are. Do not copy its absolute pixel positions or inlined values — treat those as hints and confirm them against variables/metadata.

  • Code Connect is on by default in get_design_context. Choose by your setup:
    • You have Code Connect mapped → keep it on. It returns exact import paths and is the single best component-reuse signal — don't disable it. get_code_connect_map lists the mappings for a file if you want them up front.
    • You don't use Code Connect (most setups) → the response may nag "components missing Code Connect — map them?". Pass disableCodeConnect: true to skip that noise and get the generated structure directly. A reasonable default when no mappings exist; don't stop to set Code Connect up mid-task.
  • Treat the returned code as a representation of design and behavior, not final code style — adapt it to your conventions (Figma's own guidance).

2. Exact styles — get_variable_defs(nodeId) ← the source of truth

This answers "are we even getting the real styles?". It returns the exact color / spacing / radius / typography tokens bound in the selection. For every value:

  • Map the Figma variable to a token in your own design system — never hardcode the raw value. Resolve var(--primary/500) to whatever your repo calls it. See references/stack-mapping.md when filling the repo-token column.
  • letterSpacing is a percent, not px. Figma reports -2 to mean -0.02em; the rendered value is px-per-font-size (24px → -0.48, 18px → -0.36, 16px → -0.32). Convert %→em→px before any comparison. Read literally, this is the single most likely silent false-PASS in the whole pipeline.
  • If a value has no bound variable, that's a design smell. Flag it for the designer. For an unbound size or position, read the number from get_metadata (step 3); for an unbound fill — a gradient, a one-off color — get_metadata will not give it to you, see step 5.
  • Log token drift. If a bound token's value in your repo differs from Figma's variable value, append a row to a drift log of your choice (e.g. docs/design-drift.md) and keep using the token name — never hardcode the Figma value to "fix" it. The token package is corrected separately.

get_variable_defs only returns variables bound in this node. It is not a design-system inventory. To discover what tokens exist across linked and published libraries — before concluding "there is no token for this" — call get_libraries(fileKey) to list them, then search_design_system({ query, fileKey, includeVariables: true, includeLibraryKeys }).

3. Sizes + truncation fallback — get_metadata(nodeId) (scoped)

Two uses: exact sizes/positions not covered by a variable (fixed dimensions, one-off gaps, icon box sizes), and a fallback when get_design_context is truncated — the response is capped, so on a large node take the node map from get_metadata, then re-fetch only the child node(s) you need. Keep it node-scoped.

4. Visual reference — get_screenshot(nodeId)

Composition, states, iconography, what-goes-where. Never measure from it. It exists to catch "you built the wrong thing", not "you built it 4px off".

5. Unbound values (gradients, complex fills)

get_variable_defs only returns values bound to a variable. Anything unbound — many gradients, one-off fills — won't appear there, and get_metadata won't resolve it either. For those, read node.fills via the Figma Plugin API (use_figma) for the authoritative stops/values, and flag the missing binding as a design smell.

use_figma is a write-capable tool. Load Figma's /figma-use skill before calling it — the Figma MCP server declares that a mandatory prerequisite. Here you only ever read (node.fills); never mutate the designer's file from an extraction pass.

6. Component reuse — audit before you scaffold

Map each Figma component to an existing primitive in your repo before building anything new:

  • Grep your components directory for a primitive that already does this — a variant beats a fork.
  • Note where reuse wasn't possible and why.
  • If your org has Code Connect set up, get_design_context (or get_code_connect_map) returns exact import paths automatically; if not, map manually and treat Code Connect as a future automation, not a blocker.

Output: the design-spec table

One row per element×property. This is the deliverable — keep it in your working notes; it drives both implementation and verification.

element          | property      | Figma exact value      | repo token / class        | source component
-----------------+---------------+------------------------+---------------------------+------------------
Card container   | bg            | var(--surface/0)       | <your white-surface token>| <Card>
Card container   | radius        | 12                     | <your rounded-lg token>   | <Card>
Card container   | padding       | 16                     | <your space-4 token>      | <Card>
Title            | font/size/wt  | Heading/M 18 / 600     | <your title-m token>      | <Text>
Row gap          | gap           | 8                      | <your space-2 token>      | (auto-layout)
CTA              | bg            | var(--primary/500)     | <your primary-500 token>  | <Button primary>
CTA              | radius        | 8                      | <your rounded-md token>   | <Button>

Fill the repo token / class column with your system's names. Every cell on the right is a token reference, not a hardcoded literal. If your repo has no token system at all, that's the real finding — surface it; don't invent ad-hoc values.

Reference files, loaded on demand:

  • references/stack-mapping.md — read it when filling the repo-token column, for how a Figma variable lands in Tailwind/NativeWind, a Restyle theme, CSS custom properties, or a color-only prop.
  • references/assets-and-gate.md — read it when the node contains icons or illustrations to export, or when you're ready to enforce "no raw values" on the diff.
  • examples/worked-example.md — a full pass over one real card, call by call, ending in a filled spec table.

Guardrails

  • Never write a hardcoded color/spacing/radius/font value that has a bound Figma variable — map it to a token.
  • Never measure from a screenshot. Structured values only.
  • Keep every Figma call node-scoped to control token cost.
  • An unbound value is a design smell — flag it, don't silently bake in the raw number.
  • Convert letterSpacing from percent before comparing it to anything.
  • Log Figma↔token drift instead of hardcoding the Figma value; fixing the token package is a separate task.

Hand-off

The spec table is the input to design-fidelity-verify: build the component from the table, then run that skill to prove — by measuring rendered values, not by glancing — that the running app matches every row.

الملفات المرفقة

يقرأ النموذج هذه الملفات عند الحاجة ما دامت المهارة محمّلة. وهي متاحة للقراءة ولا تُنفّذ أبدًا.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Figma Design Extract؟

Extract exact design values from a Figma node into a build-ready spec table, instead of eyeballing a screenshot. Use when the user shares a figma.com node URL, or says "implement this Figma design", "build this component from Figma", "extract the Figma values", or "match the Figma". This is design-to-code only - to push code into Figma, use figma-generate-design instead.

لماذا تستخدم Figma Design Extract على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Figma Design Extract عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Figma Design Extract في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/jeltehomminga/figma-design-skills/tree/main/skills/figma-design-extract. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Figma Design Extract؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Figma Design Extract؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Figma Design Extract معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Figma Design Extract مجانية؟

نعم. نشرها jeltehomminga على GitHub بموجب ترخيص MIT. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇