home / skills / openclaw / skills / kai-tw-figma
This skill helps you read Figma file structures, export layers as images, and fetch comments via the Figma REST API for design insights.
npx playbooks add skill openclaw/skills --skill kai-tw-figmaReview the files below or copy the command above to add this skill to your agents.
---
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
- [Figma API Documentation](https://www.figma.com/developers/api)
This skill connects to the Figma REST API to read file structure, export layers or components as images, and retrieve comments. It is designed for developers and designers who need to extract assets or inspect design metadata programmatically. A Figma Personal Access Token is required via the FIGMA_TOKEN environment variable.
The skill calls Figma API endpoints to fetch file JSON, list pages and layers, and query comments for a file key. It can request image exports for specific node IDs in PNG, JPG, SVG, or PDF formats at selectable scales. Commands run the corresponding API requests, download generated images, and present parsed structure or comment lists for further use.
What credential is required to use the skill?
A Figma Personal Access Token must be set in the FIGMA_TOKEN environment variable.
Which export formats and scales are supported?
Exports support png, jpg, svg, and pdf formats, with scales commonly 1, 2, 3, or 4 to control resolution.