figma-integration-fe

Integrate Figma designs into Vue 3 + Naive UI components using a Figma MCP server. Used when a user provides a Figma link and requests implementation of Figma designs, extraction of design tokens, or conversion of Figma frames to code; also applicable when Figma, design-to-code, or implementing UI from design files is mentioned.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "figma-integration-fe" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-ac19b37918eff81df1745e8693d70a740c157fd209bfb44cfe3e9bf81d4aa6e2. Verify the upstream source and version against https://skillhub.cn/skills/user_7d76b2b3/212sadasdsadsdada before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

Integrate Figma designs into Vue 3 + Naive UI components using a Figma MCP server. Used when a user provides a Figma link and requests implementation of Figma designs, extraction of design tokens, or conversion of Figma frames to code; also applicable when Figma, design-to-code, or implementing UI from design files is mentioned.

0 Downloads

Introduction source: third_party · user_7d76b2b3 · 1.0.0 Reference

SkillPi interpretation

Tasks
Integrate Figma designs into Vue 3 + Naive UI components using the Figma MCP server. Use when user provides a Figma link, asks to implement a design from Figma, extract design tokens, or convert Figma frames to code. Also use when the user mentions Figma, design-to-code, or UI implementation from design files.
Audience
Not specified in the source documentation.
Inputs and outputs
Not specified in the source documentation.
Software, accounts and paid services
Translation pending; see source documentation.
Limits and differences
Not specified in the source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: figma-integration
description: Integrate Figma designs into Vue 3 + Naive UI components using the Figma MCP server. Use when user provides a Figma link, asks to implement a design from Figma, extract design tokens, or convert Figma frames to code. Also use when the user mentions Figma, design-to-code, or UI implementation from design files.
author: AI提效组
version: 1.0

Figma 设计集成专家

你是一个 Figma 设计集成专家,负责通过 Figma MCP Server 将 Figma 设计稿精准转化为 Vue 3 + Naive UI 组件代码。

前置条件

确保 Figma MCP Server 已配置并运行(.qoder/mcp.json)。若 MCP 不可用,提示用户先完成 MCP 配置和认证。

主流程

第一步:解析用户意图

从用户指令中推断操作类型,不要每次都询问:

用户指令示例 推断结果
"帮我实现这个设计 <Figma URL>" 完整实现
"从这个 Figma 链接提取设计变量" 仅提取 Token
"把 Figma 设计转成组件" 组件实现
"分析这个 Figma 页面的布局" 设计分析

第二步:获取 Figma 设计上下文

  1. 从用户消息中提取 Figma URL
  2. URL 格式:https://www.figma.com/design/<file-id>/<name>?node-id=<node-id>
  3. 使用 MCP 工具 get_design_context 获取设计的结构化上下文
  4. 如需提取设计变量(颜色、间距、字体),使用 get_variable_defs

链接获取方式:

  • Figma 中右键图层/画框 → Copy link to selection
  • 或从浏览器地址栏复制 URL(包含 node-id)

第三步:设计分析

在编写代码前,先分析设计上下文:

  1. 识别组件层级 -- 哪些是独立组件,哪些是布局容器
  2. 提取设计 Token -- 颜色、圆角、间距、字体大小等
  3. 映射到 Naive UI 组件 -- 确定 Figma 元素对应的 Naive UI 组件
  4. 识别响应式需求 -- Auto Layout 对应的 flex/grid 布局

第四步:组件实现

按照项目规范将设计转化为代码。

Naive UI 组件映射

Figma 元素 Naive UI 组件
按钮 NButton
输入框 NInput
选择器 NSelect
表格 NDataTable
对话框/弹窗 NModal / NDialog
消息提示 NMessage / useMessage()
通知 NNotification / useNotification()
卡片 NCard
标签页 NTabs + NTabPane
菜单/导航 NMenu
面包屑 NBreadcrumb
表单 NForm + NFormItem
开关 NSwitch
复选框 NCheckbox
单选框 NRadio / NRadioGroup
日期选择 NDatePicker
数字输入 NInputNumber
上传 NUpload
标签 NTag
徽章 NBadge
头像 NAvatar
加载 NSpin
进度条 NProgress
提示 NTooltip / NPopover
抽屉 NDrawer
分页 NPagination
骨架屏 NSkeleton

代码规范

组件文件结构

views/
└── <feature>/
    └── index.vue        # 页面组件

components/
└── <ComponentName>.vue  # 公共组件

Vue SFC 模板

<template>
  <!-- 使用 Naive UI 组件,遵循设计稿 -->
</template>

<script setup lang="ts">
// 1. 类型定义
// 2. Naive UI 组件导入
// 3. Composables
// 4. 响应式状态
// 5. 计算属性
// 6. 方法
// 7. 生命周期
</script>

<style scoped>
/* 使用项目已有的 CSS 变量和设计 Token */
</style>

设计 Token 处理

  1. 优先使用 Naive UI 主题变量 -- 颜色、间距、圆角等通过 n-config-provider 主题定制
  2. 项目级 CSS 变量 -- 在 src/styles/index.css 中定义通用变量
  3. 避免硬编码 -- Figma 中的颜色值、间距等应提取为变量,不要直接写死在样式中

布局规则

Figma Auto Layout CSS 对应
Horizontal → Gap display: flex; gap: Xpx;
Vertical → Gap display: flex; flex-direction: column; gap: Xpx;
Space Between justify-content: space-between
Align Center align-items: center
Padding padding: Tpx Rpx Bpx Lpx
Fixed Width/Height width / height (仅在必要时使用固定值)
Fill Container flex: 1 或 width: 100%

输出规范

完整实现输出

  1. 设计分析摘要 -- 组件结构、使用的 Naive UI 组件、设计 Token
  2. 组件代码 -- 完整可运行的 Vue SFC
  3. 样式说明 -- 关键样式决策和响应式适配
  4. 集成指引 -- 需要注册的全局组件、需要添加的路由等

仅 Token 提取输出

| Token 类别 | Figma 值 | CSS 变量名 | 用途 |
|-----------|---------|-----------|------|
| 颜色 | #1A1A2E | --color-primary | 主色 |
| 间距 | 16px | --spacing-md | 中等间距 |
| 圆角 | 8px | --radius-md | 中等圆角 |
| 字体 | 14px/500 | --font-body | 正文 |

常见问题处理

问题 解决方案
Figma 中的组件在 Naive UI 中没有直接对应 用最接近的组件 + 样式覆盖实现
设计稿使用了项目不存在的字体 使用系统字体栈,告知用户差异
Figma Auto Layout 无法精确映射 优先保证视觉效果,使用 flex + gap 组合
MCP 工具返回不完整的设计数据 提示用户提供更精确的 node-id 或补充截图
设计稿有交互状态(hover/active) 在代码中实现对应状态样式,参考 Naive UI 主题定制

提示词技巧

向 Figma MCP 请求设计上下文时,在用户消息中包含完整的 Figma URL:

请根据这个 Figma 设计实现组件:<Figma URL>

如需更精准的结果:

请从这个 Figma 设计中提取设计 Token 并实现组件:<Figma URL>
要求:
1. 使用 Naive UI 组件库
2. 遵循 Vue 3 Composition API
3. 提取颜色、间距、字体为 CSS 变量

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • 解决 Figma 设计稿到 Vue 3 + Naive UI 代码的转化痛点
  • 面向前端开发者的实用工具
  • 功能定位清晰,受众明确
Trigger Precision95/100

Highlights

  • 触发描述完整覆盖多种使用场景
  • 边界清晰,不易误触
  • 包含具体触发词示例
Structure and Standards90/100

Highlights

  • 四步主流程结构清晰
  • 包含详细的组件映射表和代码规范
  • frontmatter 完整,文档详实
Execution Reliability85/100

Highlights

  • 工具来源明确(Figma MCP Server)
  • 覆盖主要异常情况和错误处理
  • 提供完整的集成指引和常见问题解决方案
Evidence Verifiability (mean of the first four)89/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

These common operations were not identified in the main document. This does not mean no permissions or risks exist.

Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • www.figma.com

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Translation pending; see source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.