figma-use
Skill này làm gì
Skill này cho phép agent thực hiện thay đổi trong file Figma thông qua Figma Plugin API. Skill dành cho nhà thiết kế và lập trình viên cần agent chỉnh sửa, sắp xếp hoặc kiểm tra nội dung Figma.
Khi nào nên dùng
- ✓Khi bạn muốn agent tạo, sửa hoặc xóa lớp, frame hoặc component trong Figma.
- ✓Khi bạn cần thiết lập biến, style hoặc phần tử design system trong một file Figma.
- ✓Khi bạn muốn agent đọc chi tiết từ một file Figma cần chạy mã.
Liên kết skill
https://github.com/openai/skills/blob/main/skills/.curated/figma-use/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Hãy tạo một frame trong file Figma của tôi và thêm ba hình chữ nhật có màu bên trong.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent viết mã plugin theo các quy tắc của skill về giá trị trả về, reset trang, tải font và màu sắc, rồi chạy mã qua kết nối Figma.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
use_figma — Figma Plugin API Skill
Use use_figma MCP to execute JavaScript in Figma files via the Plugin API. All detailed reference docs live in references/.
Always pass skillNames: "figma-use" when calling use_figma. This is a logging parameter used to track skill usage — it does not affect execution.
If the task involves building or updating a full page, screen, or multi-section layout in Figma from code, also load figma-generate-design. It provides the workflow for discovering design system components via search_design_system, importing them, and assembling screens incrementally. Both skills work together: this one for the API rules, that one for the screen-building workflow.
Before anything, load plugin-api-standalone.index.md to understand what is possible. When you are asked to write plugin API code, use this context to grep plugin-api-standalone.d.ts for relevant types, methods, and properties. This is the definitive source of truth for the API surface. It is a large typings file, so do not load it all at once, grep for relevant sections as needed.
IMPORTANT: Whenever you work with design systems, start with working-with-design-systems/wwds.md to understand the key concepts, processes, and guidelines for working with design systems in Figma. Then load the more specific references for components, variables, text styles, and effect styles as needed.
1. Critical Rules
- Use
returnto send data back. The return value is JSON-serialized automatically (objects, arrays, strings, numbers). Do NOT callfigma.closePlugin()or wrap code in an async IIFE — this is handled for you. - Write plain JavaScript with top-level
awaitandreturn. Code is automatically wrapped in an async context. Do NOT wrap in(async () => { ... })(). figma.notify()throws "not implemented" — never use it 3a.getPluginData()/setPluginData()are not supported inuse_figma— do not use them. UsegetSharedPluginData()/setSharedPluginData()instead (these ARE supported), or track node IDs by returning them and passing them to subsequent calls.console.log()is NOT returned — usereturnfor output- Work incrementally in small steps. Break large operations into multiple
use_figmacalls. Validate after each step. This is the single most important practice for avoiding bugs. - Colors are 0–1 range (not 0–255):
{r: 1, g: 0, b: 0}= red - Fills/strokes are read-only arrays — clone, modify, reassign
- Font MUST be loaded before any text operation:
await figma.loadFontAsync({family, style}) - Pages load incrementally — use
await figma.setCurrentPageAsync(page)to switch pages and load their content (see Page Rules below) setBoundVariableForPaintreturns a NEW paint — must capture and reassigncreateVariableaccepts collection object or ID string (object preferred)layoutSizingHorizontal/Vertical = 'FILL'MUST be set AFTERparent.appendChild(child)— setting before append throws. Same applies to'HUG'on non-auto-layout nodes.- Position new top-level nodes away from (0,0). Nodes appended directly to the page default to (0,0). Scan
figma.currentPage.childrento find a clear position (e.g., to the right of the rightmost node). This only applies to page-level nodes — nodes nested inside other frames or auto-layout containers are positioned by their parent. See Gotchas. - On
use_figmaerror, STOP. Do NOT immediately retry. Failed scripts are atomic — if a script errors, it is not executed at all and no changes are made to the file. Read the error message carefully, fix the script, then retry. See Error Recovery. - MUST
returnALL created/mutated node IDs. Whenever a script creates new nodes or mutates existing ones on the canvas, collect every affected node ID and return them in a structured object (e.g.return { createdNodeIds: [...], mutatedNodeIds: [...] }). This is essential for subsequent calls to reference, validate, or clean up those nodes. - Always set
variable.scopesexplicitly when creating variables. The defaultALL_SCOPESpollutes every property picker — almost never what you want. Use specific scopes like `["FRAME_FILL"
Câu hỏi thường gặp
Skill này có cần trước mỗi thao tác ghi lên Figma không?
Có. Skill nói phải tải nó trước mỗi lần gọi use_figma, vì nó chứa các quy tắc ngăn ngừa lỗi thường gặp.
Agent tìm phương thức Plugin API đúng bằng cách nào?
Nó dùng các file tham chiếu và typings đi kèm để tra cứu các phương thức cần thiết trước khi viết mã.
Skill có bao quát cả công việc design system không?
Có. Với công việc design system, skill trỏ tới một hướng dẫn riêng cần đọc trước.
Chi tiết
Mô tả gốc của tác giả
**MANDATORY prerequisite** — you MUST invoke this skill BEFORE every `use_figma` tool call. NEVER call `use_figma` directly without loading this skill first. Skipping it causes common, hard-to-debug failures. Trigger whenever the user wants to perform a write action or a unique read action that requires JavaScript execution in the Figma file context — e.g. create/edit/delete nodes, set up variables or tokens, build components and variants, modify auto-layout or fills, bind variables to properties, or inspect file structure programmatically.
repo: openai/skills
Độ phổ biến
- Sao GitHub
- 28k
- Vị trí xếp hạng
- #9854
- Giấy phép
- —
- Cập nhật
- 28/10/2026
Bình luận
- …
Thêm skill từ kho mã này
aspnet-core
28kGiúp agent của bạn xây dựng, rà soát hoặc nâng cấp ứng dụng web ASP.NET Core, chọn đúng loại ứng dụng theo hướng dẫn mới nhất của Microsoft.
chatgpt-apps
28kGiúp agent của bạn xây dựng ứng dụng ChatGPT kết hợp server MCP với giao diện widget, gồm thiết kế tool, tài nguyên UI, metadata và thiết lập cục bộ.
cli-creator
28kGiúp agent của bạn biến tài liệu API, spec hoặc script có sẵn thành một công cụ dòng lệnh dùng lại được, chạy từ mọi thư mục và trả về JSON ổn định.
define-goal
28kGiúp agent của bạn biến một ý định mơ hồ thành mục tiêu rõ ràng, đo được, với tiêu chí thành công, phạm vi và điều kiện dừng trước khi bắt đầu việc.
Skill tương tự
canvas
394kCho phép agent của bạn hiện một widget trực quan được lưu trữ trên bảng Mac đã kết nối, rồi ẩn bảng hoặc chuyển nó sang trang khác.
control-ui
394kGiúp agent của bạn sắp xếp và khắc phục sự cố Control UI của OpenClaw, gồm các phiên, bảng điều khiển và Gateway đã kết nối.
diagram-maker
394kGiúp agent của bạn vẽ sơ đồ rõ ràng dạng SVG, HTML hoặc Excalidraw có thể sửa, cho quy trình, kiến trúc hệ thống và bản phác bảng trắng.