Agent skill · software engineering · jeremylongshore

figma-sdk-patterns

Production-ready patterns for the Figma REST API and Plugin API.

Why this skill is useful

Adds a complete TypeScript SDK for Figma with type safety, error handling, and reusable patterns that the AI cannot generate on its own.

What it needs

Requires typescript installed locally. Requires figma account access. About 4k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.

What this skill does

Figma SDK Patterns Overview Production patterns for the Figma REST API (external tools) and Plugin API (in-editor plugins). Figma has no official Node.js SDK -- you call https://api.figma.com directly with fetch. These patterns give you type safety, error handling, and reusable abstractions. Prerequisites FIGMAPAT environment variable set TypeScript 5+ project Understanding of Figma node types Instructions Step 1: Typed REST API Client Step 2: Custom Error Classes Step 3: Type Definitions Step 4: Node Tree Walker Step 5: Singleton with Retry Output Typed Figma REST API client with full error handling Custom error hierarchy for rate limits, auth, not found Node tree walker for extracting design data Singleton pattern with retry logic Error Handling Pattern Use Case Benefit --------- ---------- --------- Typed errors catch (e) { if (e instanceof FigmaRateLimitError) } Targeted recovery Node walker Traversing arbitrarily deep trees Handles any file structure Retry wrapper Transient 429/5xx errors Automatic recovery Singleton Shared client across modules Consistent config, one token Examples Use the typed client (Step 1) with the custom error classes (Step 2) — call sites stay clean: Count every TEXT node with the tree walker (Step 4) instead of hand-rolled recursion: Full type definitions and the retry-wrapped singleton: references/type-definitions.md, references/singleton-with-retry.md. Resources Figma REST API Reference Figma REST API OpenAPI Spec figma-api npm package (community SDK) Next Steps Apply patterns in figma-core-workflow-a for real-world file inspection.

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills jeremylongshore/figma-sdk-patterns

View the source on GitHub

Browse the @skills marketplace