LayerData to Code

LayerData to Code is a skill for Claude Code from zhanyoulin456/seevin-claude-plugins. It costs 32 tokens per session (1,301 once invoked), scanned A, original, MIT.

A tool that turns layerDatas, structured data exported from a UI design tool, into Vue component code with HTML and CSS. It uses the project's DESIGN.md file, which documents design rules such as colors, fonts, spacing, and styling conventions.

In plain words
What is it for?
Use it to convert groups, shapes, text, and other layer data into a Vue component at a location you specify. It can follow the project's CSS approach and component library when these are documented in DESIGN.md.
Why use it?
It avoids rebuilding a design layer by layer and helps keep generated code consistent with the project's existing visual rules. It pauses when the required design guidance is missing.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the seevin-core plugin — 3 skills, 1 command, 3 MCP servers shipped together

Good fit Use it to convert groups, shapes, text, and other layer data into a Vue component at a location you specify. It can follow the project's CSS approach and component library when these are documented in DESIGN.md.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/zhanyoulin456/seevin-claude-plugins/layerdata-to-code
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add zhanyoulin456/seevin-claude-plugins --skill layerdata-to-code
Clone the repo
git clone --depth 1 https://github.com/zhanyoulin456/seevin-claude-plugins

Made for: Claude Code.

Or install seevin-core, the plugin that ships this one along with the rest of its 3 skills, 1 command, 3 MCP servers.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for LayerData to Code

README.md
[![agentmods](https://agentmods.dev/badge/skills/zhanyoulin456/seevin-claude-plugins/layerdata-to-code/github.svg)](https://agentmods.dev/skills/zhanyoulin456/seevin-claude-plugins/layerdata-to-code)
Your own site
<a href="https://agentmods.dev/skills/zhanyoulin456/seevin-claude-plugins/layerdata-to-code"><img src="https://agentmods.dev/badge/skills/zhanyoulin456/seevin-claude-plugins/layerdata-to-code/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for LayerData to Code

Your own site · 80×15
<a href="https://agentmods.dev/skills/zhanyoulin456/seevin-claude-plugins/layerdata-to-code"><img src="https://agentmods.dev/badge/skills/zhanyoulin456/seevin-claude-plugins/layerdata-to-code.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,301 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00032 $0.01301
Opus 5.5 $0.00013 $0.00520
Sonnet 5.5 $0.00006 $0.00260
Haiku 4.5 $0.00003 $0.00130

Measured 1mo ago against content hash 631ff6aab603, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

LayerData to Code scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/seevin-core/skills/layerdata-to-code/SKILL.md · 115 lines

How it starts

The opening of the file, as written. The whole thing — 115 lines — stays where its author put it; the contents beside it link to each section on GitHub.

LayerData to Code

将 UI 设计工具导出的 layerDatas 图层数据转换为 HTML/CSS 页面代码。按照下面的步骤进行

  1. 从项目的 DESIGN.md 文件中获取设计系统变量(颜色、字体、间距等)和规范
  2. 分析 layerDatas 数据结构
  3. 生成 HTML 结构和 CSS 样式
  4. 确保符合当前项目的设计系统规范
  5. 添加到用户指定的位置

Requirements

  • 需要从项目的 DESIGN.md 项目规则中获取设计系统变量(颜色、字体、间距等),是否使用 tailwind css,scss 等
  • 如果当前项目的DESIGN.md 不存在,或者没有提到设计系统,则暂停,并提示用户添加设计系统信息到 DESIGN.md 文件中
  • 严格遵循DESIGN.md中的代码规范

Quick Start

1. 获取项目的设计系统

  • 从项目的 DESIGN.md 文件中获取设计系统,(颜色、间距等变量)和规范
  • 如果当前项目的DESIGN.md 不存在,或者没有提到设计系统,以及不完整的情况下则取消操作,并提示用户添加设计系统信息到 DESIGN.md 中
  • 严格遵循DESIGN.md中的代码规范

需要从 DESIGN.md 文件中获取的设计系统变量包括:

  • 颜色变量,包括主题色,文本色,背景色,边框色等 css 变量
  • 是否使用 tailwind css,scss,less 等 css 框架
  • 使用的组件库

2. 分析数据结构

解析并理解 layerDatas 的结构化内容。

数据结构

layerData 示例

{
  "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 等)

转换时需要:

  • 识别图层间的父子/兄弟关系
  • 选择合适的布局方案 (flex/grid/block)
  • 将原始的 x, y, width, height 绝对定位转换为 css 中的相对定位 (使用 margin, padding, flex, grid 等布局样式),禁止使用 position: absolute/fixed
  • 从 layer.css 中提取原始 css 样式,并应用到生成的代码中

2. 生成页面代码

根据草图和结构化数据生成 HTML/CSS 代码。

代码生成规则

  1. 生成 HTML 结构
    • 基于图层名称创建元素标签
    • 保持层级关系 (父元素包含子元素)
  2. 生成 CSS 样式
    • 保留原始 CSS 样式
    • 转换绝对定位为相对定位
    • 应用 margin, padding, flex, grid,block,盒子模型等布局特性
    • 默认值不声明,比如font-weight: 400;,这是默认值,不需要声明即可生效
  3. 默认填充 layerData 的 content 字段,如果没有 content 则填充 name 字段

Read the full file on GitHub · 115 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 115 lines · 32 tokens per session scan A 631ff6aab603

Subscribe to this mod's changes

LayerData to Code is a skill published in the GitHub repository zhanyoulin456/seevin-claude-plugins (4 stars, last pushed 8mo ago), licensed MIT. It adds 32 tokens to every session and 1,301 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

shadcn-svelte

Pre-built shadcn-svelte components for json-render Svelte apps. Use when working with @json-render/shadcn-svelte, adding standard UI components to a Svelte catalog, or building Svelte web UIs with shadcn-svelte + Tailwind CSS components.

vercel-labs/json-render · 63 tokens

add-localization

Adds or extends multilingual localization in a Power Pages code-site SPA. Use whenever the user asks to translate, localize, internationalize, support multiple languages, add a language selector, add locale routes, repair an i18n setup, or add languages to an existing React, Vue, Angular, or Astro Power Pages site.

microsoft/power-platform-skills · 69 tokens

vue-router-best-practices

Vue Router 4 patterns, navigation guards, route params, and route-component lifecycle interactions.

vuejs-ai/skills · 25 tokens

moai-domain-uiux

UI/UX design systems specialist covering accessibility, icons, theming, design tokens, and user experience patterns. Use when working on design systems, WCAG compliance, ARIA patterns, or dark mode theming.

modu-ai/moai-adk · 49 tokens

moai-domain-frontend

Frontend development specialist covering React 19, Next.js 16, Vue 3.5, and modern UI/UX patterns with component architecture. Use when building web UIs, implementing components, optimizing frontend performance, or integrating state management.

modu-ai/moai-adk · 54 tokens

v3-create-crud

A page generator for standard create, read, update, and delete screens, commonly called CRUD screens. It uses Element Plus, a Vue user-interface library, to build tables, searches, pagination, forms, and delete confirmations.

un-pany/v3-admin-vite · 108 tokens