figma-upgrade-migration
Handle Figma REST API scope changes, deprecations, and migration tasks. Use when migrating from deprecated scopes, updating webhook versions, or adapting to Figma API changelog changes. Trigger with phrases like "upgrade figma", "figma deprecation", "figma scope migration", "figma API changes", "figma v2 webhooks".
What this skill does
# Figma Upgrade & Migration
## Overview
Handle Figma REST API deprecations and breaking changes. The most significant recent change is the deprecation of the `files:read` scope in favor of granular scopes, and the move from Webhooks V1 to V2.
## Prerequisites
- Current Figma integration working
- Git for version control
- Access to Figma developer settings
## Instructions
### Step 1: Scope Migration (files:read Deprecation)
The `files:read` scope is deprecated. Migrate to granular scopes:
| Deprecated Scope | Replacement Scopes | Endpoints Covered |
|-----------------|-------------------|-------------------|
| `files:read` | `file_content:read` | `GET /v1/files/:key`, `GET /v1/images/:key` |
| `files:read` | `file_comments:read` | `GET /v1/files/:key/comments` |
| `files:read` | `file_dev_resources:read` | `GET /v1/files/:key/dev_resources` |
| `files:read` | `file_versions:read` | `GET /v1/files/:key/versions` |
**Migration steps:**
1. Audit which endpoints your code calls
2. Map each endpoint to its required scope
3. Generate a new PAT with granular scopes
4. Update OAuth apps with new scope list
5. Test all endpoints with the new token
6. Revoke old tokens
```bash
# Find all Figma API calls in your codebase
grep -rn "api.figma.com" --include="*.ts" --include="*.js" src/ \
| grep -oP '/v\d/[a-z_/]+' | sort -u
# Example output:
# /v1/files
# /v1/files/comments
# /v1/images
# /v2/webhooks
```
### Step 2: Webhooks V1 to V2 Migration
```typescript
// V1 (deprecated): POST /v1/webhooks
// V2 (current): POST /v2/webhooks
// V2 adds context support: attach webhooks to teams, files, or projects
interface WebhookV2Config {
event_type: 'FILE_UPDATE' | 'FILE_DELETE' | 'FILE_VERSION_UPDATE'
| 'FILE_COMMENT' | 'LIBRARY_PUBLISH';
// Context: where to listen
team_id?: string; // team-level (all files in team)
// OR specify project/file context in the endpoint path
endpoint: string; // Your HTTPS webhook URL
passcode: string; // Secret for verification
description?: string;
}
// Create a V2 webhook
async function createWebhook(config: WebhookV2Config) {
const res = await fetch('https://api.figma.com/v2/webhooks', {
method: 'POST',
headers: {
'X-Figma-Token': process.env.FIGMA_PAT!,
'Content-Type': 'application/json',
},
body: JSON.stringify(config),
});
if (!res.ok) throw new Error(`Webhook creation failed: ${res.status}`);
return res.json();
}
// List existing webhooks
async function listWebhooks(teamId: string) {
const res = await fetch(
`https://api.figma.com/v2/webhooks?team_id=${teamId}`,
{ headers: { 'X-Figma-Token': process.env.FIGMA_PAT! } }
);
return res.json();
}
```
### Step 3: OAuth App Publishing Flow
All OAuth apps (public and private) must complete the new publishing flow:
1. Go to your app in the Figma developer dashboard
2. Complete the required app information fields
3. Add required redirect URLs
4. Submit for review (public apps) or activate (private apps)
5. Update your code to handle the new token format
```typescript
// Check if your OAuth tokens need refresh
async function checkTokenHealth(accessToken: string): Promise<boolean> {
const res = await fetch('https://api.figma.com/v1/me', {
headers: { 'X-Figma-Token': accessToken },
});
if (res.status === 403) {
console.warn('Token expired or revoked -- refresh needed');
return false;
}
return res.ok;
}
```
### Step 4: Audit and Update Codebase
```typescript
// Create a migration checker
function auditFigmaIntegration(codebasePaths: string[]) {
const issues: string[] = [];
// Check for deprecated scope usage
// Check for V1 webhook endpoints
// Check for old token format
const patterns = [
{ pattern: 'files:read', message: 'Deprecated scope: use file_content:read' },
{ pattern: '/v1/webhooks', message: 'V1 webhooks: migrate to /v2/webhooks' },
{ pattern: 'X-FIGMA-TOKEN', message: 'Header is case-sensitive: use X-Figma-Token' },
];
return { issues, patterns };
}
```
## Output
- Scopes migrated from `files:read` to granular alternatives
- Webhooks upgraded from V1 to V2
- OAuth app publishing flow completed
- All endpoints tested with new tokens
## Error Handling
| Issue | Cause | Solution |
|-------|-------|----------|
| 403 after scope change | Missing required scope | Add the specific scope for each endpoint |
| Webhook not firing | V1 webhook still active | Delete V1, create V2 webhook |
| OAuth flow broken | Publishing flow not completed | Complete app publishing in dashboard |
| Token format mismatch | Old token type | Generate new PAT with `figd_` prefix |
## Resources
- [Figma REST API Changelog](https://developers.figma.com/docs/rest-api/changelog/)
- [Figma API Scopes](https://developers.figma.com/docs/rest-api/scopes/)
- [Webhooks V2 Documentation](https://developers.figma.com/docs/rest-api/webhooks/)
## Next Steps
For CI integration during upgrades, see `figma-ci-integration`.
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.