Install
openclaw skills install design-analysis自动分析设计素材文件夹中的图片,生成多章节结构化HTML演示文档,支持自定义布局和页面尺寸。
openclaw skills install design-analysis自动化设计分析工具,用于分析设计素材(截图、设计稿)并生成结构化的HTML演示文档。
// 分析文件夹中的设计素材并生成HTML
const result = await designAnalysis({
inputFolder: "~/Desktop/01.DesignAnalysis",
outputFile: "~/Desktop/design_analysis.html",
title: "设计分析报告",
dimensions: { width: 1920, height: 1280 },
layout: { textWidth: 30, imageWidth: 70 }
});
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
inputFolder | string | ✅ | 包含设计素材的文件夹路径 |
outputFile | string | ✅ | 输出的HTML文件路径 |
title | string | ❌ | 演示文档标题(默认:设计分析演示) |
dimensions | object | ❌ | 页面尺寸 {width, height}(默认:1920×1280) |
layout | object | ❌ | 布局比例 {textWidth, imageWidth}(默认:30/70) |
sections | array | ❌ | 自定义章节配置(不传则自动生成) |
const result = await designAnalysis({
inputFolder: "~/Desktop/design",
outputFile: "~/Desktop/analysis.html",
sections: [
{
title: "设计概览",
tags: ["UI/UX", "设计系统"],
content: "<h2>项目背景</h2><p>...</p>",
image: "screenshot1.png"
},
// ... 更多章节
]
});
{
success: boolean,
outputPath: string,
totalPages: number,
analysis: {
fileCount: number,
imageFiles: string[],
sections: string[]
}
}
const result = await designAnalysis({
inputFolder: "~/Desktop/01.DesignAnalysis",
outputFile: "~/Desktop/DESIGN_ANALYSIS_DEMO.html"
});
const result = await designAnalysis({
inputFolder: "~/Desktop/design_materials",
outputFile: "~/Desktop/presentation.html",
title: "产品设计方案",
dimensions: { width: 1920, height: 1080 },
layout: { textWidth: 25, imageWidth: 75 }
});
生成的HTML包含:
├── Navigation Dock(右侧导航点)
├── Page Controls(底部翻页控制)
├── Pages Container(页面容器)
│ ├── Page 1(章节1)
│ │ ├── Text Section (30% - 左侧)
│ │ └── Image Section (70% - 右侧)
│ ├── Page 2(章节2)
│ └── ...
└── JavaScript(交互逻辑)
可以通过参数自定义: