| name | figma-core-workflow-b |
| description | Export images, icons, and assets from Figma files via the REST API.
Use when building an asset pipeline, exporting icons as SVG/PNG,
or rendering frames to images for documentation or previews.
Trigger with phrases like "figma export", "figma images",
"export figma icons", "figma assets", "figma render".
|
| allowed-tools | Read, Write, Edit, Bash(npm:*), Bash(curl:*), Grep |
| version | 1.6.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","figma"] |
| compatibility | Designed for Claude Code |
Figma Core Workflow B -- Asset Export
Overview
Export images, icons, and assets from Figma files using the REST API. Render specific nodes as PNG, SVG, JPG, or PDF. Build automated asset pipelines for icons, illustrations, and component previews.
Prerequisites
- Completed
figma-install-auth setup
- Node IDs of the frames/components to export (from
figma-hello-world)
FIGMA_PAT and FIGMA_FILE_KEY env vars set
Instructions
Step 1: Render Nodes as Images
const PAT = process.env.FIGMA_PAT!;
const FILE_KEY = process.env.FIGMA_FILE_KEY!;
async function exportImages(
nodeIds: string[],
format: 'png' | 'svg' | 'jpg' | 'pdf' = 'png',
scale = 2
): Promise<Record<string, string | null>> {
const params = new URLSearchParams({
ids: nodeIds.join(','),
format,
scale: String(format === ? : scale),
});
res = (
,
{ : { : } }
);
(!res.) ();
data = res.();
data.;
}