← 返回 Skills 市场
wangjipeng977

screenshot-to-prototype

作者 王继鹏 · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
33
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install wangjipeng-screenshot-to-prototype
功能描述
Use when (1) user pastes a UI screenshot and needs editable frontend code prototype.
使用说明 (SKILL.md)

Screenshot To Prototype

Use when (1) user pastes a UI screenshot and needs editable frontend code prototype.

Core Position

This skill solves the specific engineering problem of: user pastes a UI screenshot and needs editable frontend code prototype

This skill is NOT:

  • A general-purpose capability that activates on anything
  • A replacement for manual human judgment
  • A tool that stores state or remembers across sessions

This skill IS activated ONLY when the trigger conditions are explicitly met.

Modes

/screenshot-to-prototype

Default mode. Performs the core task end-to-end.

When to use: User provides input matching the trigger conditions above.

Execution Steps

  1. Receive screenshot — User pastes a UI screenshot (PNG/JPG/WebP)

    • Confirm the image is a UI mockup, not a photo or diagram
    • If the image is unclear or not a UI, state: "This skill converts UI screenshots to editable frontend prototypes. Please provide a clear screenshot of a UI design."
  2. Analyze UI structure — Identify key elements from the screenshot:

    • Detect layout structure (header, sidebar, main content, footer)
    • Identify component types: buttons, input fields, cards, tables, navigation
    • Estimate spacing, font sizes, and color scheme from visual cues
  3. Generate component map — Map detected elements to frontend structure:

    • Container elements (div/section) based on layout regions
    • Interactive elements (button, input, select) with appropriate attributes
    • Text content areas with estimated typography (size, weight, color)
  4. Output prototype code — Generate clean, well-structured HTML/CSS (or React/Vue):

    • Use semantic HTML tags matching the detected structure
    • Include inline CSS or basic class names for styling
    • Add placeholder content that reflects the screenshot layout
    • Structure the code so it is immediately readable and editable
  5. Deliver with guidance — Return the code with a brief explanation:

    • State what framework/libraries the output uses
    • Note any assumptions made about sizing or positioning
    • Offer to refine specific components if the user provides more detail

Mandatory Rules

Do not

  • Do not make up facts or claim actions were taken that were not
  • Do not hardcode API keys — use os.getenv("API_KEY") instead
  • Do not store sensitive user data beyond the current session
  • Do not exceed token budget without warning the user first
  • Do not activate for off-topic requests — return a brief decline message

Do

  • Validate all inputs before acting
  • Handle errors gracefully with actionable error messages
  • Log actions taken for auditability
  • State explicitly when you are uncertain or data is insufficient

Quality Bar

A good output:

  • Solves exactly the problem described in the trigger conditions
  • Provides actionable result in the expected format within 3 turns
  • Handles error cases with specific guidance, not generic "try again"
  • States assumptions explicitly when input is ambiguous

A bad output:

  • Solves a different problem than the one triggered
  • Provides a generic "I can't help with that" without explaining why
  • Crashes, hangs, or returns malformed output on valid input
  • Activates for off-topic requests (false positive)

Good vs. Bad Examples

Scenario Bad Output Good Output
Trigger matched "I can help with that." + no action Correct transformation delivered in structured format
Invalid input Crash or wrong result "Missing required field: [X]. Please provide [Y]."
Ambiguous input Guesses and might be wrong States assumption and asks for confirmation
Off-topic request Attempts to help anyway "This skill activates when [trigger]. Please restate your request."

References

  • references/ — Detailed templates, schemas, and edge-case rules for this skill
安全使用建议
Reasonable to install if you want help turning UI screenshots into editable frontend code. Review generated code before using it, and be aware that the README's API_KEY and write-mode examples look like generic boilerplate rather than actual required behavior.
能力标签
requires-sensitive-credentials
能力评估
Purpose & Capability
The stated purpose is narrow and coherent: activate when a user provides a UI screenshot and wants editable frontend prototype code. The main SKILL.md instructions align with that purpose and emphasize input validation and off-topic refusal.
Instruction Scope
README and README_zh contain boilerplate placeholders and an unexplained read/write mode example, but the authoritative SKILL.md narrows activation to UI screenshots, instructs against storing sensitive data, and does not direct autonomous file mutation.
Install Mechanism
Installation is ordinary ClawHub/manual skill-copy guidance. No install hook, dependency install, background service, or persistence mechanism is present in the artifact.
Credentials
Metadata marks the skill as requiring sensitive credentials and README lists API_KEY, but the skill itself does not actually call an external service or require credentials; this is overbroad documentation rather than harmful behavior.
Persistence & Privilege
The skill explicitly says it does not store state or remember across sessions and tells the agent not to store sensitive user data beyond the current session. No privileged, persistent, or credential-reading code was found.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install wangjipeng-screenshot-to-prototype
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /wangjipeng-screenshot-to-prototype 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: Converts UI screenshots into editable frontend code prototypes. - Detects layout and UI elements from user-provided screenshots (PNG/JPG/WebP). - Generates structured HTML/CSS (or React/Vue) code reflecting the screenshot design. - Includes clear validation and guidance for ambiguous or invalid inputs. - Provides brief explanations, notes assumptions, and offers refinements on request. - Strictly activates only when a clear UI screenshot is provided.
元数据
Slug wangjipeng-screenshot-to-prototype
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

screenshot-to-prototype 是什么?

Use when (1) user pastes a UI screenshot and needs editable frontend code prototype. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 33 次。

如何安装 screenshot-to-prototype?

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

screenshot-to-prototype 是免费的吗?

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

screenshot-to-prototype 支持哪些平台?

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

谁开发了 screenshot-to-prototype?

由 王继鹏(@wangjipeng977)开发并维护,当前版本 v1.0.0。

💬 留言讨论