SuperAPI AI Directory

figma-export

Design & creation

View repository

Updated 10-15 21:39

About this skill

Figma Export

Export a PNG screenshot of the specified frame from a Figma URL.

When to Use

  • When you need to obtain a static screenshot of a Figma design
  • Before comparing the design vs the implementation

Prerequisites

  • Environment variable FIGMA_ACCESS_TOKEN must be set
  • Install requests:pip install requests

Usage

python scripts/figma-export.py "<figma_url>" --output design.png [--scale 2] [--node-id <id>]

Parameters

Parameter Required Description
figma_url Yes URL of the Figma file or frame
--output No Output filename (default figma-export.png)
--scale No Scale factor (default 2, i.e. 2x resolution)
--node-id No Specify node ID (obtained from the URL's node-id= parameter)

Figma URL Format

The following formats are supported:

  • https://www.figma.com/file/XXXXX/FileName?node-id=1-2
  • https://www.figma.com/design/XXXXX/FileName?node-id=1-2

Alternatives

If there is no Figma Token:

  1. Ask the user to manually export a screenshot from Figma
  2. Or use Playwright to open the Figma URL and take a screenshot (the user must already be logged in to Figma)