跳到正文
Skillpedia
界面(UI/UX)10k · #11892

build-design

它能做什么

这个技能根据设计构建屏幕,使结果尽量贴近设计。它会复用项目已有的组件和样式数值,然后将结果与设计对照检查。适合根据设计文件工作的开发者和设计师。

适用场景

  • ✓当你有一个 Figma 链接,并希望把该屏幕构建进项目代码的时候。
  • ✓当你有一张设计图,需要把它转换为与之相符的可运行页面的时候。
  • ✓当你希望构建时复用已有的按钮、颜色和间距数值,而不是创建新的时。

技能链接

https://github.com/jakubkrehel/skills/blob/main/skills/build-design/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/jakubkrehel/skills/blob/main/skills/build-design/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请用我们已有的组件,在我的应用中构建这个 Figma 屏幕。”

每周 5 个新技能,1 分钟读完。

工作原理

该技能会从设计的源头读取设计,例如 Figma 文件或图片。它会使用项目已有的部件编写代码,然后在完成之前将结果与设计进行比较。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Build design

This skill turns a design into code that matches it. It reads the design at its source, builds with what the project already has, then compares the result against the design before calling it done.

The design decides. Values come from the design file, never from your taste or a pattern you liked elsewhere. A change the design does not show is a deviation, and a deviation is the user's call.

It owns no domain rules. Where the design breaks one, build it as designed and report the conflict with its owner. Contrast is a requirement in better-accessibility and a measurement in better-colors. Focus and semantics are better-accessibility, type is better-typography and spacing and structure are better-layout. Palette is better-colors, copy is better-writing and surfaces, icons and motion are better-ui. Reviewing finished work is interface-review, exploring alternatives is variant and stress testing a component is break.

1. Read the design at its source

A Figma link means the Figma MCP. Search the available and deferred tools for figma before saying it is unavailable, since the server often sits under a name you did not expect. A server that lists only an authenticate tool is connected but signed out, so ask the user to authenticate. With no Figma tool at all, ask the user to connect one, and do not build from memory or guesswork meanwhile. figma.md holds which tools to call and what each returns.

A screenshot or exported image has no values to read. Sizes are ratios to the capture, so state the scale you assumed and treat every measurement as an estimate. Ask for the Figma link when one exists, since it replaces the whole estimate.

Scope the run to the frames named. Frames that show the same thing at different widths are one piece at several breakpoints, not separate pieces.

This step is done when you hold a screenshot of every frame in scope and its values for spacing, size, radius, color, type and the components used. From a Figma file they are exact. From an image they are estimates at the scale you stated.

2. Map the design onto the project

Read the project's tokens and component library before writing anything. Then map every design value to what exists:

In the design In code
A bound variable or style The token with the same name or the same value
A raw value that equals a token That token
A raw value with no token The nearest existing token, listed in the report as rounded
A component instance The project's component of that name, with the variant the design shows
A component instance with no project equivalent Plain markup in place, listed as a deviation, and ask whether a component should exist
A one-off group of layers Plain markup in place, not a new component

Never add a token, a component variant or an arbitrary value to hit a number. Stop and ask which way to go when rounding would visibly change the design. That means more than 2px on spacing or size, or a color landing on a different step.

Check what data the design needs and wire it to what exists. Where the backend for part of it does not exist yet, build that part as UI fed by props and name it in the report as unwired.

3. Build only what the design shows

Implement the frames, the breakpoints the frames define and the states the file draws, such as hover, empty or error. A state the file does not draw is not yours to design. Leave it to the existing component's default and list it as missing.

Leave everything around the piece as it was. No neighbouring copy edits, no icon swaps, no "while I was here" cleanups. A diff wider than the design is the most common way this goes wrong.

4. Compare against the design

Render the build at each frame's width beside the design screenshot and walk it element by element. Compare the properties Read the design at its source collected. "Gap is 12px, design is 16px" is a finding. "Feels a bit tight" is not.

With a browser at hand, screenshot each width and compare. Without one, hand over the local URL with the widths to check and say the comparison is unverified. Do not report a match you did not look at.

Fix every mismatch you caused, then compare again. This step is done when every remaining difference is a rounding or a question.

5. Report and stop

Element Design Built Status
Card padding 20px p-5 Matches
Title size 15px `t
常见问题

使用它需要 Figma 吗?

Figma 链接需要 Figma 连接。没有连接时,该技能会请你先连接,而不会凭猜测还原设计。

如果设计违反了规则,例如对比度过低,怎么办?

该技能会按设计原样构建,并报告冲突。修改设计由你决定。

它会添加设计中没有的颜色或间距吗?

不会。数值以设计为准,设计中未体现的任何改动都会被标出,由你决定。

详情

作者的原始描述

Builds UI from a Figma file or a design image so it matches the design, using the project's existing tokens and components.

repo: jakubkrehel/skills

热度

GitHub 星标
10k
排名
#11892
许可证
MIT
更新时间
2026/11/1

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能