360 Secure SkillHub
360 安全技能中心

Figma

该 Skill 通过 Python 脚本调用 Figma REST API:读取 Figma 文件结构(页面、框架、图层),按图层/组件 ID 导出 PNG/JPG/SVG/PDF 图片,并列出文件评论。使用前需配置 FIGMA_TOKEN 环境变量,命令以 file_key、ids、format、scale 等参数执行。

kai-tw
kai-tw
热度 85.80
最近更新 2026-05-11 16:52:13
分类:自动化依赖:代码执行 / 第三方 API / 读写文件应用场景:API 集成 / 文件转换 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add kai-tw-figma
Metadata
name
figma
description
Interact with the Figma REST API to read files, export layers/components as images, and retrieve comments. Use when the user needs information from Figma designs or wants to export assets for development. Triggers include "read figma file", "export figma layer", or "check figma comments".
metadata
{"openclaw":{"emoji":"📐","requires":{"env":["FIGMA_TOKEN"]}}}

Figma Skill

This skill allows the agent to interact with Figma files via the REST API.

Setup

Requires a Figma Personal Access Token (PAT). Environment Variable: FIGMA_TOKEN

Procedures

1. Read File Structure

To understand the contents of a Figma file (pages, frames, layers): python scripts/figma_tool.py get-file <file_key>

2. Export Images

To export specific layers/components as images: python scripts/figma_tool.py export <file_key> --ids <id1>,<id2> --format <png|jpg|svg|pdf> --scale <1|2|3|4>

3. Check Comments

To list recent comments on a file: python scripts/figma_tool.py get-comments <file_key>

References