Agent skill

Figma Known Pitfalls

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

Avoid the most common Figma API integration mistakes and anti-patterns.

MITAuto-check passedBackend & APIs

Install Figma Known Pitfalls

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill figma-known-pitfalls -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace figma-known-pitfalls --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/figma-known-pitfalls .claude/skills/figma-known-pitfalls && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
figma-known-pitfalls
GitHub stars
2.8k
Token cost
~2.3k tokens
SKILL.md length
531 words
Files
10 (incl. references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Avoid the most common Figma API integration mistakes and anti-patterns.

  • Reviewing Figma code
  • SKILL.md covers Overview, Prerequisites, Instructions and Output, plus 4 more sections
  • Reaches api.figma.com
  • Onboarding new developers

What it does

Figma Known Pitfalls is an agent skill from jeremylongshore/tons-of-skills-marketplace. Avoid the most common Figma API integration mistakes and anti-patterns. Use when reviewing Figma code, onboarding new developers, or auditing an existing Figma integration. Trigger with phrases like "figma mistakes", "figma anti-patterns", "figma pitfalls", "figma code review", "figma what not to do".

Its SKILL.md is about 2.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 10 other files, including reference files (for example `references/pitfall-1-fetching-full-file-trees.md`, `references/pitfall-10-webhook-without-passcode-verification.md` and `references/pitfall-2-ignoring-rate-limit-headers.md`). Compatibility notes: Designed for Claude Code

It sits in Backend & APIs, covering Third-party API integration, Webhooks and Rate limiting. It works with Figma. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Reviewing Figma code
  • Onboarding new developers
  • Auditing an existing Figma integration
  • With phrases like figma mistakes

Example prompts

  • “figma mistakes”
  • “figma anti-patterns”
  • “figma pitfalls”
  • “/figma-known-pitfalls”

Requirements

  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Grep

What it can do on your machine

Read from SKILL.md and the folder at commit cfae287. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Grep

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript and bash).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • api.figma.com

    Also links to:

    • developers.figma.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Figma Known Pitfalls loads about 2.3k tokens when it runs, and up to ~4.2k if it reads all its reference files. Until then it costs about 81 tokens; SKILL.md has 531 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~81
When it runs · the whole SKILL.md, loaded when a task matches
~2.3k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~4.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit cfae287, republished under its MIT licence (© jeremylongshore). 531 words, ~2,297 tokens.

Download SKILL.mdSave it as .claude/skills/figma-known-pitfalls/SKILL.md (or your agent's skills folder). This skill also uses 9 other files; get the full folder from GitHub.
name
figma-known-pitfalls
description
Avoid the most common Figma API integration mistakes and anti-patterns. Use when reviewing Figma code, onboarding new developers, or auditing an existing Figma integration. Trigger with phrases like "figma mistakes", "figma anti-patterns", "figma pitfalls", "figma code review", "figma what not to do".
allowed-tools
Read, Grep
compatibility
Designed for Claude Code
version
1.6.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, figma

Figma Known Pitfalls

Overview

The ten most common mistakes when integrating with the Figma REST API and Plugin API, with correct alternatives for each.

Prerequisites

  • Working Figma integration to audit
  • Access to codebase

Instructions

Pitfall 1: Fetching Full File Trees

Problem: GET /v1/files/:key without depth returns the entire document tree. Large files can be 10-100 MB of JSON.

typescript
// BAD -- downloads entire file tree
const file = await figmaFetch(`/v1/files/${fileKey}`);

// GOOD -- only get metadata and page names
const file = await figmaFetch(`/v1/files/${fileKey}?depth=1`);

// GOOD -- fetch only the nodes you need
const nodes = await figmaFetch(`/v1/files/${fileKey}/nodes?ids=${ids}`);
Pitfall 2: Ignoring Rate Limit Headers

Problem: Blasting requests and crashing on 429 without reading Retry-After.

typescript
// BAD -- no rate limit handling
for (const id of nodeIds) {
  await figmaFetch(`/v1/files/${fileKey}/nodes?ids=${id}`); // 429!
}

// GOOD -- batch IDs and honor Retry-After
const ids = nodeIds.join(',');
const res = await fetch(`https://api.figma.com/v1/files/${fileKey}/nodes?ids=${ids}`, {
  headers: { 'X-Figma-Token': token },
});
if (res.status === 429) {
  const wait = parseInt(res.headers.get('Retry-After') || '60');
  await new Promise(r => setTimeout(r, wait * 1000));
}
Pitfall 3: Caching Image Export URLs Too Long

Problem: Figma image URLs expire after 30 days. Storing them permanently breaks.

typescript
// BAD -- storing image URLs in database permanently
await db.save({ iconUrl: imageUrl }); // Will break in 30 days

// GOOD -- re-export when needed, or cache with short TTL
const imageCache = new LRUCache({ max: 1000, ttl: 24 * 60 * 60 * 1000 }); // 24h
Pitfall 4: Hardcoded PATs

Problem: Personal access tokens committed to source code.

typescript
// BAD -- token in source code (visible forever in git history)
const token = 'figd_actual_token_value_here';

// GOOD -- environment variable
const token = process.env.FIGMA_PAT!;
if (!token) throw new Error('FIGMA_PAT not set');
Pitfall 5: Using Deprecated files:read Scope

Problem: The files:read scope is deprecated. New tokens should use granular scopes.

BAD:  files:read (deprecated, will be removed)
GOOD: file_content:read, file_comments:read, file_versions:read (specific)
Pitfall 6: Forgetting Color Format Conversion

Problem: Figma returns colors as 0-1 floats, not 0-255 integers.

typescript
// BAD -- using Figma values directly as RGB
const { r, g, b } = node.fills[0].color;
return `rgb(${r}, ${g}, ${b})`; // rgb(0.8, 0.2, 0.4) -- invalid!

// GOOD -- convert to 0-255 range
return `rgb(${Math.round(r * 255)}, ${Math.round(g * 255)}, ${Math.round(b * 255)})`;
Pitfall 7: Not Handling null Image Renders

Problem: The images endpoint returns null for nodes that cannot be rendered (invisible, deleted, empty).

typescript
// BAD -- assumes all nodes render successfully
const images = data.images;
for (const [id, url] of Object.entries(images)) {
  const img = await fetch(url); // TypeError: Cannot construct URL from null
}

// GOOD -- filter out null entries
for (const [id, url] of Object.entries(images)) {
  if (!url) {
    console.warn(`Node ${id} could not be rendered (null)`);
    continue;
  }
  const img = await fetch(url);
}
Pitfall 8: Polling Instead of Webhooks

Problem: Polling GET /v1/files/:key every 30 seconds wastes rate limit quota.

typescript
// BAD -- 2,880 API calls per file per day
setInterval(async () => {
  const file = await figmaFetch(`/v1/files/${fileKey}`);
  if (file.version !== lastVersion) await sync();
}, 30_000);

// GOOD -- webhook notifies you only when file changes
// POST /v2/webhooks with event_type: "FILE_UPDATE"
// Result: ~10-50 calls/day instead of 2,880
Pitfall 9: SVG Export with Scale Parameter

Problem: Figma ignores the scale parameter for SVG exports. SVGs always export at 1x.

typescript
// BAD -- scale has no effect on SVG
await figmaFetch(`/v1/images/${key}?ids=${id}&format=svg&scale=2`);

// GOOD -- SVG is vector; scale is meaningless. Use scale for PNG/JPG only.
await figmaFetch(`/v1/images/${key}?ids=${id}&format=svg`);      // SVG: always 1x
await figmaFetch(`/v1/images/${key}?ids=${id}&format=png&scale=2`); // PNG: 2x
Pitfall 10: Webhook Without Passcode Verification

Problem: Anyone can POST to your webhook endpoint if you don't verify the passcode.

typescript
// BAD -- trusts any incoming request
app.post('/webhooks/figma', (req, res) => {
  processEvent(req.body); // Attacker can send fake events
  res.sendStatus(200);
});

// GOOD -- verify passcode with timing-safe comparison
app.post('/webhooks/figma', (req, res) => {
  const received = req.body.passcode || '';
  const expected = process.env.FIGMA_WEBHOOK_PASSCODE!;

  if (received.length !== expected.length ||
      !crypto.timingSafeEqual(Buffer.from(received), Buffer.from(expected))) {
    return res.status(401).json({ error: 'Invalid passcode' });
  }

  res.status(200).json({ received: true });
  processEvent(req.body);
});

Output

  • A pitfall-by-pitfall review of your integration, each with detection command and fix
  • The Quick Reference table (below in this skill) mapping all 10 pitfalls to detection signals
  • Concrete code corrections: ?depth=1//nodes?ids= fetches, Retry-After handling, env-var PATs, file_content:read scope, x255 color conversion, null-render filtering, webhook subscriptions with passcode verification
Show full SKILL.md (262 more words)Show less

Error Handling

SymptomPitfallFix
Responses > 1 MB, slow syncs, memory spikes#1 full-tree fetches?depth=1 or /nodes?ids= (references/pitfall-1-fetching-full-file-trees.md)
Bursts of 429s under load#2 ignoring rate-limit headersHonor Retry-After, batch requests (references/pitfall-2-ignoring-rate-limit-headers.md)
Images break ~30 days after export#3 cached export URLsRe-export on demand or cache with short TTL
figd_... in source control#4 hardcoded PATsMove to process.env.FIGMA_PAT, rotate the leaked token immediately
Colors render wrong in generated CSS#6 color formatMultiply Figma's 0-1 floats by 255
TypeError reading image URL#7 null rendersFilter null entries from /v1/images responses
Webhook events processed from unknown senders#10 no passcode checkVerify passcode on every delivery (references/pitfall-10-webhook-without-passcode-verification.md)

Quick Reference

#PitfallDetectionFix
1Full file fetchResponse > 1MBUse depth=1 or /nodes
2No rate limit handling429 errorsRead Retry-After, batch requests
3Stale image URLsBroken images after 30 daysRe-export or short TTL cache
4Hardcoded PATgrep -r figd_ in sourceUse process.env.FIGMA_PAT
5Deprecated scopefiles:read in token configUse file_content:read
6Wrong color formatColors look wrongMultiply by 255
7Null image renderTypeError on null URLFilter null entries
8Polling loopHigh API call volumeUse Webhooks V2
9SVG with scaleScale parameter ignoredSVG is always 1x
10No webhook verificationSecurity vulnerabilityVerify passcode

Examples

Audit an existing integration for the two highest-impact pitfalls in one pass:

bash
# Pitfall 4: hardcoded PATs anywhere in the repo
/usr/bin/grep -rn "figd_" --include='*.*' . | /usr/bin/grep -v node_modules

# Pitfall 1: full-tree fetches (no depth/nodes constraint)
/usr/bin/grep -rn "api.figma.com/v1/files/" --include='*.{ts,js}' . \
  | /usr/bin/grep -v -e 'depth=' -e '/nodes'

Fix a color-conversion bug (Pitfall 6) — before/after:

typescript
// Before: {"r":0.31,"g":0.27,"b":0.9} rendered as rgb(0,0,1)
const css = `rgb(${fill.color.r}, ${fill.color.g}, ${fill.color.b})`;

// After
const to255 = (v: number) => Math.round(v * 255);
const css = `rgb(${to255(fill.color.r)}, ${to255(fill.color.g)}, ${to255(fill.color.b)})`;

Every pitfall has a dedicated deep-dive under references/ (e.g. references/pitfall-8-polling-instead-of-webhooks.md).

Resources

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 9 other files (references) in skills/.curated/figma-known-pitfalls of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/pitfall-1-fetching-full-file-trees.md
  • references/pitfall-10-webhook-without-passcode-verification.md
  • references/pitfall-2-ignoring-rate-limit-headers.md
  • references/pitfall-4-hardcoded-pats.md
  • references/pitfall-6-forgetting-color-format-conversion.md
  • references/pitfall-7-not-handling-null-image-renders.md
  • references/pitfall-8-polling-instead-of-webhooks.md
  • references/pitfall-9-svg-export-with-scale-parameter.md
  • references/quick-reference.md

Open the folder on GitHubat commit cfae287

Compare with similar skills

Figma Known Pitfalls next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Figma Known Pitfalls compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Figma Known Pitfalls this skilljeremylongshore/tons-of-skills-marketplace2.8k—~2.3kAutomated safety check: PassMIT
Bfl APIblack-forest-labs/skills1281 repos~2.5kAutomated safety check: NotesMIT
Frappe Core APIImpertio-Studio/Frappe_Claude_Skill_Package189—~3.2kAutomated safety check: PassMIT
API Integration Specialistaiskillstore/marketplace4332 repos~2.2kAutomated safety check: PassNone
API ForgeEliasOulkadi/shokunin114—~2.9kAutomated safety check: PassMIT
Shopify APIMicrock/ordinary-claude-skills404—~4.3kAutomated safety check: PassCustom licence

Similar skills

  • Bfl API

    black-forest-labs/skills

    BFL FLUX API integration guide covering endpoints, async polling patterns, rate limiting, error handling, webhooks, and regional endpoints with Python and TypeScript code examples.

    128 GitHub starsUsed in 1 repo~2.5k tokens
    Backend & APIsAuto-check: notes
  • Frappe Core API

    Impertio-Studio/Frappe_Claude_Skill_Package

    A skill your agent uses when building ERPNext/Frappe API integrations (v14/v15/v16) including REST API, RPC API, authentication, webhooks, and rate limiting.

    189 GitHub stars~3.2k tokensUpdated 24 days ago
    Backend & APIsAuto-check passed
  • API Integration Specialist

    aiskillstore/marketplace

    Expert in integrating third-party APIs with proper authentication, error handling, rate limiting, and retry logic.

    433 GitHub starsUsed in 2 repos~2.2k tokens
    Backend & APIsAuto-check passed
  • API Forge

    EliasOulkadi/shokunin

    Design REST/GraphQL APIs with OpenAPI 3.1, error handling, pagination, rate limiting, webhooks, and idempotency.

    114 GitHub stars~2.9k tokensUpdated 6 days ago
    Backend & APIsAuto-check passed
  • Shopify API

    Microck/ordinary-claude-skills

    Complete API integration guide for Shopify including GraphQL Admin API, REST Admin API, Storefront API, Ajax API, OAuth authentication, rate limiting, and webhooks.

    404 GitHub stars~4.3k tokensUpdated 1 mo ago
    Backend & APIsAuto-check passed
  • Wires an app to the Yalidine (Guepex) Algerian courier API: parcels, zone lookups, delivery fees and verified delivery-status webhooks.

    354 GitHub stars~2.5k tokensUpdated 5 days ago
    Backend & APIsAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Figma Known Pitfalls

What does Figma Known Pitfalls do?

Avoid the most common Figma API integration mistakes and anti-patterns. Figma Known Pitfalls is an agent skill from jeremylongshore/tons-of-skills-marketplace. Avoid the most common Figma API integration mistakes and anti-patterns.

When should I use Figma Known Pitfalls?

Figma Known Pitfalls fits situations like: reviewing Figma code; onboarding new developers; auditing an existing Figma integration; with phrases like figma mistakes.

How do I install Figma Known Pitfalls in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill figma-known-pitfalls -a claude-code`. Or copy the skill folder (skills/.curated/figma-known-pitfalls in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/figma-known-pitfalls in your project. Claude Code loads it when a task matches its description.

How do I install Figma Known Pitfalls in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill figma-known-pitfalls -a codex`. Or copy the skill folder (skills/.curated/figma-known-pitfalls in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/figma-known-pitfalls in your project. Codex loads it when a task matches its description.

Can I use Figma Known Pitfalls in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill figma-known-pitfalls -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/figma-known-pitfalls, .gemini/skills/figma-known-pitfalls, .github/skills/figma-known-pitfalls and .opencode/skills/figma-known-pitfalls in your project.

What does Figma Known Pitfalls need to run?

SKILL.md names no scripts, command-line tools or credentials: Figma Known Pitfalls is instructions for the agent only. Its frontmatter pre-approves these tools: Read, Grep. Compatibility (from SKILL.md): Designed for Claude Code.

Does Figma Known Pitfalls access the network?

SKILL.md names 2 domains. In commands or code: api.figma.com; the agent is likely to contact it when it follows the instructions. As links in the text: developers.figma.com. This is read from the text; nothing was executed.

Is Figma Known Pitfalls safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Figma Known Pitfalls use?

Figma Known Pitfalls is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Figma Known Pitfalls use?

About 2.3k tokens (SKILL.md is roughly 9.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.9k tokens, read only when the agent opens those files.

What are the alternatives to Figma Known Pitfalls?

Skills that share tags, products or a category with Figma Known Pitfalls: Bfl API (black-forest-labs/skills, 128 stars), Frappe Core API (Impertio-Studio/Frappe_Claude_Skill_Package, 189 stars), API Integration Specialist (aiskillstore/marketplace, 433 stars) and API Forge (EliasOulkadi/shokunin, 114 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Figma Known Pitfalls?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,827 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 10, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.