Turns frontend designs from Figma into CDS-first React or React Native code. Use this skill whenever the user shares a Figma URL such as `figma.com/design/...?...node-id=...` while working in a frontend application context.
86
83%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Advisory
Suggest reviewing before use
This skill provides a structured workflow for translating Figma designs into CDS-first production code with high visual fidelity. It bridges the Figma MCP server with the Coinbase Design System, ensuring that designs are implemented using real CDS components and conventions rather than raw Figma HTML output.
The goal is not to copy the Figma output literally. The goal is to use Figma MCP as the design source, then adapt that output into the target project's real CDS component stack.
figma.com/design/...?node-id=... and wants it implemented.cds-code skill instead for general CDS UI work.cds-code skill -- this skill depends on cds-code for component selection, styling rules, doc lookup workflow, and code quality standards. If cds-code is not installed, tell the user to install it first.get_design_context is available as an MCP tool.list-cds-routes and get-cds-doc.https://figma.com/design/:fileKey/:fileName?node-id=1-2If the Figma MCP server is missing or the get_design_context tool is not available:
get_design_context tool..cursor/mcp.json or their agent's MCP settings).Follow these steps in order. Do not skip steps.
When the user provides a Figma URL, extract the file key and node ID.
URL format: https://figma.com/design/:fileKey/:fileName?node-id=1-2
Extract:
:fileKey (the segment after /design/)1-2 (the value of the node-id query parameter)Branch URLs: figma.com/design/:fileKey/branch/:branchKey/:fileName -- use branchKey as the file key.
Example:
https://figma.com/design/kL9xQn2VwM8pYrTb4ZcHjF/DesignSystem?node-id=42-15kL9xQn2VwM8pYrTb4ZcHjF42-15Convert node-id=123-456 into nodeId: "123:456" when the tool requires colon-separated format.
Prefer the exact node the user shared. Do not widen the request to a larger parent frame unless you have a concrete reason.
Call get_design_context with the extracted file key and node ID.
get_design_context(fileKey=":fileKey", nodeId="1-2")Use these defaults unless the user explicitly asks otherwise:
disableCodeConnect: false -- Code Connect is the highest-value signal from Figma MCPPass accurate client context when you know it:
clientFrameworks: react for web React apps, react-native for React Native appsclientLanguages: typescript, javascript, or the known project languagesIf the response is too large or truncated:
get_metadata(fileKey=":fileKey", nodeId="1-2") to get the high-level node map and discover child node IDs.get_design_context on the narrower child node.Do not treat get_metadata as a replacement for get_design_context. It is only a way to navigate large trees when the initial node is too broad.
Staying narrow: Figma MCP becomes less helpful when the selected node contains many unrelated frames. Stay on the specific node the user provided, prefer a clearly scoped child frame over a giant parent screen if the tool becomes noisy, and keep Code Connect enabled. If the tool still reports many unmapped frames, check whether the returned screenshot and code are still actionable before bouncing the problem back to the user.
Run get_screenshot with the same file key and node ID.
get_screenshot(fileKey=":fileKey", nodeId="1-2")This screenshot is the visual source of truth throughout implementation. Keep it accessible for comparison during the visual verification step.
Download any assets (images, icons, SVGs) returned by the Figma MCP server.
localhost source for an image or SVG, use that source directly.localhost source is provided.Before translating the design into CDS code, ground yourself in the target app.
web or mobile.Do not guess the platform from the Figma design alone when the repo tells you more.
If both web and mobile exist and the target is genuinely ambiguous, ask one concise clarifying question.
Read the CDS coding standards: Before writing any CDS code, read the cds-code skill for the full set of CDS-first coding standards including layout defaults, styling defaults, component selection guidance, package mapping, and theme usage. That skill is the canonical reference for how to write CDS code -- this skill focuses on the Figma-to-CDS bridge.
This is the core translation step. The Figma MCP response is a mixed-confidence input -- treat each part accordingly.
Confidence hierarchy:
| Source | Confidence | How to use |
|---|---|---|
CodeConnectSnippet | Highest | Preserve the component choice. It maps to a real component chosen by the design system team. Keep the composition close to the snippet after fixing imports, props, and data wiring. |
| Screenshot | High | Use for layout hierarchy, spacing rhythm, and visual intent verification. |
| Default HTML / Tailwind classes | Lower | Structural hints that must be adapted into CDS components. Never ship raw Figma HTML in a CDS app. |
CDS doc lookup: Follow the cds-code skill's setup and component selection steps to discover and read CDS docs before choosing imports, props, or composition patterns.
Translating fallback HTML and Tailwind classes:
When parts of the Figma response fall back to raw HTML or Tailwind-like classes, use them as evidence, not as the final implementation. Look for clues:
flex, flex-row, flex-col, items-start, justify-betweengap-[8px], px-[var(--spacing/...)], pb-[16px]data-name attributes like SectionHeader, List, Card, Row, HeaderTranslate those clues into CDS primitives and components:
flex-row -> HStackflex-col -> VStackdata-name hints -> check CDS docs before inventing custom UIExample: a fallback wrapper like flex flex-col gap-[8px] px-[8px] likely wants a VStack with gap and paddingX. A data-name="SectionHeader" is a strong signal to check whether CDS already has a SectionHeader component.
Do not guess the final component tree from CSS alone when CDS docs can confirm the intended abstraction.
Props before style:
When translating Figma values to CDS code, always check the target component's prop table before reaching for style. Figma MCP output often includes raw CSS values for font size, weight, color, alignment, and transforms. Do not copy those values into a style prop when the CDS component already has a dedicated prop.
For example, Figma may output a label with font-size: 10px, font-weight: 500, text-transform: uppercase, color: var(--palette/foregroundmuted). The correct translation is to find the matching CDS font token (e.g. font="caption"), then use color="fgMuted" and textTransform="uppercase" as props -- not to dump everything into style. Using style for these values bypasses the CDS font family and theme wiring, causing the text to render in the wrong typeface.
Only use style for values that have no CDS prop equivalent (e.g. cursor, transform, letterSpacing, exact pixel dimensions). See the "Avoid unnecessary style overrides" section in the cds-code skill for the full rule and examples.
Strive for high visual fidelity with the Figma design. Do not stop after the first implementation pass when you have tooling to inspect the result.
After writing or updating the code:
Pay special attention to:
Prefer a short corrective loop: implement, visually compare, correct the largest differences, re-check once more.
Do not claim visual fidelity based only on reading code or DOM structure. If browser inspection is available, use it. If inspection tooling is unavailable, ask the user to take a screenshot of the rendered UI and share it with you so you can compare against the Figma design. See the Step 4: Verify visually in the cds-code skill for the full workflow.
Before marking complete, validate the implementation against the Figma screenshot.
Validation checklist:
style overrides for values that have a CDS prop (font, color, textAlign, padding, gap, etc.)Follow the cds-code skill for all component selection, styling, and code quality rules. When a Code Connect snippet already uses CDS components cleanly, preserve that mapping rather than re-deriving it.
The design is too complex for a single response. Use get_metadata to get the node structure, then fetch specific child nodes individually with get_design_context.
Compare side-by-side with the screenshot from Step 3. Check spacing, colors, and typography values in the design context data. Run the corrective loop from Step 7.
Verify the Figma MCP server's assets endpoint is accessible. The server serves assets at localhost URLs -- use them directly without modification.
The Code Connect snippet maps to a real component chosen by the design system team. Preserve it unless the target repo clearly documents a different import path. If the snippet already uses CDS components, it is often nearly copy-pasteable after fixing imports, props, and data wiring.
This is normal for designs with many unmapped elements. Use the fallback HTML as structural evidence, translate layout classes to CDS primitives, and use data-name hints to look up CDS components before inventing custom markup.
When CDS tokens differ from Figma values, prefer CDS tokens for consistency. Adjust spacing or sizing minimally to maintain visual fidelity.
Be concise and implementation-oriented.
Avoid turning the workflow into a long design critique unless the user asked for one.
f79a780
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.