ingest-figma

Figma Ingest — Extract design tokens and frame structure from a Figma URL using the Figma REST API. Requires setting the FIGMA_TOKEN environment variable.

Last repository push
GitHub Stars
112
Forks
11
Issues / PRs
1

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 "ingest-figma" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-0c72745a1a622c15f049b448ac8043a84460baa3c80f0c688417b59a2651cdd8. Verify the upstream source and version against https://github.com/bluzir/claude-code-design before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

github.com

Setup guidance pending

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

Installation test pending

Figma Ingest — Extract design tokens and frame structure from a Figma URL using the Figma REST API. Requires setting the FIGMA_TOKEN environment variable.

0 Downloads

Introduction source: third_party · bluzir · 0.0.1 Reference

SkillPi interpretation

Tasks
Pull design tokens + frame structure from a Figma URL via the Figma REST API. Requires FIGMA_TOKEN env var.
Audience
Not specified in the source documentation.
Inputs and outputs
Not specified in the source documentation.
Software, accounts and paid services
Not specified in the 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: ingest-figma
description: Pull design tokens + frame structure from a Figma URL via the Figma REST API. Requires FIGMA_TOKEN env var.
argument-hint: <figma-url>
allowed-tools: Read Write Bash(curl:*) Bash(mkdir:*) Bash(realpath:*)

Ingest Figma

Extract design system from a Figma file using the REST API. Falls back to SVG-import if no token available.

Preflight

  1. Bash(test -n "$FIGMA_TOKEN" && echo has-token || echo no-token) — check env var
  2. If no-token:
    • Tell user: "No FIGMA_TOKEN found. Two options: (a) Get a token at https://www.figma.com/developers/api#access-tokens and export FIGMA_TOKEN=... in your shell, or (b) export the frame as SVG in Figma (Right-click frame → Copy as → Copy as SVG) and paste the file to artifacts/ingested/ — I'll parse the SVG."
    • Stop; wait for user response.

Parse URL

Figma URL format: https://www.figma.com/(file|design|proto)/<fileKey>/<name>?node-id=<nodeId>

Extract:

  • fileKey — alphanumeric after /file/ or /design/
  • nodeId — query param node-id (URL-decoded, often contains :)

Steps (token path)

  1. Fetch file nodes:

    Bash(curl -H "X-FIGMA-TOKEN: $FIGMA_TOKEN" \
      "https://api.figma.com/v1/files/<fileKey>/nodes?ids=<nodeId>&depth=2" \
      -o /tmp/figma-<ts>.json)
  2. Fetch style definitions:

    Bash(curl -H "X-FIGMA-TOKEN: $FIGMA_TOKEN" \
      "https://api.figma.com/v1/files/<fileKey>/styles" \
      -o /tmp/figma-styles-<ts>.json)
  3. Parse JSON:

    • Colors: walk document.children → find fills with type === 'SOLID' → extract color {r,g,b} → convert to hex
    • Effects (shadows): find effects with type === 'DROP_SHADOW'
    • Text styles: find style with fontFamily, fontSize, fontWeight, lineHeightPx
    • Components: traverse for type === 'COMPONENT' and type === 'COMPONENT_SET'
    • Local styles from /styles: styles endpoint returns named variables
  4. Write:

    artifacts/ingested/figma-<fileKey>-tokens.json

    Same schema as ingest-github, plus "source": { "figma_url": "...", "file_key": "...", "node_id": "..." }.

  5. Offer next step:

    • "Extracted X colors, Y text styles, Z components from Figma. Saved to artifacts/ingested/figma-<fileKey>-tokens.json."
    • Continue with /create-design-system or start artifact skill.

Steps (SVG fallback path)

  1. User drops SVG file in artifacts/ingested/
  2. Read the SVG content
  3. Extract fill="#..." / stroke="#..." / style="...color..." attributes
  4. Recognize <text> elements for font info (font-family, font-size, font-weight)
  5. Build partial tokens.json with "source": { "svg": "<path>" } + confidence flags
  6. Note: SVG export loses component structure, only visual primitives

Rate limits

Figma API: 50 req/min for free tier. Fetching one frame + styles = 2 requests, well under limit.

Security

FIGMA_TOKEN in env only — never written to disk or logged.

Current listing version

0.0.1

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value78/100

Areas to improve

  • 缺少 When to Use 显式章节 Reported severity: Minor

    文档未设置显式的 When to Use 章节,虽功能描述清晰但建议补充使用场景说明

    Recommendation: 在 Preflight 前增加 When to Use 章节,说明适用场景如:设计系统构建、前端开发对接、设计资产自动化提取等

Highlights

  • 解决设计师与开发者从 Figma 提取设计令牌的明确痛点
  • 支持 Token 和 SVG 双路径,提升容错能力
  • 输出结构化 tokens.json,便于后续流程集成
Trigger Precision92/100

Highlights

  • argument-hint 明确指定 <figma-url> 参数
  • allowed-tools 精确限定所需工具集
  • description 清晰说明功能边界与前置条件
Structure and Standards95/100

Highlights

  • Phase 划分清晰:Preflight、Parse URL、Steps、Rate limits、Security
  • 包含端到端执行示例与错误处理路径
  • frontmatter 完整,单文件结构良好
Execution Reliability88/100

Areas to improve

  • SVG fallback 路径缺少文件检测机制说明 Reported severity: Minor

    SVG fallback 路径仅说明用户需放入文件,但未说明如何检测文件已就绪

    Recommendation: 建议增加文件存在性检查(如 Bash(test -f ...))或轮询机制,避免流程卡住

Highlights

  • 工具来源明确(curl、Bash、Read、Write)
  • 覆盖主要异常场景(无 Token 时引导用户)
  • 安全处理敏感信息(FIGMA_TOKEN 仅通过 env 传递)
Evidence Verifiability (mean of the first four)88/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.

  • api.figma.com
  • 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.

Not specified in the source documentation.

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