figma-swiftui

โดย figma

การแปล SwiftUI ↔ Figma ใช้เมื่อผู้ใช้กล่าวถึง Swift, SwiftUI, iOS, iPhone หรือ iPad — ไม่ว่าทิศทางใด — แปลการออกแบบ Figma เป็น…

npx skills add https://github.com/figma/mcp-server-guide --skill figma-swiftui

Figma ↔ SwiftUI

Translation between Figma designs and SwiftUI code, both directions. This file is a router — actual guidance lives in the references below.

Pick the direction

DirectionTriggerReference
Design → codeUser wants SwiftUI in their iOS project from a Figma file/framereferences/design-to-code.md
Code → designUser wants to push SwiftUI views / screens / tokens into a Figma filereferences/code-to-design.md

If the request is ambiguous — a Figma URL and .swift files both present, no verb makes it clear — ask the user which direction before loading a reference.

Shared context (applies to both directions)

These points hold regardless of direction; the direction-specific references assume them.

  1. get_design_context is the read tool for Figma. Pass clientLanguages: "swift" and clientFrameworks: "swiftui" so the response is framed as Swift. URL → tool args: figma.com/design/:fileKey/:fileName?node-id=:nodeId → use fileKey, replace - with : in nodeId. For figma.com/design/:fileKey/branch/:branchKey/:fileName, use branchKey as fileKey.
  2. The React+Tailwind in get_design_context output is a structural reference, not a literal source. It approximates the visual. Never transliterate position: absolute / pixel frames / mix-blend-mode stacks into SwiftUI or into Figma — the screenshot is the source of truth in both directions.
  3. iOS HIG semantic colors are tokens, not hex. var(--backgrounds/primary, …), var(--labels/secondary, …), var(--separators/non-opaque, …) etc. map to Color(.systemBackground), Color.secondary, Color(.separator) in SwiftUI, and to variables in a semantic collection in Figma. Keep the mapping; drop the literal RGBA.
  4. SF Symbols round-trip by name in both directions — never by codepoint. Design → code: get_design_context substitutes Figma's SF Symbol glyph runs back into <SFSymbol>{Image(systemName: "...")}</SFSymbol> wrappers in the response. Use those names verbatim. Code → design: call figma.util.getSfSymbolCharacter(name) inside use_figma to convert a symbol name to the matching character — never look up codepoints by hand.
  5. Recognize the underlying iOS pattern, not the literal node / view name. The same patterns recur in both directions: large title + back chevron + trailing action = NavigationStack chrome; bottom row of icon+label pairs = TabView; repeating same-height rows with leading/trailing chrome = List. Match those system patterns rather than rebuilding them from primitives.
  6. For code → design, use_figma is the API. Always load figma-use before any use_figma call. If the task involves building a full screen, also load figma-generate-design; if it involves building components or a design system, also load figma-generate-library.

References

DocWhen to load
references/design-to-code.mdTranslating a Figma design / frame into SwiftUI
references/code-to-design.mdPushing SwiftUI views / screens / tokens into Figma

Skills เพิ่มเติมจาก figma

video-interaction-mapper
figma
ทักษะนี้ควรใช้เมื่อผู้ใช้ขอให้วิเคราะห์การบันทึกหน้าจอ UI และแมปสถานะการโต้ตอบลงใน Figma เรียกใช้สำหรับคำขอเช่น "put video…
figma-code-connect
figma
สร้างและดูแลไฟล์เทมเพลต Figma Code Connect ที่แมปส่วนประกอบของ Figma กับโค้ดสั้นๆ ใช้เมื่อผู้ใช้พูดถึง Code Connect, ส่วนประกอบของ Figma…
create-design-system-rules
figma
กฎระบบการออกแบบที่กำหนดเองสำหรับการนำ Figma ไปใช้เป็นโค้ดอย่างสม่ำเสมอทั่วทั้งโปรเจกต์ของคุณ สร้างข้อกำหนดเฉพาะของโปรเจกต์สำหรับการจัดระเบียบคอมโพเนนต์ การจัดรูปแบบสไตล์ โทเค็นการออกแบบ และการจัดการแอสเซ็ตที่ช่วยแนะนำเอเจนต์ AI ในการสร้างโค้ดที่สอดคล้องกัน รองรับรูปแบบไฟล์กฎสามแบบ: CLAUDE.md สำหรับ Claude Code, AGENTS.md สำหรับ Codex CLI และ .cursor/rules/figma-design-system.mdc สำหรับ Cursor ต้องมีการเชื่อมต่อเซิร์ฟเวอร์ Figma MCP และการวิเคราะห์โค้ดเบสเพื่อค้นหารูปแบบที่มีอยู่ก่อนสร้างกฎ...
figma-implement-motion
figma
แปลการเคลื่อนไหวและแอนิเมชันจาก Figma เป็นโค้ดแอปพลิเคชันที่พร้อมใช้งานจริง ใช้เมื่อต้องการนำแอนิเมชัน/การเคลื่อนไหวจากดีไซน์ Figma ไปใช้งาน — ผู้ใช้กล่าวถึง…
figma-use-motion
figma
Motion / animation context for the `use_figma` MCP tool — animating Figma nodes via manual keyframes, animation styles, easing, and timeline duration. Load…
figma-use-slides
figma
ทักษะนี้ช่วยให้เอเจนต์ใช้เครื่องมือ MCP use_figma ของ Figma ในบริบทของสไลด์ สามารถใช้ร่วมกับ figma-use ซึ่งมีบริบทพื้นฐานสำหรับการใช้…
figma-use-figjam
figma
ทักษะนี้ช่วยให้เอเจนต์ใช้เครื่องมือ MCP use_figma ของ Figma ในบริบทของ FigJam สามารถใช้ควบคู่กับ figma-use ซึ่งมีบริบทพื้นฐานสำหรับการใช้…
code-connect-components
figma
สร้างการเชื่อมโยงแบบสองทิศทางระหว่างคอมโพเนนต์การออกแบบใน Figma และการใช้งานในโค้ดโดยใช้ Code Connect ต้องมีการเชื่อมต่อเซิร์ฟเวอร์ Figma MCP และคอมโพเนนต์ที่เผยแพร่บนแผน Organization หรือ Enterprise โดยอัตโนมัติจะระบุคอมโพเนนต์ที่ไม่มีการแมปในการเลือกใน Figma จากนั้นสแกนโค้ดเบสของคุณเพื่อหาคอมโพเนนต์โค้ดที่ตรงกันตามชื่อ โครงสร้าง และพร็อพส์ นำเสนอคอมโพเนนต์ที่ตรงกันให้คุณตรวจสอบก่อนสร้างการแมป เพื่อให้สามารถยอมรับหรือปฏิเสธแบบเลือกได้ รองรับหลาย...