Introduction¶
Handing a design draft to AI for “one-shot page-level translation” into frontend code often results in layout misalignment, chaotic component boundaries, and discrepancies with the design draft. The more complex the page—multiple modules, repeated components, responsive constraints—the harder it is to fix code generated in a single attempt. This article introduces the SkillHub community Skill figma2code (@user_3141f90e/figma2code, v1.0.0): it uses a “plan first, then reconstruct module by module” workflow. Assuming Figma or Mastergo MCP is already connected, it guides the Agent to produce code in stages and generates two navigation documents, PLAN.md and COMPONENTS.md, facilitating block-by-block verification against the design.
What is this¶
figma2code is a community Skill on SkillHub categorized under dev-programming, published by user_3141f90e. Its tags indicate requires_api_key=false, meaning no additional API Key is needed. It targets requirements such as “design to code,” “Figma to code,” “Mastergo to code,” and “UI reconstruction.” The core value is not replacing the MCP’s ability to read designs, but rather layering a structured process on top of it: Global Planning → Component Tree Analysis → Module-by-Module Reconstruction → Overall Assembly. This avoids a “one-shot” generation approach for the entire page.
Official Access:
- SkillHub Page: https://www.skillhub.cn/skills/user_3141f90e/figma2code
- API Coordinates: https://api.skillhub.cn/user_3141f90e/figma2code
Core Features¶
Based on the official description, the verified capabilities of this Skill include:
- Phased Workflow: Executes in four stages—global planning, component tree analysis, module-by-module reconstruction, and overall assembly—rather than covering the entire page with a single prompt.
- Multi-Tech Stack Output: Supports reconstructing designs into HTML/CSS, React, Vue, Mini Programs, uni-app, Taro, Flutter, SwiftUI, etc. (The specific stack is specified by you in the conversation).
- Process Documentation: Generates
PLAN.md(overall planning) andCOMPONENTS.md(component tree and module breakdown) during execution, facilitating future design revisions and comparison with the original design. - Built-in Trigger Scenarios: When users mention low reconstruction quality for complex pages, poor results from one-time reconstruction, or express dissatisfaction with Cursor / Claude / GPT results, the Skill guides the adoption of the aforementioned workflow instead of manually writing the whole page immediately.
Prerequisite: Figma or Mastergo MCP must be connected to provide design nodes and style information. This Skill is responsible for organizing the reconstruction steps and code structure.
Installation and Activation¶
Follow the official SkillHub instructions for installation: first, prepare the CLI via SkillHub Installation and Priority Source Configuration, then install this Skill to the current Agent’s skills directory.
- Check if
skillhubis installed:
command -v skillhub && skillhub --version
- If not installed, use the official script (choose between full installation or CLI-only as needed):
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash
- When installing figma2code, you must use
--dirto point to the skills directory of the current environment; otherwise, the default installation to./skills/might not be loaded by the Agent:
skillhub install user_3141f90e/figma2code --dir <your skills directory>
Common client skills paths (from SkillHub installation documentation):
- Cursor: `~/.cursor/skills/`
- Claude Code: `~/.claude/skills/`
- Codex: `~/.codex/skills/` or `.agents/skills/` under the project
You can also ask the Agent in the conversation to install it based on official instructions:
Please install @user_3141f90e/figma2code according to https://skillhub.cn/install/skillhub.md.
After installation, restart or refresh the Skill list as required by your client, then reference the design link or node in the conversation and specify the target framework (e.g., React + Tailwind).
Typical Usage¶
The official documentation does not provide a standalone copyable “sample project.” The typical usage derives from the Skill’s self-described workflow. The reproducible steps are as follows:
- Confirm that the Figma or Mastergo MCP is connected and can read the target page or Frame.
- Describe the requirement in the conversation, for example: Reconstruct the homepage in a specific Figma link into Vue 3 components, where the page contains multiple modules like navigation, lists, and a bottom bar.
- Ask the Agent to enable figma2code and execute in four stages: First, write
PLAN.mdto define modules and reconstruction order; second, writeCOMPONENTS.mdto sort out the component tree and reusability; then, generate code module by module; finally, assemble the entry points and styles for overall alignment. - After completing each module, check spacing, fonts, and colors against the design; then proceed to the next module to avoid massive one-time overhauls of the entire page.
It is suitable to explicitly state in the conversation: the target tech stack, whether it needs to be responsive, and which Frames/page scopes need reconstruction.
Use Cases and Notes¶
Best suited for:
- Complex pages with multiple modules and repeated components;
- Designs requiring responsiveness or where previous “one-shot reconstruction” yielded poor results;
- Environments where Figma / Mastergo MCP is configured and the goal is to improve reconstruction fidelity rather than guessing the layout from scratch.
Limitations and Notes:
- If the design tool MCP is not connected, the Skill’s assumptions do not hold; MCP configuration must be completed first.
- This Skill organizes the workflow and documentation but does not replace the need for design data quality; chaotic layer naming will still increase analysis costs.
- The SkillHub page displays version v1.0.0; it is a community source (
community), and maintenance frequency depends on updates from SkillHub and the publisher.
Conclusion¶
The value of figma2code lies in transforming “design to code” from a single generation into a verifiable, phased reconstruction, using PLAN.md and COMPONENTS.md to anchor context. If you are working on complex Figma / Mastergo pages and are unsatisfied with raw AI-generated code, you can install @user_3141f90e/figma2code from SkillHub for a trial after configuring the MCP.
Official URL: https://www.skillhub.cn/skills/user_3141f90e/figma2code