Agent skill

Figma Performance Tuning

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

Optimize Figma REST API performance with caching, partial fetches, and connection reuse.

MITAuto-check passedBackend & APIs

Install Figma Performance Tuning

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

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

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace figma-performance-tuning --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-performance-tuning .claude/skills/figma-performance-tuning && 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-performance-tuning
GitHub stars
2.8k
Token cost
~1.7k tokens
SKILL.md length
197 words
Files
7 (incl. references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Optimize Figma REST API performance with caching, partial fetches, and connection reuse.

  • Works in 5 steps: Reduce Payload Size → Response Caching → Webhook-Driven Cache Invalidation → …
  • Experiencing slow API responses
  • SKILL.md covers Overview, Prerequisites, Instructions and Output, plus 4 more sections
  • Calls curl; reaches api.figma.com; needs FIGMA_FILE_KEY

What it does

Figma Performance Tuning is an agent skill from jeremylongshore/tons-of-skills-marketplace. Optimize Figma REST API performance with caching, partial fetches, and connection reuse. Use when experiencing slow API responses, reducing bandwidth for large files, or optimizing request throughput for Figma integrations. Trigger with phrases like "figma performance", "figma slow", "figma caching", "figma optimize", "figma large file".

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including reference files (for example `references/batch-node-fetches.md`, `references/connection-reuse.md` and `references/errors.md`). Compatibility notes: Designed for Claude Code

It sits in Backend & APIs, covering Caching and REST APIs. 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

  • Experiencing slow API responses
  • Reducing bandwidth for large files
  • Optimizing request throughput for Figma integrations
  • With phrases like figma performance

Example prompts

  • “figma performance”
  • “figma slow”
  • “figma caching”
  • “/figma-performance-tuning”

Requirements

  • Node.js
  • A credential in FIGMA_FILE_KEY
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Reduce Payload Size
  2. Response Caching
  3. Webhook-Driven Cache Invalidation
  4. Batch Node Fetches
  5. Connection Reuse

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
    • Write
    • Edit

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • curl

    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
    • github.com

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

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • FIGMA_FILE_KEY

    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 Performance Tuning loads about 1.7k tokens when it runs, and up to ~3.2k if it reads all its reference files. Until then it costs about 91 tokens; SKILL.md has 197 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~91
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.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). 197 words, ~1,682 tokens.

Download SKILL.mdSave it as .claude/skills/figma-performance-tuning/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
figma-performance-tuning
description
Optimize Figma REST API performance with caching, partial fetches, and connection reuse. Use when experiencing slow API responses, reducing bandwidth for large files, or optimizing request throughput for Figma integrations. Trigger with phrases like "figma performance", "figma slow", "figma caching", "figma optimize", "figma large file".
allowed-tools
Read, Write, Edit
compatibility
Designed for Claude Code
version
1.6.0
license
MIT
author
Jeremy Longshore <jeremy@intentsolutions.io>
tags
saas, figma

Figma Performance Tuning

Overview

Optimize Figma REST API performance. Large Figma files can return multi-megabyte JSON responses. Key strategies: fetch only what you need, cache aggressively, and batch requests.

Prerequisites

  • Working Figma API integration
  • Understanding of your access patterns (which endpoints, how often)

Instructions

Step 1: Reduce Payload Size
typescript
// BAD: fetches the entire file tree (can be 10+ MB for large files)
const file = await fetch(`https://api.figma.com/v1/files/${fileKey}`, {
  headers: { 'X-Figma-Token': token },
}).then(r => r.json());

// GOOD: use depth parameter to limit tree depth
// depth=1 returns only pages (CANVAS nodes), not their children
const fileMeta = await fetch(
  `https://api.figma.com/v1/files/${fileKey}?depth=1`,
  { headers: { 'X-Figma-Token': token } }
).then(r => r.json());

// GOOD: fetch only specific nodes you need
const nodes = await fetch(
  `https://api.figma.com/v1/files/${fileKey}/nodes?ids=${nodeIds.join(',')}`,
  { headers: { 'X-Figma-Token': token } }
).then(r => r.json());

// GOOD: use plugin_data or branch_data params only when needed
// By default, plugin data and branch data are NOT returned
Step 2: Response Caching
typescript
import { LRUCache } from 'lru-cache';

// File metadata changes rarely -- cache for 5 minutes
const fileCache = new LRUCache<string, any>({
  max: 100,
  ttl: 5 * 60 * 1000, // 5 minutes
});

async function getCachedFile(fileKey: string, token: string) {
  const cached = fileCache.get(fileKey);
  if (cached) return cached;

  const file = await fetch(
    `https://api.figma.com/v1/files/${fileKey}?depth=1`,
    { headers: { 'X-Figma-Token': token } }
  ).then(r => r.json());

  fileCache.set(fileKey, file);
  return file;
}

// Image URLs expire after 30 days -- cache them but with a shorter TTL
const imageUrlCache = new LRUCache<string, string>({
  max: 1000,
  ttl: 24 * 60 * 60 * 1000, // 1 day (well within 30-day expiry)
});

async function getCachedImageUrl(
  fileKey: string, nodeId: string, format: string, token: string
): Promise<string | null> {
  const cacheKey = `${fileKey}:${nodeId}:${format}`;
  const cached = imageUrlCache.get(cacheKey);
  if (cached) return cached;

  const data = await fetch(
    `https://api.figma.com/v1/images/${fileKey}?ids=${nodeId}&format=${format}`,
    { headers: { 'X-Figma-Token': token } }
  ).then(r => r.json());

  const url = data.images[nodeId];
  if (url) imageUrlCache.set(cacheKey, url);
  return url;
}
Step 3: Webhook-Driven Cache Invalidation
typescript
// Instead of polling, use webhooks to know when to re-fetch
// See figma-webhooks-events for full webhook setup

async function handleFileUpdate(fileKey: string) {
  // Invalidate cached data for this file
  fileCache.delete(fileKey);

  // Proactively re-fetch commonly accessed data
  const token = process.env.FIGMA_PAT!;
  await getCachedFile(fileKey, token);

  console.log(`Cache invalidated and refreshed for ${fileKey}`);
}
Step 4: Batch Node Fetches
typescript
// The /nodes endpoint accepts multiple IDs -- batch them
// Max practical batch size: ~50-100 IDs per request

async function batchFetchNodes(
  fileKey: string,
  nodeIds: string[],
  token: string,
  batchSize = 50
): Promise<Map<string, any>> {
  const results = new Map<string, any>();

  for (let i = 0; i < nodeIds.length; i += batchSize) {
    const batch = nodeIds.slice(i, i + batchSize);
    const ids = encodeURIComponent(batch.join(','));

    const data = await fetch(
      `https://api.figma.com/v1/files/${fileKey}/nodes?ids=${ids}`,
      { headers: { 'X-Figma-Token': token } }
    ).then(r => r.json());

    for (const [id, node] of Object.entries(data.nodes)) {
      results.set(id, node);
    }
  }

  return results;
}
Step 5: Connection Reuse
typescript
import { Agent } from 'undici';

// Reuse HTTP connections to api.figma.com
const figmaAgent = new Agent({
  keepAliveTimeout: 30_000,
  keepAliveMaxTimeout: 60_000,
  connections: 5,
});

// Use with Node.js 18+ built-in fetch
async function optimizedFetch(path: string, token: string) {
  return fetch(`https://api.figma.com${path}`, {
    headers: { 'X-Figma-Token': token },
    // @ts-ignore -- dispatcher is a Node.js fetch option
    dispatcher: figmaAgent,
  });
}

Output

  • Reduced API payload sizes with depth and nodes endpoints
  • Response caching with appropriate TTLs
  • Webhook-driven cache invalidation
  • Batched node fetches reducing request count
  • Connection reuse for lower latency

Error Handling

IssueCauseSolution
Stale cacheNo invalidationUse webhooks to invalidate on changes
Out of memoryCaching full file JSONUse depth=1 or nodes endpoint
Slow image exportsLarge batch, high scaleReduce scale; batch in groups of 50
Expired image URLsCached URL older than 30 daysSet image cache TTL to <24h

Examples

Measure the win from payload reduction (Step 1) on a real design-system file:

bash
for url in "files/${FIGMA_FILE_KEY}" "files/${FIGMA_FILE_KEY}?depth=1"; do
  curl -s -o /dev/null -w "%{size_download}B  %{time_total}s  ${url}\n" \
    -H "X-Figma-Token: ${FIGMA_PAT}" "https://api.figma.com/v1/${url}"
done
text
41520883B  6.180s  files/AbC123        ← full tree
38412B     0.310s  files/AbC123?depth=1 ← 1000x smaller, 20x faster

Confirm the version-keyed cache (Step 2) short-circuits repeat fetches:

text
GET file AbC123  cache MISS  (version 1234567890) → fetched, cached
GET file AbC123  cache HIT   (version unchanged) → 0 API calls
webhook FILE_UPDATE AbC123 → invalidated → next GET refetches

Batching and connection reuse details: references/batch-node-fetches.md, references/connection-reuse.md.

Resources

Next Steps

For cost optimization, see figma-cost-tuning.

© 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 6 other files (references) in skills/.curated/figma-performance-tuning of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/batch-node-fetches.md
  • references/connection-reuse.md
  • references/errors.md
  • references/reduce-payload-size.md
  • references/response-caching.md
  • references/webhook-driven-cache-invalidation.md

Open the folder on GitHubat commit cfae287

Compare with similar skills

Figma Performance Tuning 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 Performance Tuning compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Figma Performance Tuning this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.7kAutomated safety check: PassMIT
Wp Performancegambitph/Stackable3513 repos~1.5kAutomated safety check: PassGPL-3.0
Io Figmagridaco/grida2.7k—~2.2kAutomated safety check: NotesApache-2.0
Data Client Schemareactive/data-client2k—~2.3kAutomated safety check: PassApache-2.0
Springboot Patternsaffaan-m/ECC277k5 repos~2.5kAutomated safety check: PassMIT
Comfyui Gatewaysickn33/agentic-awesome-skills47k2 repos~3.8kAutomated safety check: NotesMIT

Similar skills

  • Wp Performance

    gambitph/Stackable

    A skill your agent uses when investigating or improving WordPress performance (backend-only agent): profiling and measurement (WP-CLI profile/doctor, Server-Timing, Query Monitor via REST headers)…

    351 GitHub starsUsed in 3 repos~1.5k tokens
    Backend & APIsAuto-check passed
  • Io Figma

    gridaco/grida

    Guides work on the Figma I/O package (@grida/io-figma, packages/grida-canvas-io-figma/).

    2.7k GitHub stars~2.2k tokensUpdated 2 days ago
    Backend & APIsAuto-check: notes
  • Data Client Schema

    reactive/data-client

    Model data with @data-client schemas (Entity, EntityMixin, Collection, Union, Query, Values, All, Invalidate, Lazy, Scalar) for atomic, consistent, referentially-equal async data via normalization…

    2k GitHub stars~2.3k tokensUpdated today
    Backend & APIsAuto-check passed
  • Spring Boot architecture patterns, REST API design, layered services, data access, caching, async processing, and logging.

    277k GitHub starsUsed in 5 repos~2.5k tokens
    Backend & APIsAuto-check passed
  • Comfyui Gateway

    sickn33/agentic-awesome-skills

    REST API gateway for ComfyUI servers. An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 2 repos~3.8k tokens
    Backend & APIsAuto-check: notes
  • iOS Networking

    dpearson2699/swift-ios-skills

    Build, review, or improve networking code in iOS/macOS apps using URLSession with async/await, structured concurrency, and modern Swift patterns.

    1.2k GitHub stars~4.2k tokensUpdated 2 mo 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 Performance Tuning

What does Figma Performance Tuning do?

Optimize Figma REST API performance with caching, partial fetches, and connection reuse. Figma Performance Tuning is an agent skill from jeremylongshore/tons-of-skills-marketplace. Optimize Figma REST API performance with caching, partial fetches, and connection reuse.

When should I use Figma Performance Tuning?

Figma Performance Tuning fits situations like: experiencing slow API responses; reducing bandwidth for large files; optimizing request throughput for Figma integrations; with phrases like figma performance.

How do I install Figma Performance Tuning in Claude Code?

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

How do I install Figma Performance Tuning in Codex?

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

Can I use Figma Performance Tuning 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-performance-tuning -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-performance-tuning, .gemini/skills/figma-performance-tuning, .github/skills/figma-performance-tuning and .opencode/skills/figma-performance-tuning in your project.

What does Figma Performance Tuning need to run?

Going by SKILL.md and its folder, Figma Performance Tuning needs the command-line tools its instructions call (curl) and credentials named FIGMA_FILE_KEY. Our summary lists: Node.js; A credential in FIGMA_FILE_KEY. Its frontmatter pre-approves these tools: Read, Write, Edit. Compatibility (from SKILL.md): Designed for Claude Code.

Does Figma Performance Tuning access the network?

SKILL.md names 3 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 and github.com. This is read from the text; nothing was executed.

Is Figma Performance Tuning 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 Performance Tuning use?

Figma Performance Tuning 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 Performance Tuning use?

About 1.7k tokens (SKILL.md is roughly 6.7k 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.5k tokens, read only when the agent opens those files.

What are the alternatives to Figma Performance Tuning?

Skills that share tags, products or a category with Figma Performance Tuning: Wp Performance (gambitph/Stackable, 351 stars), Io Figma (gridaco/grida, 2.7k stars), Data Client Schema (reactive/data-client, 2k stars) and Springboot Patterns (affaan-m/ECC, 277k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Figma Performance Tuning?

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.