Chuyển đến nội dung
Skillpedia
Giao diện (UI/UX)101k · #985

figma-extract

Skill này làm gì

Công cụ này lấy một tệp Figma và lưu thông tin cốt lõi vào máy tính của bạn. Nó trích xuất cấu trúc thiết kế, kiểu dáng (như màu sắc và phông chữ) và hình ảnh theo định dạng có tổ chức.

Khi nào nên dùng

  • ✓Khi bạn muốn có một bản sao cục bộ của thiết kế Figma.
  • ✓Khi bạn chuẩn bị dự án để dùng kiểu dáng và hình ảnh của Figma ở nơi khác.
  • ✓Khi bạn muốn tạo bản ghi chính thức về thiết kế tại một thời điểm cụ thể.

Liên kết skill

https://github.com/nexu-io/open-design/blob/main/plugins/_official/atoms/figma-extract/SKILL.md

Sao 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

Hãy dùng skill này để giúp tôi: https://github.com/nexu-io/open-design/blob/main/plugins/_official/atoms/figma-extract/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Lưu thiết kế Figma của tôi vào một tệp có tổ chức.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Bạn cung cấp đường dẫn tệp Figma và quyền truy cập đặc biệt (token OAuth). Sau đó công cụ tải xuống mọi thứ và sắp xếp vào các thư mục trên máy tính của bạn.

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.

Figma extract

Spec §10 / §21.3.1: the figma-migration scenario starts with a Figma file URL + an OAuth token. This atom turns that pair into the authoritative on-disk record subsequent stages (token-map, generate, critique) operate on.

Inputs

Source Required Notes
Figma file URL or node-id yes Provide via the figma-oauth GenUI surface or od plugin apply --input fileUrl=…
Figma OAuth token yes Routed through oauth-prompt with oauth.route='connector' and connectorId='figma'; the daemon never stores the token in SQLite

Output

The atom writes a deterministic, JSON-shaped extract under the project cwd:

project-cwd/
├── figma/
│   ├── tree.json        # canonical node tree (id / type / parent / children / box / fills / text)
│   ├── tokens.json      # color + typography + spacing tokens lifted off the file
│   ├── assets/          # rasterised exports of every leaf node that the file marks for export
│   │   └── <node-id>.<png|svg|webp>
│   └── meta.json        # { fileUrl, version, lastModified, exportedAt, atomDigest }

figma/tree.json is the canonical pivot for every downstream atom. figma/tokens.json is the input to token-map. assets/ is the input to generate's media stage.

Convergence

The atom completes when figma/tree.json exists and is non-empty. The until evaluator reads figma.tree.nodes >= 1; if the figma file is empty or the OAuth token expired, the atom emits a clear error event and the run aborts (the user fixes auth or picks a different file).

Anti-patterns the prompt fragment forbids

  • Synthesising a tree from screenshots when the OAuth path failed — always re-prompt the user; never make up node ids.
  • Dropping unsupported node types silently; record them in meta.json.unsupportedNodes[] so the human can audit gaps.
  • Treating component instances as duplicates; record componentRef links so token-map can de-duplicate at the right boundary.

Status

Implemented by the daemon runner in apps/daemon/src/plugins/atoms/figma-extract.ts. It fetches and walks the Figma REST tree, records unsupported nodes, lifts tokens, and rasterizes supported assets.

Câu hỏi thường gặp

“Design tokens” là gì?

Đó là các kiểu dáng cơ bản của thiết kế, như màu sắc chính xác, cỡ chữ và khoảng cách giữa các phần tử.

Điều gì xảy ra nếu tệp Figma trống hoặc quyền truy cập hết hạn?

Công cụ sẽ thông báo lỗi rõ ràng để bạn sửa quyền truy cập hoặc chọn một tệp khác.

Công cụ có tự đoán thiết kế nếu không truy cập được Figma không?

Không, công cụ không bao giờ bịa thông tin. Nếu có lỗi, nó sẽ yêu cầu bạn sửa hoặc chọn tệp khác.

Chi tiết

Mô tả gốc của tác giả

Pull a Figma file's node tree, design tokens, and embedded assets into the project cwd as a structured snapshot.

repo: nexu-io/open-design

Độ phổ biến

Sao GitHub
101k
Vị trí xếp hạng
#985
Giấy phép
Apache-2.0
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự