figma-advanced-troubleshooting
Deep 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".
What this skill does
# Figma Advanced Troubleshooting
## Overview
Deep debugging techniques for complex Figma REST API issues that resist standard error handling: intermittent failures, unexpected response shapes, rate limit edge cases, and large file timeouts.
## Prerequisites
- Access to application logs
- `curl` with verbose mode for network inspection
- Figma API credentials for testing
## Instructions
### Step 1: Verbose Request Inspection
```bash
# Full HTTP request/response trace for a Figma API call
curl -v -H "X-Figma-Token: ${FIGMA_PAT}" \
"https://api.figma.com/v1/files/${FIGMA_FILE_KEY}?depth=1" 2>&1 \
| tee figma-debug-trace.txt
# Extract key diagnostic info:
# - TLS version and cipher
# - Response status and headers
# - Timing breakdown
curl -w "
DNS: %{time_namelookup}s
Connect: %{time_connect}s
TLS: %{time_appconnect}s
TTFB: %{time_starttransfer}s
Total: %{time_total}s
Size: %{size_download} bytes
Status: %{http_code}
" -s -o /dev/null \
-H "X-Figma-Token: ${FIGMA_PAT}" \
"https://api.figma.com/v1/files/${FIGMA_FILE_KEY}?depth=1"
```
### Step 2: Response Shape Validation
```typescript
// Figma API responses can be unexpectedly shaped when:
// - File is empty or newly created
// - Nodes have been deleted between requests
// - Plugin data is corrupted
function validateFileResponse(data: any): string[] {
const issues: string[] = [];
if (!data.document) issues.push('Missing document root');
if (!data.document?.children?.length) issues.push('Document has no pages');
if (typeof data.name !== 'string') issues.push('Missing file name');
if (!data.version) issues.push('Missing version field');
// Check for null nodes (deleted between list and fetch)
if (data.nodes) {
for (const [id, node] of Object.entries(data.nodes)) {
if (node === null) issues.push(`Null node: ${id} (deleted or invisible)`);
}
}
// Check images response for null renders
if (data.images) {
for (const [id, url] of Object.entries(data.images)) {
if (url === null) issues.push(`Image render failed for node: ${id}`);
}
}
return issues;
}
```
### Step 3: Rate Limit Edge Cases
```typescript
// Problem: Figma rate limits are per-user, per-minute, but the exact
// limit is not published and varies by plan tier and seat type.
// Diagnostic: measure your actual limit by counting successful requests
async function measureRateLimit(token: string): Promise<{
requestsMade: number;
firstRateLimitAt: number | null;
retryAfter: number | null;
}> {
let count = 0;
let rateLimitAt: number | null = null;
let retryAfter: number | null = null;
// Make requests until rate limited (use a read-only endpoint)
while (count < 200) {
const res = await fetch('https://api.figma.com/v1/me', {
headers: { 'X-Figma-Token': token },
});
if (res.status === 429) {
rateLimitAt = count;
retryAfter = parseInt(res.headers.get('Retry-After') || '0');
break;
}
count++;
// Small delay to avoid instant burst
await new Promise(r => setTimeout(r, 100));
}
return { requestsMade: count, firstRateLimitAt: rateLimitAt, retryAfter };
}
```
### Step 4: Large File Debugging
```typescript
// Large Figma files (1000+ components) can cause:
// - Response timeouts (>30s)
// - Memory issues (100+ MB JSON)
// - Rate limits from repeated retries
// Strategy: chunk the file by page
async function fetchLargeFileSafely(fileKey: string, token: string) {
// 1. Get file metadata with depth=1 (just pages, not children)
const meta = await fetch(
`https://api.figma.com/v1/files/${fileKey}?depth=1`,
{ headers: { 'X-Figma-Token': token } }
).then(r => r.json());
console.log(`File: ${meta.name}, Pages: ${meta.document.children.length}`);
// 2. Fetch each page's content individually
const results = [];
for (const page of meta.document.children) {
console.log(`Fetching page: ${page.name} (${page.id})`);
const pageData = await fetch(
`https://api.figma.com/v1/files/${fileKey}/nodes?ids=${page.id}`,
{ headers: { 'X-Figma-Token': token } }
).then(r => r.json());
results.push({ pageId: page.id, pageName: page.name, data: pageData });
// Respect rate limits between page fetches
await new Promise(r => setTimeout(r, 500));
}
return results;
}
```
### Step 5: Support Escalation Template
```markdown
## Figma API Support Request
**Account email:** [your-email]
**Plan tier:** [Starter/Professional/Organization/Enterprise]
**Endpoint:** [e.g., GET /v1/files/:key]
**File key:** [file key, not sensitive]
### Issue Description
[1-2 sentences describing the problem]
### Reproduction Steps
1. Call `GET https://api.figma.com/v1/files/FILE_KEY?depth=1`
2. Observe: [expected vs actual behavior]
### Diagnostic Data
- HTTP status: [status code]
- Response headers: [relevant headers, especially rate limit]
- Response time: [from curl timing]
- Frequency: [every time / intermittent / specific conditions]
### Request/Response (redacted)
```
curl -v -H "X-Figma-Token: [REDACTED]" \
"https://api.figma.com/v1/files/FILE_KEY?depth=1"
HTTP/2 [status]
x-figma-rate-limit-type: [value]
retry-after: [value]
```
### Environment
- Node.js: [version]
- OS: [os]
- Region: [your server region]
- Behind proxy: [yes/no]
```
## Output
- Verbose request/response traces captured
- Response shape issues identified
- Rate limit behavior measured
- Large file handled with page-level chunking
- Support ticket prepared with diagnostic data
## Error Handling
| Issue | Diagnostic | Solution |
|-------|-----------|----------|
| Intermittent 500s | Track frequency and timing | Log every request; report pattern to Figma |
| Slow responses | curl timing breakdown | Check if DNS/TLS is the bottleneck |
| Null image renders | Validate node visibility | Check node opacity and visibility in Figma |
| Memory crash | Large file JSON | Use `depth=1` + per-page `/nodes` calls |
## Resources
- [Figma Developer Forum](https://forum.figma.com/)
- [Figma Support](https://help.figma.com/hc/en-us/requests/new)
- [Figma Status Page](https://status.figma.com)
## Next Steps
For load testing, see `figma-load-scale`.
Related in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.