← 返回 Skills 市场
jinqiu193

imgtohtml

作者 jinqiu193 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
313
总下载
1
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install imgtohtml
功能描述
Convert UI screenshots/images into fully functional HTML/CSS copies. This skill is used when a user provides images of a website, application interface, dash...
使用说明 (SKILL.md)

This skill converts UI screenshots or design images into production-ready HTML/CSS code that accurately replicates the visual appearance and layout of the original.

The user provides an image (screenshot, mockup, or design reference) showing a UI interface they want replicated.

Analysis Process

First, carefully analyze the image to understand:

  1. Layout Structure

    • Identify sections, containers, and nesting hierarchy
    • Determine grid/flexbox patterns needed
    • Note spacing relationships and alignment
  2. Visual Elements

    • Colors (hex/rgb values from the image)
    • Typography (font families, sizes, weights)
    • Icons and imagery
    • Borders, shadows, gradients, effects
  3. Component Types

    • Headers, navigation, cards, buttons, inputs, tables, etc.
    • Interactive elements and their states
    • Data displays, labels, badges
  4. Responsive Behavior

    • How the layout might adapt to different screen sizes
    • Mobile-first or desktop-first approach

Implementation Guidelines

HTML Structure:

  • Use semantic HTML5 elements (header, nav, main, section, article, footer)
  • Create logical nesting that matches the visual hierarchy
  • Use meaningful class names (BEM or similar convention)

CSS Styling:

  • Replicate colors exactly using values from the image
  • Match typography (font family, size, weight, line-height, letter-spacing)
  • Recreate spacing (margins, padding, gaps) accurately
  • Implement visual effects (box-shadow, border-radius, gradients, backdrop-filter)
  • Use CSS variables for theming when appropriate

Layout Techniques:

  • Flexbox for 1D layouts (rows or columns)
  • CSS Grid for 2D layouts
  • Position properties for overlays and absolute positioning
  • Transform for rotations and scaling

Interactive Elements:

  • Add :hover, :focus states for buttons and links
  • Include transitions for smooth state changes
  • Consider adding basic JavaScript if the UI implies interactivity

Output Format

Provide a complete, self-contained HTML file with:

  • Proper DOCTYPE and HTML structure
  • Embedded CSS in \x3Cstyle> tags (or separate CSS file if complex)
  • All necessary meta tags for viewport/responsiveness
  • Comments explaining major sections if helpful

If the design is complex, you may split into multiple files (HTML, CSS, JS).

Accuracy Priorities

  1. Visual Fidelity: Match the original image as closely as possible
  2. Proportions: Maintain correct size ratios between elements
  3. Colors: Use exact or nearest-match color values
  4. Typography: Match font styles accurately
  5. Spacing: Replicate padding, margins, and gaps faithfully

Limitations to Communicate

  • Exact font matching may require web fonts (Google Fonts, etc.)
  • Some effects may be approximated if the exact technique isn't visible
  • Interactive behavior beyond hover states requires user specification
  • Dynamic content should be represented with placeholder data

Multi-Image Handling

When the user provides multiple images at once, process each image individually and sequentially to ensure maximum quality:

Sequential Processing Workflow:

  1. Process ONE image at a time through the complete conversion pipeline
  2. For each image:
    • Analyze its unique layout, colors, typography, and components
    • Create a dedicated HTML/CSS replica
    • Verify visual fidelity before moving to the next
  3. Maintain consistent naming conventions across all generated files
  4. After processing all images, provide a summary of all converted files

Output Organization:

  • Name files descriptively based on each image's content (e.g., login-page.html, dashboard.html)
  • If images represent different pages of the same site, maintain shared styles in a common CSS file when appropriate
  • If images are unrelated, create self-contained HTML files for each

Quality Assurance:

  • Do NOT batch-process images together - each deserves full analysis attention
  • If images are related (e.g., different screens of the same app), note shared components and reuse CSS where sensible
  • Communicate progress to the user as you work through each image

Example Workflow

  1. User provides UI screenshot(s)
  2. For each image:
    • Analyze layout, colors, typography, components
    • Create HTML structure matching the hierarchy
    • Apply CSS to replicate visual appearance
    • Add polish (hover states, transitions, responsive considerations)
  3. Deliver complete HTML file(s) - one per input image (or split logically for multi-page designs)

Remember: The goal is a pixel-perfect replica that functions as a real web page, not just a close approximation. Pay attention to details like shadows, borders, gradients, and spacing - these make the difference between "close" and "indistinguishable."

安全使用建议
This skill appears coherent and doesn't ask for credentials or install code. Before using it, avoid uploading screenshots that contain sensitive data (passwords, API keys, patient/customer data, or proprietary UI with secrets) because the agent will process and include image content in generated files. Ask the platform how image uploads are handled (stored, shared, or sent to external services) if you need stronger privacy guarantees. If you require exact fonts or 3rd-party assets, verify whether the agent will reference external CDNs (e.g., Google Fonts) and whether that network access is acceptable for your data. Otherwise the skill is reasonable to use.
功能分析
Type: OpenClaw Skill Name: imgtohtml Version: 1.0.0 The skill bundle is a well-documented set of instructions for an AI agent to convert UI screenshots into HTML/CSS code. The files (SKILL.md, _meta.json, and LICENSE.txt) focus entirely on the stated purpose of image analysis and code generation, with no evidence of malicious intent, data exfiltration, or unauthorized command execution.
能力评估
Purpose & Capability
Name/description (image-to-HTML conversion) align with the SKILL.md. No unexpected binaries, env vars, or config paths are required and nothing in the metadata asks for unrelated capabilities.
Instruction Scope
The runtime instructions are narrowly focused on analyzing provided images and producing HTML/CSS; they do not instruct the agent to read arbitrary system files, request hidden credentials, or transmit data to third-party endpoints. Limitations and outputs are clearly described.
Install Mechanism
Instruction-only skill with no install spec and no code files—nothing is downloaded or written to disk by an install step.
Credentials
No environment variables, credentials, or config paths are requested. Suggested use of web fonts (e.g., Google Fonts) is a benign UX note, not a required credential.
Persistence & Privilege
always is false and the skill does not request persistent system privileges or modifications to other skills; autonomous invocation is allowed by default but is not combined with other risky factors.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install imgtohtml
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /imgtohtml 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Version 1.0.0 – Initial release - Introduces the ability to convert UI screenshots or images into fully functional HTML/CSS replicas with high visual fidelity. - Supports analysis and recreation of layout, colors, typography, interactive elements, and responsive behavior. - Handles multiple images by processing each one individually for maximum accuracy; related pages may share CSS. - Outputs fully self-contained HTML files with accurate structure, styles, and detailed comments where needed. - Clearly communicates limitations on font matching, special effects, and interactivity. - Provides organization and naming best practices for generated files.
元数据
Slug imgtohtml
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

imgtohtml 是什么?

Convert UI screenshots/images into fully functional HTML/CSS copies. This skill is used when a user provides images of a website, application interface, dash... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 313 次。

如何安装 imgtohtml?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install imgtohtml」即可一键安装,无需额外配置。

imgtohtml 是免费的吗?

是的,imgtohtml 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

imgtohtml 支持哪些平台?

imgtohtml 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 imgtohtml?

由 jinqiu193(@jinqiu193)开发并维护,当前版本 v1.0.0。

💬 留言讨论