← 返回 Skills 市场
vanthienha199

Figma Bridge

作者 Ha Le · GitHub ↗ · v1.0.2 · MIT-0
cross-platform ✓ 安全检测通过
274
总下载
0
收藏
0
当前安装
3
版本数
在 OpenClaw 中安装
/install figma-bridge
功能描述
Extract design information from Figma files. Pull design tokens, component structure, colors, typography, spacing, and export assets. Use when the user asks...
使用说明 (SKILL.md)

Figma Bridge

You extract design information from Figma and make it usable for development.

Setup

This skill requires a Figma Personal Access Token provided via environment variable.

  1. Go to figma.com → Settings → Personal Access Tokens → Generate
  2. Set as environment variable: export FIGMA_TOKEN="figd_..."

Credential Handling

  • Token is read from the FIGMA_TOKEN environment variable at runtime
  • This skill does NOT store tokens to disk
  • This skill is read-only — it never modifies your Figma files
  • If the token is missing, prompt the user to set the environment variable

Figma API

All calls use the Figma REST API:

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

Get file structure

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

Get specific node

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

Export assets

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

Commands

"Get design tokens from [figma URL]"

Extract the file key from the URL, fetch styles, and output:

: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;
}

"Show components in [figma URL]"

List all components with their properties:

## 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)

"Export assets from [figma URL]"

Export selected frames/components as 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)

"Figma to Tailwind from [URL]"

Convert Figma styles to 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 Parsing

Figma URLs follow this pattern: https://www.figma.com/design/[FILE_KEY]/[FILE_NAME]?node-id=[NODE_ID]

Extract FILE_KEY and optionally NODE_ID from any Figma URL the user provides.

Rules

  • NEVER modify the Figma file — read-only operations only
  • Token comes from environment variable FIGMA_TOKEN, never stored to disk
  • If the token is invalid or expired, guide the user to generate a new one
  • Present design tokens in both CSS custom properties AND JSON formats
  • When exporting, default to 2x scale for retina
  • Parse Figma's color format (RGBA 0-1) to hex: multiply by 255, convert
安全使用建议
This skill appears to do what it says: it reads Figma files using your FIGMA_TOKEN and can export assets locally. Before installing or enabling it, consider the following: (1) Create a dedicated Figma Personal Access Token with the minimum permissions needed (avoid using broad org/admin tokens); (2) Treat the FIGMA_TOKEN as sensitive — do not paste it into chat, logs, or shared places; revoke/rotate the token when no longer needed; (3) Confirm exports are written only to a safe local directory (the skill uses ./figma-exports/) and that the agent will not upload those files to external endpoints; (4) Because the skill's source/homepage is unknown, you cannot audit additional behavior beyond SKILL.md — if you need stronger assurance, ask the publisher for source code or run the agent in an isolated environment; (5) If you are concerned about autonomous agent actions, restrict or review autonomous invocation for this skill. These steps reduce risk though they do not eliminate it.
功能分析
Type: OpenClaw Skill Name: figma-bridge Version: 1.0.2 The figma-bridge skill is a legitimate tool designed to extract design tokens and assets from Figma via its official REST API. It follows security best practices by using environment variables for sensitive credentials (FIGMA_TOKEN) and explicitly stating a read-only policy in SKILL.md. No evidence of data exfiltration, malicious execution, or prompt injection was found.
能力评估
Purpose & Capability
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.
Instruction Scope
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.
Install Mechanism
Instruction-only skill with no install spec or code files — lowest install risk (nothing is written or executed during install).
Credentials
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.
Persistence & Privilege
Skill is not always-enabled and does not request modification of agent/system settings. It does not declare persistent installation or elevated privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install figma-bridge
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /figma-bridge 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.2
- Added explicit environment variable declaration (`FIGMA_TOKEN`) and description in the skill metadata. - No functional changes; documentation now formally specifies required environment variables.
v1.0.1
- Credential handling changed: Figma Personal Access Token must now be provided via the FIGMA_TOKEN environment variable (was previously stored on disk). - Updated setup instructions to remove local token file; now requires users to set the environment variable. - Clarified that the skill never stores tokens and is strictly read-only. - Added guidance to prompt the user if the environment variable is missing. - Updated rules and credential handling sections for clarity and accuracy.
v1.0.0
Initial release of figma-bridge: extract and convert design information from Figma files for developers. - Extracts colors, typography, spacing, and other design tokens from Figma, outputting in both CSS and JSON formats. - Lists components, variants, properties, and states from Figma files. - Exports assets such as PNG and SVG at 2x scale for retina displays. - Converts Figma design tokens/styles to Tailwind CSS configuration. - Guides users to set up with a secure Figma personal access token. - All operations are read-only and use the Figma REST API.
元数据
Slug figma-bridge
版本 1.0.2
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 3
常见问题

Figma Bridge 是什么?

Extract design information from Figma files. Pull design tokens, component structure, colors, typography, spacing, and export assets. Use when the user asks... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 274 次。

如何安装 Figma Bridge?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install figma-bridge」即可一键安装,无需额外配置。

Figma Bridge 是免费的吗?

是的,Figma Bridge 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Figma Bridge 支持哪些平台?

Figma Bridge 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Figma Bridge?

由 Ha Le(@vanthienha199)开发并维护,当前版本 v1.0.2。

💬 留言讨论