figma-sdk-patterns

Featured

Production-ready patterns for the Figma REST API and Plugin API. Use when building reusable Figma client wrappers, extracting design tokens, traversing node trees, or creating typed API helpers. Trigger with phrases like "figma patterns", "figma best practices", "figma client wrapper", "figma typed API".

AI & Automation 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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 - `FIGMA_PAT` environment variable set - TypeScript 5+ project - Understanding of Figma node types ## Instructions ### Step 1: Typed REST API Client ```typescript // src/figma-client.ts export class FigmaClient { private baseUrl = 'https://api.figma.com'; constructor(private token: string) { if (!token) throw new Error('Figma token is required'); } private async request<T>(path: string, init?: RequestInit): Promise<T> { const res = await fetch(`${this.baseUrl}${path}`, { ...init, headers: { 'X-Figma-Token': this.token, 'Content-Type': 'application/json', ...init?.headers, }, }); if (res.status === 429) { const retryAfter = parseInt(res.headers.get('Retry-After') || '60'); throw new FigmaRateLimitError(retryAfter); } if (res.status === 403) throw new FigmaAuthError('Invalid or expired token'); if (res.status === 404) throw new FigmaNotFoundError(path); if (!res.ok) throw new FigmaApiError(res.status, await res.text()); return res.json(); } async getFile(fileKey: string) { return this.request<FigmaFileResponse>(`/v1/files/${fileKey}`); } async get...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

framer-sdk-patterns

Apply production-ready Framer SDK patterns for TypeScript and Python. Use when implementing Framer integrations, refactoring SDK usage, or establishing team coding standards for Framer. Trigger with phrases like "framer SDK patterns", "framer best practices", "framer code patterns", "idiomatic framer".

2,266 Updated today
jeremylongshore
AI & Automation Featured

fireflies-sdk-patterns

Apply production-ready Fireflies.ai GraphQL client patterns for TypeScript and Python. Use when implementing Fireflies.ai integrations, building typed clients, or establishing team coding standards for the GraphQL API. Trigger with phrases like "fireflies SDK patterns", "fireflies best practices", "fireflies client", "fireflies GraphQL wrapper", "typed fireflies".

2,266 Updated today
jeremylongshore
AI & Automation Featured

figma-reference-architecture

Reference architecture for production Figma API integrations. Use when designing a new Figma integration, planning project structure, or establishing patterns for design-to-code pipelines. Trigger with phrases like "figma architecture", "figma project structure", "figma integration design", "figma best practices layout".

2,266 Updated today
jeremylongshore
AI & Automation Featured

fathom-sdk-patterns

Production-ready Fathom API client patterns in Python and TypeScript. Use when building reusable Fathom clients, implementing meeting data pipelines, or wrapping the Fathom REST API. Trigger with phrases like "fathom API patterns", "fathom client wrapper", "fathom Python client", "fathom TypeScript".

2,266 Updated today
jeremylongshore
AI & Automation Featured

appfolio-sdk-patterns

Apply production-ready patterns for AppFolio REST API integration. Trigger: "appfolio patterns".

2,266 Updated today
jeremylongshore