首页龙虾技能列表 › Figma Bridge — Figma设计信息提取

Figma Bridge — Figma设计信息提取

v1.0.2

从Figma文件提取设计信息,包括设计令牌、组件结构、颜色、字体、间距等,并支持导出资源。当用户询问Figma设计相关问题、需要提取设计令牌或想将Figma设计转换为代码时使用。

0· 186·0 当前·0 累计
by @vanthienha199 (Ha Le)·MIT-0
下载技能包
License
MIT-0
最后更新
2026/3/28
安全扫描
VirusTotal
无害
查看报告
OpenClaw
安全
medium confidence
该技能的请求和运行时指令与Figma只读提取工具一致,但来源不明,您应该对个人访问令牌采取标准预防措施。
评估建议
该技能似乎可以完成其所述功能:使用您的 FIGMA_TOKEN 读取Figma文件并可在本地导出资源。在安装或启用之前,考虑以下事项:(1) 创建具有最小权限的专用Figma个人访问令牌(避免使用广泛的组织/管理员令牌);(2) 将 FIGMA_TOKEN 视为敏感信息——不要将其粘贴到聊天、日志或共享场所;当不再需要时撤销/轮换令牌;(3) 确认导出仅写入安全的本地目录(该技能使用 ./figma-exports/),并且代理不会将这些文件上传到外部端点;(4) 由于该技能的来源/主页未知,除了 SKILL.md 之外您无法审计其他行为——如果您需要更强的保证,请向发布者请求源代码或在隔离环境中运行代理;(5) 如果您担心自主代理操作,请限制或审查此技能的自主调用。这些步骤可以降低风险,但并不能完全消除风险。...
详细分析 ▾
用途与能力
Name/description ask to extract design info from Figma and the instructions only request a Figma Personal Access Token and use the official Figma REST endpoints — this is proportional and expected.
指令范围
SKILL.md exclusively describes calling Figma read endpoints via curl, parsing file keys/node ids, and exporting assets to a local ./figma-exports/ folder. These actions are within scope, but exporting writes files to disk and the agent will perform network calls using a sensitive token — verify the agent does not read unrelated local files or transmit exports to other endpoints.
安装机制
Instruction-only skill with no install spec or code files — lowest install risk (nothing is written or executed during install).
凭证需求
Only FIGMA_TOKEN is required which matches the stated purpose. However, the token is sensitive and may carry broader scopes than 'read-only' depending on how it was generated; the skill itself claims it will not store tokens to disk but cannot enforce token scopes.
持久化与权限
Skill is not always-enabled and does not request modification of agent/system settings. It does not declare persistent installation or elevated privileges.
安全有层次,运行前请审查代码。

License

MIT-0

可自由使用、修改和再分发,无需署名。

运行时依赖

无特殊依赖

版本

latestv1.0.22026/3/27

在技能元数据中添加了显式环境变量声明(FIGMA_TOKEN)及其描述。无功能变更;文档现在正式指定了所需的环境变量。

● 无害

安装命令 点击复制

官方npx clawhub@latest install figma-bridge
镜像加速npx clawhub@latest install figma-bridge --registry https://cn.clawhub-mirror.com

技能文档

您可以从Figma提取设计信息并使其可用于开发。

设置

此技能需要通过环境变量提供Figma个人访问令牌。

  • 访问 figma.com → Settings → Personal Access Tokens → 生成
  • 设置环境变量:export FIGMA_TOKEN="figd_..."

凭证处理

  • 令牌在运行时从 FIGMA_TOKEN 环境变量读取
  • 此技能不会将令牌存储到磁盘
  • 此技能是只读的——永远不会修改您的Figma文件
  • 如果令牌缺失,提示用户设置环境变量

Figma API

所有调用都使用 Figma REST API:

curl -s "https://api.figma.com/v1/[endpoint]" \
 -H "X-Figma-Token: [TOKEN]"

获取文件结构

curl -s "https://api.figma.com/v1/files/[FILE_KEY]" \
 -H "X-Figma-Token: [TOKEN]"

获取特定节点

curl -s "https://api.figma.com/v1/files/[FILE_KEY]/nodes?ids=[NODE_ID]" \
 -H "X-Figma-Token: [TOKEN]"

导出资源

curl -s "https://api.figma.com/v1/images/[FILE_KEY]?ids=[NODE_IDS]&format=png&scale=2" \
 -H "X-Figma-Token: [TOKEN]"

命令

"从 [figma URL] 获取设计令牌"

从URL中提取文件密钥,获取样式,并输出:

:root {
  / Colors /
  --color-primary: #ff6b2b;
  --color-secondary: #22d3ee;
  --color-background: #0b1120;
  --color-text: #e2e8f0;

/ Typography / --font-heading: 'Inter', sans-serif; --font-body: 'IBM Plex Mono', monospace; --font-size-h1: 2.5rem; --font-size-body: 1rem;

/ Spacing / --space-xs: 4px; --space-sm: 8px; --space-md: 16px; --space-lg: 24px; --space-xl: 48px;

/ Border Radius / --radius-sm: 4px; --radius-md: 8px; --radius-lg: 16px; }

"显示 [figma URL] 中的组件"

列出所有组件及其属性:

## Components

Button

  • Variants: primary, secondary, ghost
  • Sizes: sm, md, lg
  • States: default, hover, disabled
  • Properties: label (text), icon (instance), loading (boolean)

Card

  • Variants: default, elevated
  • Properties: title (text), description (text), image (instance)

"从 [figma URL] 导出资源"

将选定的帧/组件导出为 PNG/SVG:

Exported 5 assets to ./figma-exports/:
logo.svg (2.4 KB)
hero-image.png (145 KB)
icon-arrow.svg (0.8 KB)
icon-check.svg (0.6 KB)
avatar-placeholder.png (12 KB)

"从 [URL] 的 Figma 到 Tailwind"

将Figma样式转换为 tailwind.config.js:

module.exports = {
  theme: {
    extend: {
      colors: {
        primary: '#ff6b2b',
        secondary: '#22d3ee',
        background: '#0b1120',
      },
      fontFamily: {
        heading: ['Inter', 'sans-serif'],
        mono: ['IBM Plex Mono', 'monospace'],
      },
    },
  },
};

URL 解析

Figma URL 遵循以下模式:https://www.figma.com/design/[FILE_KEY]/[FILE_NAME]?node-id=[NODE_ID]

从用户提供的任何Figma URL中提取 FILE_KEY 和可选的 NODE_ID

规则

  • 永远不要修改Figma文件——仅执行只读操作
  • 令牌来自环境变量 FIGMA_TOKEN,永不存储到磁盘
  • 如果令牌无效或过期,引导用户生成新令牌
  • 以CSS自定义属性和JSON格式同时呈现设计令牌
  • 导出时,默认使用2倍缩放以支持视网膜显示器
  • 解析Figma的颜色格式(RGBA 0-1)为十六进制:乘以255并转换
数据来源:ClawHub ↗ · 中文优化:龙虾技能库
OpenClaw 技能定制 / 插件定制 / 私有工作流定制

免费技能或插件可能存在安全风险,如需更匹配、更安全的方案,建议联系付费定制

了解定制服务