/figma-pack:figma-common-errorsfrom figma-pack
Diagnoses and fixes common Figma REST API and Plugin API errors, including HTTP errors (403, 429, 404), plugin sandbox crashes, and unexpected API responses. Provides exact error messages and working solutions.
Ships in figma-pack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Quick reference for the most common Figma REST API and Plugin API errors, with exact error messages and working solutions.
| Status | Error | Cause | Solution |
|---|---|---|---|
| 400 | Bad Request | Malformed request, invalid node IDs | Verify node ID format (pageId:nodeId, e.g., 0:1) |
| 403 | Forbidden | Invalid token, wrong scopes, no file access | Regenerate PAT with correct scopes; verify file sharing |
| 404 | Not Found | Wrong file key, deleted file, wrong endpoint | Check file key from URL; verify file exists |
| 429 | Rate Limited | Too many requests | Read Retry-After header; implement backoff |
| 500 | Internal Server Error | Figma server issue | Retry with exponential backoff; check status.figma.com |
# Test your token
curl -s -o /dev/null -w "%{http_code}" \
-H "X-Figma-Token: ${FIGMA_PAT}" \
https://api.figma.com/v1/me
# 200 = token valid, 403 = invalid/expired
# Check what scopes your request needs
# file_content:read -> GET /v1/files/:key
# file_comments:read -> GET /v1/files/:key/comments
# file_variables:read -> GET /v1/files/:key/variables/local
# webhooks:write -> POST /v2/webhooks
Common 403 causes:
file_content:read but calling comments endpoint)// Figma returns these headers on 429:
// Retry-After: <seconds> -- wait this long before retrying
// X-Figma-Rate-Limit-Type: <type> -- "low" or "high" tier
// X-Figma-Plan-Tier: <plan> -- your plan level
async function handleRateLimit(response: Response) {
if (response.status === 429) {
const retryAfter = parseInt(response.headers.get('Retry-After') || '60');
const limitType = response.headers.get('X-Figma-Rate-Limit-Type');
console.warn(`Rate limited (${limitType}). Retrying in ${retryAfter}s`);
await new Promise(r => setTimeout(r, retryAfter * 1000));
return true; // signal to retry
}
return false;
}
# Verify your file key is correct
# URL format: https://www.figma.com/design/<FILE_KEY>/<file-name>
# The file key is the string between /design/ and the next /
# Test the file key
curl -s -H "X-Figma-Token: ${FIGMA_PAT}" \
"https://api.figma.com/v1/files/${FIGMA_FILE_KEY}" \
| jq '.name // "FILE NOT FOUND"'
null// GET /v1/images/:key returns null for nodes that cannot render
const images = await exportImages(['0:1', '0:2']);
for (const [nodeId, url] of Object.entries(images)) {
if (url === null) {
// Node failed to render. Common causes:
// - Node is invisible (visibility: false)
// - Node has 0% opacity
// - Node ID does not exist in the file
// - Node has no visual content (e.g., an empty frame)
console.error(`Failed to render node ${nodeId}`);
}
}
| Error | Context | Cause | Solution |
|---|---|---|---|
figma is not defined | Node.js / browser | Running plugin code outside Figma sandbox | Plugin code only runs inside Figma desktop app |
Cannot read property of undefined | Plugin | Accessing deleted node reference | Re-query node: figma.getNodeById(id) |
Plugin timed out | Plugin | Operation took too long | Use figma.commitUndo() and batch operations |
Quota exceeded | Plugin | Too many nodes created | Limit to ~5000 nodes per operation |
Permission denied | Plugin | Missing manifest.json permission | Add required permission to permissions array |
#!/bin/bash
echo "=== Figma API Diagnostics ==="
# 1. Check Figma service status
echo -n "Figma Status: "
curl -s -o /dev/null -w "%{http_code}" https://www.figma.com && echo " OK" || echo " DOWN"
# 2. Validate token
echo -n "Token Valid: "
curl -s -o /dev/null -w "%{http_code}" \
-H "X-Figma-Token: ${FIGMA_PAT}" \
https://api.figma.com/v1/me
# 3. Check file access
echo -n "File Access: "
curl -s -H "X-Figma-Token: ${FIGMA_PAT}" \
"https://api.figma.com/v1/files/${FIGMA_FILE_KEY}" \
| jq -r '.name // "FAILED"'
# 4. Check env vars
echo "FIGMA_PAT: ${FIGMA_PAT:+SET (${#FIGMA_PAT} chars)}"
echo "FIGMA_FILE_KEY: ${FIGMA_FILE_KEY:-NOT SET}"
When the diagnostic itself fails, work outside-in before re-consulting the catalog:
| Symptom | Cause | Solution |
|---|---|---|
Every call returns 401, even /v1/me | Token revoked, expired, or wrong header (Authorization vs X-Figma-Token) | Regenerate the PAT; PATs use X-Figma-Token, OAuth uses Authorization: Bearer |
| Diagnostic script (Step 4) hangs | No timeout on the probe requests | Add --max-time 15 to curl / AbortSignal.timeout() in fetch |
| Error not in the catalog | New API behavior or plugin-API error mistaken for REST | Check Step 3 (plugin errors) and status.figma.com before filing |
| Fix applied but error persists | Cached 4xx response or stale token in another env | Bust caches; verify which env's token the failing process actually loaded |
Full per-error diagnosis flow: references/diagnose-specific-errors.md; automated probe: references/quick-diagnostic-script.md.
function diagnoseFigmaError(status: number, body: string): string {
switch (status) {
case 403: return 'Auth failed. Check: (1) PAT not expired (2) correct scopes (3) file shared with you';
case 404: return 'Not found. Check: (1) file key from URL (2) file not deleted (3) node IDs valid';
case 429: return 'Rate limited. Implement exponential backoff with Retry-After header';
case 500: return 'Figma server error. Check status.figma.com and retry with backoff';
default: return `Unexpected ${status}: ${body}`;
}
}
For comprehensive debugging, see figma-debug-bundle.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
30 skills in this plugin
/figma-advanced-troubleshootingDeep debugging for Figma API issues: network analysis, response inspection, and support escalation.
Use when standard troubleshooting fails, diagnosing intermittent failures,
or preparing detailed evidence for Figma support.
Trigger with phrases like "figma hard bug", "figma mystery error",
"figma deep debug", "figma intermittent failure", "figma support ticket".
/figma-architecture-variantsChoose between Figma integration architectures: CLI script, webhook service, or plugin.
Use when deciding how to integrate with Figma, comparing REST API vs Plugin API,
or planning a Figma-connected application.
Trigger with phrases like "figma architecture", "figma blueprint",
"how to integrate figma", "figma plugin vs api", "figma project type".
/figma-ci-integrationAutomate Figma design token sync and asset export in CI/CD pipelines.
Use when setting up GitHub Actions for Figma, automating icon exports,
or validating design token changes in pull requests.
Trigger with phrases like "figma CI", "figma GitHub Actions",
"automate figma export", "figma CI pipeline".
/figma-core-workflow-aExtract design tokens, colors, typography, and spacing from Figma files via REST API.
Use when building a design-to-code pipeline, syncing design tokens,
or extracting styles from a Figma design system file.
Trigger with phrases like "figma design tokens", "extract figma styles",
"figma to CSS", "sync figma colors", "figma typography".
/figma-core-workflow-bExport 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".
/figma-cost-tuningOptimize Figma API usage to minimize costs and stay within plan limits.
Use when analyzing request volumes, reducing unnecessary API calls,
or choosing the right Figma plan for your integration needs.
Trigger with phrases like "figma cost", "figma pricing",
"reduce figma API calls", "figma plan limits", "figma budget".
npx claudepluginhub jeremylongshore/tons-of-skills-marketplace --plugin figma-packOther plugins' skills for the same job