Token导航 LogoToken导航

Agent Skill · 研究检索

figma-design-extraction(Figma 设计 extraction)

用于辅助界面设计、视觉规范、排版、配色、布局和交互体验优化。它适合让 Agent 根据产品场景整理页面结构、生成 UI 方案、检查视觉一致性或改进组件层级。使用时需要结合现有品牌、设计系统和用户任务,不应只堆装饰元素;涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出、对齐和响应式表现。

figma-design-extraction 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为调用外部服务;许可证信息还不明确,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 63,254。

总安装 318周安装 13GitHub Stars 10下载 103核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:figma-design-extraction(Figma 设计 extraction)
来源仓库:https://github.com/petbrains/mvp-builder
仓库路径:skills/figma-design-extraction
安装命令:
npx skills add https://github.com/petbrains/mvp-builder --skill figma-design-extraction
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/petbrains/mvp-builder --skill figma-design-extraction

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于辅助界面设计、视觉规范、排版、配色和布局优化。适合整理页面结构、生成 UI 方案或检查视觉一致性。使用时需结合现有品牌、设计系统和用户任务。涉及真实页面改动时应通过截图或浏览器预览检查表现。figma-design-extraction 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/figma-design-extraction

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/petbrains/mvp-builder --skill figma-design-ext…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要调用外部服务,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

figma-design-extraction 怎么安装?

在终端执行 npx skills add https://github.com/petbrains/mvp-builder --skill figma-design-extraction。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

figma-design-extraction 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

figma-design-extraction 需要什么权限?

权限级别是调用外部服务。该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

figma-design-extraction 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

figma-design-extraction 用的人多吗?

公开数据是累计安装 318 次,近一周安装 13 次,下载 103 次,GitHub 10 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

figma-design-extraction 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
figma-design-extraction

Figma 设计 extraction · 本页

31810调用外部服务未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Figma Design Extraction

Extract design tokens, screen structure, and visual references from Figma files.

Process: CHECK → PARSE → DISCOVER → EXTRACT → ORGANIZE

The goal is to pull structured, source-tracked design data from Figma for use in design-setup pipelines, conflict resolution, and downstream code generation. Every extracted value carries its source tag — this matters because downstream consumers (like design-setup Phase 3) need to know whether a token came from an explicit Figma Variable definition or was inferred from applied styles, since that affects conflict resolution priority.

Step 0: CHECK — Verify MCP Connection

Before any extraction, verify the Figma MCP server responds:

whoami()

If this fails or isn't available, warn the user and skip all Figma steps. Don't attempt tool calls that will error out — it wastes context and confuses the workflow.

Step 1: PARSE — Get IDs from URL

URL Formats

https://figma.com/design/:fileKey/:fileName?node-id=X-Y
https://figma.com/file/:fileKey/:fileName?node-id=X-Y
https://figma.com/proto/:fileKey/:fileName?node-id=X-Y

What to Extract

  • fileKey: segment after /design/, /file/, or /proto/
  • nodeId: node-id query param, convert dash → colon (1-2 → 1:2)
URL: https://figma.com/design/kL9xQn2VwM8pYrTb4ZcHjF/MyApp?node-id=42-15
  → fileKey: kL9xQn2VwM8pYrTb4ZcHjF
  → nodeId: 42:15

Decision Rules

ConditionAction
URL has /design/, /file/, /proto/Parse and proceed
URL has /board/ (FigJam)Warn: "FigJam not supported" → skip
URL has /slides/Warn: "Slides not supported" → skip
No URL, MCP connectedCan still extract variables — see "No URL Available" below
No URL, MCP not connectedWarn: "No Figma source available" → skip
nodeId missing in URLFetch root pages first, then navigate

No URL Available

If there's no Figma URL but the figma MCP is connected (Step 0 passed), get_variable_defs still works — it returns all variables for the file without a specific node. You can extract tokens without screenshots or screen discovery. For screen-level extraction (screenshots, design context), a URL with a nodeId or page reference is needed.

Step 2: DISCOVER — Map File Structure

2.1 Fetch Page Overview

Call get_metadata to get XML structure with node IDs, layer types, names, positions, sizes.

Depth strategy matters because large files overwhelm in a single call:

  1. Start at the provided nodeId (or page level like 0:1) to get top-level frames
  2. If response is too large or truncated → narrow to individual pages
  3. For each page, identify top-level frames — these are your screens

2.2 Build Screen Inventory

Extract from metadata:

SCREENS[] = [{
  nodeId: "X:Y",
  name: "Login Screen",
  page: "Authentication",
  width: N,
  height: N,
  slug: "login-screen"    ← kebab-case for pipeline references
}]

Slug normalization:

  • "Login Screen" → login-screen
  • "Dashboard / Overview" → dashboard-overview
  • "01 - Onboarding Flow" → onboarding-flow
  • Strip leading numbers and separators, convert spaces/slashes to hyphens

2.3 Large File Strategy

If the file has many pages:

  1. Fetch page-level metadata first
  2. For each page, fetch frame-level children separately
  3. Focus on top-level frames — skip deeply nested component internals
  4. Log skipped content: "Skipped N nested components in page X"

Step 3: EXTRACT — Pull Design Data

Three independent extraction types. Run what the consumer needs.

3.1 Variables (Primary Token Source)

get_variable_defs returns variable definitions — a flat map of paths to values.

Categorize by inspecting the path structure. Figma variable paths vary wildly between teams — there's no universal naming convention. Common patterns include:

color/primary/500          → color token
primitives/color/blue/500  → color token
semantic/text/primary       → color token (semantic layer)
font/body/size             → typography token
text/heading/weight        → typography token
spacing/lg                 → spacing token
space/4                    → spacing token
radius/md                  → border-radius token
shadow/card                → shadows token
breakpoint/md              → breakpoints token
duration/fast              → animation token
easing/default             → animation token

Categorization strategy: Look at the value type first (hex color → color, numeric with px/rem → typography/spacing, shadow definition → shadows), then use the path as a naming hint. Don't force paths into a rigid taxonomy — let the actual data guide categorization.

Mark all values with source: "figma-variables" — these are intentional design decisions by the designer, not just what happened to be applied to a frame. This distinction drives conflict resolution downstream: a variable definition is stronger evidence than an applied style.

When variables come back empty — this is common. Many Figma files use local styles instead of Variables. Don't treat this as an error. Fall back to design context (3.2).

3.2 Design Context (Fallback Token Source)

get_design_context returns rich structured data: layout, typography, colors, component structure, spacing, padding.

Use this when:

  • Variables (3.1) returned empty or sparse
  • You need applied-style values (what's actually on frames, not just defined)
  • Understanding component patterns (Auto Layout, constraints, variants)

Extract token-like values from:

  • Color fills → color tokens
  • Text styles (font family, size, weight, line-height) → typography tokens
  • Auto Layout spacing/padding → spacing tokens
  • Corner radius → border-radius tokens
  • Effects (shadows, blurs) → shadows tokens
  • Transition/animation properties → animation tokens

Extract component information from:

  • Named component instances → component name, variant properties
  • Auto Layout containers with semantic names → layout components
  • Repeated patterns across screens → shared components

Mark all values with source: "figma-context" — these are inferred from usage, not declared as variables. They're valid design data but carry less authority in conflict resolution because a designer might have applied a one-off value to a frame without intending it as a system token.

Truncation handling (critical for complex designs):

  1. If response is too large → call get_metadata first to get the node map
  2. Identify specific child nodes from metadata
  3. Fetch children individually with get_design_context
  4. Merge results

3.3 Screenshots (Visual References)

get_screenshot renders the node as an image. Return screenshot data for each screen — the caller specifies save paths.

For each screen in SCREENS[], capture a screenshot. These serve as visual truth during implementation and validation.

Practical notes:

  • Capture all top-level screens identified in DISCOVER
  • If a screen screenshot fails → log warning, continue with remaining screens
  • Very large frames may timeout → try child frames as fallback
  • Screenshots are supplementary — extraction continues even if screenshots fail

Step 4: ORGANIZE — Structure Results

Where to Save

The caller decides the output path — this skill extracts and structures data, it doesn't own the file layout. If no path is specified, return the data structures in-memory for the caller to place where it needs them.

4.1 Unified Token Map

Merge tokens from all sources into a single map. Source tracking enables downstream conflict resolution when file-based tokens disagree with Figma tokens.

FIGMA_TOKENS = {
  colors: {
    "primary-500": { value: "#3B82F6", source: "figma-variables" },
    "surface":     { value: "#FFFFFF", source: "figma-context" }
  },
  typography: {
    "body-size":   { value: "16px", source: "figma-variables" },
    "heading-weight": { value: "700", source: "figma-context" }
  },
  spacing: { ... },
  "border-radius": { ... },
  shadows: { ... },
  animation: { ... },
  breakpoints: { ... }
}

Merge priority: figma-variables wins over figma-context when both provide the same token. Variables are explicit declarations; context values are inferred from usage.

4.2 Component List

Extract component information from design context responses into a structured list:

FIGMA_COMPONENTS = [{
  figmaName: "Button / Primary",
  dsName: "Button",
  variants: ["primary", "secondary", "ghost"],
  confidence: "high",
  source: "figma-context"
}]

Confidence levels:

  • high — named component instance with clear variant properties
  • medium — repeated pattern with consistent naming
  • low — inferred from layout structure, name is ambiguous

If design context returned no component data → FIGMA_COMPONENTS = [] (empty, not error).

4.3 Screen Index

FIGMA_SCREENS = [{
  slug: "login-screen",
  nodeId: "42:15",
  name: "Login Screen",
  page: "Authentication",
  dimensions: "375×812",
  hasScreenshot: true,
  hasDesignContext: true
}]

4.4 Extraction Summary

Output a summary after extraction so the calling command (or the user) can quickly assess what data is available without parsing the full token map. This is especially important when extraction is partial — the consumer needs to know which data sources succeeded and which gaps remain.

Include these fields:

Figma Extraction Summary
Source: [URL or "no URL — variables only"]
Screens: [N] discovered, [N] with screenshots
Tokens: [N] from Variables, [N] from Context, [N] total unique
Components: [N] discovered
Warnings: [list if any]

Workflows

Full Extraction (design-setup)

The default workflow when design-setup provides a Figma URL:

CHECK:    whoami → verify connection
PARSE:    URL → fileKey + nodeId
DISCOVER: get_metadata → SCREENS[]
EXTRACT:  get_variable_defs → tokens (primary)
          get_design_context on the most visually complex screens → tokens (fallback) + components
            Pick screens with the most child nodes in metadata — they tend to have
            richer style diversity (forms, dashboards > splash screens, empty states).
            Start with 2-3 screens; add more if token yield is sparse.
          get_screenshot for each screen → visual references (caller saves to disk)
ORGANIZE: Merge token map, build component list, build screen index, output summary

Token-Only (validation/comparison)

When you just need to compare Figma tokens against file-based tokens:

CHECK:    whoami → verify connection
PARSE:    URL → fileKey + nodeId
EXTRACT:  get_variable_defs → tokens
          If sparse (<5 tokens): get_design_context on 1-2 complex screens → more tokens
ORGANIZE: Token map with sources for conflict resolution

Screen Catalog (ux/ui commands)

When you need screen structure and visuals, not tokens:

CHECK:    whoami → verify connection
PARSE:    URL → fileKey + nodeId
DISCOVER: get_metadata → SCREENS[]
EXTRACT:  get_screenshot for each screen (caller saves to disk)
ORGANIZE: Screen index with screenshots

Example: Full Extraction

Given URL: https://figma.com/design/kL9xQn2VwM8pYrTb4ZcHjF/MyApp?node-id=0-1

Step 0: whoami() → ✓ connected as "design-team@example.com"

Step 1: Parse URL
  fileKey: kL9xQn2VwM8pYrTb4ZcHjF
  nodeId: 0:1

Step 2: get_metadata(fileKey, nodeId: "0:1")
  → Page "Auth" has frames: Login (42:15, 375×812), Register (42:30, 375×812)
  → Page "Main" has frames: Dashboard (50:1, 1440×900), Settings (50:20, 1440×900)
  SCREENS = [
    { nodeId: "42:15", slug: "login", page: "Auth" },
    { nodeId: "42:30", slug: "register", page: "Auth" },
    { nodeId: "50:1",  slug: "dashboard", page: "Main" },
    { nodeId: "50:20", slug: "settings", page: "Main" }
  ]

Step 3a: get_variable_defs(fileKey)
  → 12 variables found: color/primary/500=#3B82F6, color/neutral/100=#F5F5F5,
    spacing/sm=8, spacing/md=16, spacing/lg=24, radius/md=8, ...
  → All tagged source: "figma-variables"

Step 3b: get_design_context(fileKey, nodeId: "50:1")  ← Dashboard has most children
  → Found additional: font-family=Inter, heading-size=24px, body-size=14px,
    shadow-card=0 2px 4px rgba(0,0,0,0.1)
  → Components: Button/Primary (3 variants), Card, Input, Avatar
  → All tagged source: "figma-context"

Step 3c: get_screenshot for each of 4 screens
  → 4/4 captured, returned to caller for saving

Step 4: Merge → 12 variable tokens + 4 context tokens = 16 total unique
  Components: 4 discovered (Button: high, Card: medium, Input: medium, Avatar: low)
  Summary: 4 screens, 16 tokens, 4 components, 4 screenshots, 0 warnings

Error Handling

Figma extraction is enrichment, not requirement. The pipeline continues without Figma data — it just has less information for conflict resolution.

ErrorResponse
whoami fails (Step 0)MCP not connected → warn user, skip all Figma steps
Invalid URL formatWarn with supported formats → skip
FigJam/Slides URLWarn "not supported for token extraction" → skip
Empty variablesNormal — fall back to design context (3.2)
Truncated responseNarrow scope → fetch children individually
Screenshot timeoutLog warning → try smaller child frames → continue
Permission deniedWarn "check Figma file sharing settings" → skip
All extractions failWarn → continue pipeline without Figma data

Quick Reference

StepToolPurpose
CHECKwhoamiVerify MCP connection
DISCOVERget_metadataFile structure, pages, frames, node IDs
EXTRACT tokensget_variable_defsDesign Variables (primary token source)
EXTRACT contextget_design_contextApplied styles, layout, components (fallback)
EXTRACT visualsget_screenshotVisual reference for each screen
Source TagMeaningPriority
figma-variablesExplicitly defined Figma VariableHigher
figma-contextInferred from applied styles on framesLower

平台分布

Codex

33.21%
按下载量换算34

Claude

32.65%
按下载量换算34

Cursor

17.16%
按下载量换算18

Gemini CLI

9.88%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

调用外部服务

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills