ワンクリックで
layerdata-to-code
将 layerDatas 图层数据转换为 Vue 组件代码 (HTML + CSS)。当用户提示词中包含 layerDatas 时调用
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
将 layerDatas 图层数据转换为 Vue 组件代码 (HTML + CSS)。当用户提示词中包含 layerDatas 时调用
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML/CSS layouts, or when styling/beautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
| name | LayerData to Code |
| description | 将 layerDatas 图层数据转换为 Vue 组件代码 (HTML + CSS)。当用户提示词中包含 layerDatas 时调用 |
将 UI 设计工具导出的 layerDatas 图层数据转换为 HTML/CSS 页面代码。按照下面的步骤进行
DESIGN.md 文件中获取设计系统变量(颜色、字体、间距等)和规范DESIGN.md 项目规则中获取设计系统变量(颜色、字体、间距等),是否使用 tailwind css,scss 等DESIGN.md 不存在,或者没有提到设计系统,则暂停,并提示用户添加设计系统信息到 DESIGN.md 文件中DESIGN.md中的代码规范DESIGN.md 文件中获取设计系统,(颜色、间距等变量)和规范DESIGN.md 不存在,或者没有提到设计系统,以及不完整的情况下则取消操作,并提示用户添加设计系统信息到 DESIGN.md 中DESIGN.md中的代码规范需要从 DESIGN.md 文件中获取的设计系统变量包括:
解析并理解 layerDatas 的结构化内容。
{
"type": "shape",
"name": "矩形 788",
"x": 1362,
"y": 102,
"width": 100,
"height": 64,
"css": ["width: 100px;", "height: 64px;", "background: #fff;"],
"layerIndex": 76
}
| 字段 | 说明 |
|---|---|
type | 图层类型 (group/shape/text/Ellipse/Line) |
content | 图层内容 |
name | 图层名称,如果 content 为空,则使用 name 字段 |
x, y | 绝对定位坐标 |
width, height | 元素尺寸 |
css | 原始 CSS 样式数组 |
layerIndex | 图层索引 |
原始数据: 基于绝对定位 (x, y, width, height)
目标代码: 使用标准 CSS 布局 (margin, padding, flex, grid 等)
转换时需要:
根据草图和结构化数据生成 HTML/CSS 代码。
font-weight: 400;,这是默认值,不需要声明即可生效x,y,width和height,在转换时,只能作为布局参考,不可直接作为 CSS 样式的属性值,切记不要直接引用w-[100px]<div class="w-[100px] h-[64px] ">
<img src="" alt="" class="bg-[#f5f5f5]" />
</div>