NewsCrawler.org

A Figma-to-page workflow where AI checks its own screenshots against the design

用了这 Skill,我觉得前端兄弟可以毕业了
Image: juejin.cn

Update · : The author says they have used the Skill for almost half a year, and the workflow is described as a closed loop in which the agent reads the Figma node, writes the page, screenshots it, compares it with the design, measures the DOM and iterates until acceptance. The author says they will not release the source code and will instead explain the workflow so readers can build their own version.

The author of this Juejin article says they have used a Figma page-restoration Skill for almost half a year. The AI receives a Figma node link and a local page address, reads the design through Figma MCP[1], writes the page, takes a browser screenshot, compares it with the design, and checks the DOM to fix differences, running the loop on its own. The author does not share the code and says that explaining the rules clearly is enough for an AI to build the tools.

The workflow follows four rules: select a single Figma node, calculate CSS sizes and export scale separately, and use a 360px development baseline. For a 360px-wide design, images are exported at 2x; for a 720px-wide design, they are exported at 1x and CSS sizes are divided by 2. Text that changes and clickable areas stay as real DOM, while complex graphics are exported as images, and differences are checked in the DOM before any code is changed.

Before screenshots, the viewport and DPR[2] are fixed, along with fonts and page state. Sharp[3] resizes both images to the same size and format, then produces an overlay and a diff image. The author names Codex, Claude Code or Cursor as the coding agent and EGO Lite, a Chrome-based browser that keeps login state, for screenshots of pages that require sign-in.

Read the original juejin.cn

Discussion

Commenters mostly ask for the Skill itself, and several ask the author to share it. Two questions are raised: what to do when there is no design draft, and what the restoration rate is; no answer to either appears in the comments. One comment says that UI designers should be cut because pages are generated by AI on the front end.

Sources

  • CNJuejin ZH

    用了这 Skill,我觉得前端兄弟可以毕业了

    15 likes930 views2 comments16 saves

  • CNJuejin ZH new source ·

    用了这 Skill,前端兄弟都觉得好

    39 likes3,516 views20 comments40 saves

Published: First seen: Updated: Читать по-русски

Open as a page