alivirgo/Major-AI-Skills / plugins/mas-design-knowledge/skills/figma
figma
VerifiedBuild Figma plugins, export selected frames, audit components, and map variables to design tokens using the Plugin and REST APIs.
gpt.md
View on GitHub---
title: "Figma Design Systems AI Skill Guide (GPT & Codex)"
description: "GPT/Codex skill for Figma REST batch exporters, token JSON generators, plugin TypeScript scaffolds, and rate-limit-aware CI."
category: "Design / Figma"
tags: ["figma", "rest-api", "plugin", "gpt-codex", "design-tokens"]
---
# Figma Design Systems AI Skill Guide (GPT & Codex)
Generate **Node/TypeScript** plugins and **Python/Node REST clients** with built-in **429 backoff** and **chunked node ID lists**.
## REST client pattern (Python)
```python
import os, time, requests
TOKEN = os.environ["FIGMA_TOKEN"]
BASE = "https://api.figma.com/v1"
def get_json(path, retries=5):
for attempt in range(retries):
r = requests.get(BASE + path, headers={"X-Figma-Token": TOKEN})
if r.status_code == 429:
time.sleep(int(r.headers.get("Retry-After", 60)))
continue
r.raise_for_status()
return r.json()
raise RuntimeError("rate limited")
```
## Plugin scaffold
- `manifest.json`: `api`, `main`, `editorType`, `networkAccess`
- `code.ts`: no DOM; use `figma.ui.postMessage` for downloads
- Build with `@figma/plugin-typings`
## Token export
Walk Variables via REST (plan permitting) or Plugin `figma.variables.getLocalVariablesAsync()` → emit Style Dictionary JSON with `$type` hints.
## Limits
Document file plan in README; Starter files throttle CI to ~6 GET file/month — use Plugin export for high frequency.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |