Token导航 LogoToken导航

Agent Skill · 效率

design-to-html(设计 TO HTML)

用于辅助界面设计、视觉规范、排版、配色、布局和交互体验优化。它适合让 Agent 根据产品场景整理页面结构、生成 UI 方案、检查视觉一致性或改进组件层级。使用时需要结合现有品牌、设计系统和用户任务,不应只堆装饰元素;涉及真实页面改动时,应通过截图或浏览器预览检查文本溢出、对齐和响应式表现。

design-to-html 是效率类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为操作浏览器;许可证为 MIT-0,第三方扫描有提醒项,按安装量在效率类的 21,003 个 Skill 里排第 20,830。

总安装 1,035周安装 44GitHub Stars 公开资料未说明下载 363核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT-0
版本
1.0.0

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:design-to-html(设计 TO HTML)
来源仓库:https://github.com/nodermachine/design-to-html
安装命令:
openclaw skills install design-to-html
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install design-to-html

这个 Skill 是做什么的

效率类 Skill 把重复的整理、汇总、转换工作交给助手完成,减少手工复制粘贴。

通过分析布局、颜色、字体,然后通过自动视觉比较迭代优化代码,将设计图像转换为像素完美的 HTML/CSS。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 OpenClaw;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 openclaw skills install design-to-html;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要操作浏览器,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

design-to-html 怎么安装?

在终端执行 openclaw skills install design-to-html。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

design-to-html 支持哪些 AI 工具?

公开资料标注支持 OpenClaw。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

design-to-html 需要什么权限?

权限级别是操作浏览器。该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

design-to-html 是免费的吗?

来源标注的许可证是 MIT-0。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

design-to-html 用的人多吗?

公开数据是累计安装 1,035 次,近一周安装 44 次,下载 363 次。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

design-to-html 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 专注 OpenClaw 一种宿主,触发方式和使用习惯不用来回切换。
  • 许可证明确为 MIT-0,商用和分发边界好判断。

先想清楚的地方

  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 OpenClaw,想直接扩展它能力的人。
  • 需要处理效率类任务、又不想每次都手写提示词的人。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

效率类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
github

GitHub 代码协作 · OpenClaw

7,632,918545需要联网MIT-0通过
nano-pdf

Nano PDF 文档 · OpenClaw

4,249,476231需要联网MIT-0通过
auto-updater

自动更新程序 · OpenClaw

2,964,063386操作浏览器MIT-0通过
video-frames

视频帧 · OpenClaw

2,621,304112需要联网MIT-0通过
gemini

Gemini 助手 · OpenClaw

2,547,39648需要联网MIT-0有提醒
design-to-html

设计 TO HTML · 本页

1,035—操作浏览器MIT-0有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

name
design-to-html
description
Convert visual design mockups/images to pixel-perfect HTML/CSS code through iterative refinement. Use when user wants to: (1) Convert a design image/screenshot to HTML code, (2) Generate web pages from visual mockups, (3) Create HTML that matches a design pixel-by-pixel, (4) Iteratively improve HTML to match visual design. Triggers on phrases like "convert design to HTML", "from image to code", "pixel-perfect HTML", "design mockup to code".
metadata
openclaw
requires
env
[]
primaryEnv
null

Design to HTML

Convert visual design images to pixel-perfect HTML/CSS through iterative refinement with automated visual comparison.

Workflow

Input: Design image (PNG/JPG)
Output: HTML/CSS code + comparison report

Process:
1. Analyze design → Generate initial HTML
2. Render HTML → Compare with original
3. Generate diff report → Optimize HTML
4. Repeat 5 times or until 95% match
5. Output final code + report

Step 1: Initialize

Command: /design-to-html <image-path> [--threshold 95] [--iterations 5]

Actions:

  1. Load design image
  2. Extract dimensions (width, height)
  3. Analyze visual structure (layout, colors, fonts, spacing)
  4. Generate initial HTML/CSS

Example prompt:

Analyze this design mockup and generate HTML/CSS code that recreates it.

Design dimensions: {width}x{height}px
Key elements detected:
- Layout type: [grid/flex/block]
- Primary colors: [list]
- Font styles: [list]
- Spacing patterns: [list]

Generate complete HTML with inline CSS.

Step 2: Render & Compare (Iteration Loop)

Run comparison script for each iteration:

node scripts/compare.js <original-image> <html-file> <output-dir> <iteration>

Script outputs:

  • rendered_<n>.png - HTML screenshot
  • diff_<n>.png - Visual difference map
  • report_<n>.json - Comparison metrics

Comparison metrics:

  • matchScore - Pixel similarity percentage
  • diffPixels - Number of mismatched pixels
  • issues - List of detected problems

Step 3: Generate Diff Report

Report structure (passed to model):

{
  "iteration": 2,
  "matchScore": 78.5,
  "diffPixels": 21500,
  "issues": [
    {
      "type": "color",
      "location": {"x": 100, "y": 200, "w": 50, "h": 30},
      "description": "Button background color mismatch: expected #FF5733, got #FF5722",
      "severity": "medium"
    },
    {
      "type": "spacing",
      "location": {"x": 150, "y": 100, "w": 200, "h": 50},
      "description": "Padding mismatch: expected 20px, got 15px",
      "severity": "high"
    }
  ]
}

Step 4: Optimize HTML

Model prompt template:

## Iteration {iteration}/{maxIterations}

**Current match score**: {matchScore}%
**Target**: {threshold}%

**Issues detected**:
{issuesFormatted}

**Visual difference**: See diff_{iteration}.png

**Previous HTML**:

{previousHtml}


**Optimization instructions**:
1. Fix color mismatches (use exact hex values)
2. Correct spacing/padding issues
3. Adjust layout positioning
4. Match font sizes and weights

Output optimized HTML code only.

Step 5: Final Output

Completion criteria:

  • Match score ≥ threshold (default 95%)
  • OR completed max iterations (default 5)

Output package:

  • final.html - Final HTML/CSS code
  • comparison_report.md - Iteration history
  • rendered_final.png - Final screenshot
  • diff_final.png - Final comparison
  • timeline/ - All iteration screenshots

Scripts

render.js

Render HTML to PNG screenshot using Puppeteer.

node scripts/render.js <html-file> <output-image> [--width 1920] [--height 1080]

compare.js

Pixel-level comparison using pixelmatch.

node scripts/compare.js <original> <rendered> <diff-output> [--threshold 0.1]

analyze.js

Analyze design image structure.

node scripts/analyze.js <image-file> <output-json>

pipeline.js

Run full iteration pipeline.

node scripts/pipeline.js <original-image> [--threshold 95] [--iterations 5] [--output-dir ./output]

Setup

Install dependencies:

cd ~/.openclaw/skills/design-to-html
npm install

Dependencies:

  • puppeteer - HTML rendering
  • pixelmatch - Pixel comparison
  • pngjs - PNG processing
  • sharp - Image analysis

Examples

Simple button design

Input: button.png (200x50px)
Iterations: 3
Final score: 96.2%
Time: ~25s

Card component

Input: card.png (400x300px)
Iterations: 5
Final score: 91.8%
Time: ~45s

Full page layout

Input: landing-page.png (1920x1080px)
Iterations: 5
Final score: 87.5%
Time: ~90s

Tips

  1. Higher threshold → More iterations, better accuracy
  2. Larger images → More diff pixels, harder to reach threshold
  3. Complex layouts → May need manual tweaks after automation
  4. Color precision → Use exact hex values from design
  5. Font matching → Specify exact font-family, size, weight

Limitations

  • Requires Node.js + Puppeteer (headless Chrome)
  • May struggle with:

- Complex gradients - SVG icons - Custom fonts (not web-safe) - Animations/transitions

  • Best for static, flat designs

平台分布

OpenClaw

75.15%
按下载量换算273

安全审计

VirusTotal

可疑

ClawScan

通过

Static analysis

通过

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills