Install
openclaw skills install screenshot-to-prompt截图理解 + 页面结构抽取 + 实现 prompt 生成器。 输入页面截图,输出结构化识别结果和可直接发给 coding agent 的实现 prompt。 触发:用户发截图说"帮我分析这个页面"、"生成实现 prompt"、"页面结构抽取"、 "把这个页面转成 prompt"、"screenshot to prompt"、"截图转实现"。 NOT for: 直接写代码(除非用户明确要求)、业务分析、产品方案撰写、设计稿评审。
openclaw skills install screenshot-to-prompt根据用户提供的页面截图,识别页面结构、组件层级、文案字段、状态与交互,并生成一份可以直接发送给 coding agent 的实现 prompt。 Given a user-provided page screenshot, recognize the page structure, component hierarchy, text content, states, and interactions, then generate a ready-to-use implementation prompt that can be sent directly to a coding agent.
核心链路 / Core pipeline:
截图理解 → 页面结构抽取 → 状态识别 → 实现 prompt 生成 Screenshot Understanding → Page Structure Extraction → State Recognition → Implementation Prompt Generation
这是一个 / This is a:
不是 / NOT:
用户给一张图后,稳定输出 / After the user provides a screenshot, stably output:
重点帮助 coding agent 理解 / Focus on helping the coding agent understand:
而不是扩展业务背景 / Rather than expanding on business context。
用户可能提供 / The user may provide:
例如 / Examples:
收到截图后,自动完成以下步骤。 After receiving a screenshot, automatically complete the following steps.
识别页面的信息架构与区块关系 / Recognize the information architecture and block relationships:
识别常见模块 / Recognize common modules:
识别页面中的 UI 组件 / Recognize UI components in the screenshot:
需要识别 / Identify:
提取截图中的 / Extract from the screenshot:
不要凭空补全文案 / Do NOT fabricate text that isn't visible in the screenshot。
识别 / Recognize:
允许轻度合理推断 / Allowed (lightweight reasonable inference):
不允许 / NOT allowed:
如果用户提供多张截图 / If the user provides multiple screenshots:
需要 / Required:
统一整理 / Consolidate:
重点关注 / Focus on:
识别 / Recognize:
帮助 coding agent 即使没有设计稿,也能合理组织页面结构和视觉层级。 Help the coding agent organize page structure and visual hierarchy reasonably, even without a design mockup.
识别适合组件化的区域 / Identify areas suitable for componentization:
帮助 coding agent 做合理组件拆分。 Help the coding agent make reasonable component splits.
将截图翻译成实现导向描述 / Translate the screenshot into implementation-oriented descriptions:
✅ 好的描述 / Good descriptions:
❌ 不好的描述 / Bad descriptions:
重点:帮助 coding agent 理解"页面应该怎么实现"。 Focus: Help the coding agent understand "how should this page be implemented".
根据用户要求自动切换 / Automatically switch based on user requirements。
适用于 / For:
要求 / Requirements:
适用于 / For:
要求 / Requirements:
适用于 / For:
要求 / Requirements:
| 允许 / Allowed | 不允许 / NOT Allowed |
|---|---|
| 推断基础状态切换 | 编造复杂业务规则 |
| 推断表单基础校验 | 擅自新增完整模块 |
| 推断列表选择行为 | 定义不存在的接口逻辑 |
| 推断区块主次关系 | 脱离截图扩展页面 |
| 推断基础联动关系 | 擅自定义系统类型 |
默认输出两部分 / Output two parts by default。
使用结构化、工程化方式输出 / Use a structured, engineering-oriented format。 建议使用表格 / Tables are recommended。
| 项 / Item | 内容 / Content |
|---|---|
| 页面类型 / Page type | |
| 布局方式 / Layout method | |
| 页面层级 / Page hierarchy | |
| 固定区域 / Fixed areas | |
| 滚动区域 / Scrollable areas |
| 区块 / Block | 组件 / Components | 文案/字段 / Text/Fields | 当前状态 / Current State | 可推断交互 / Inferred Interactions |
|---|---|---|---|---|
用 2~5 句话总结这个页面主要需要实现什么。 Summarize in 2-5 sentences what this page needs to implement.
prompt 必须 / The prompt must:
你需要根据截图实现一个页面/页面局部区域。
You need to implement a page (or page section) based on the provided screenshot.
### 实现目标 / Implementation Goal
请根据截图完成页面结构搭建,重点实现:
Build the page structure based on the screenshot. Focus on:
- 页面布局 / Page layout
- 区块层级 / Block hierarchy
- 组件结构 / Component structure
- 基础状态 / Basic states
- 基础交互 / Basic interactions
不要扩展截图中未体现的复杂业务逻辑。
Do NOT expand into complex business logic not shown in the screenshot.
---
### 实现范围 / Implementation Scope
- 仅实现截图中出现的内容 / Only implement content visible in the screenshot
- 不扩展未出现的模块 / Do NOT expand to modules not shown
- 如果已有 layout/header/sidebar,请直接复用 / If layout/header/sidebar already exists, reuse them directly
- 不重复实现公共结构 / Do NOT re-implement common structures
- 重点实现当前截图区域 / Focus on the current screenshot area
---
### 页面结构 / Page Structure
页面包含以下区域 / The page contains the following areas:
1.
2.
3.
---
### 组件构成 / Component Composition
请使用以下组件完成页面 / Use the following components to build the page:
-
-
-
---
### 状态与交互 / States & Interactions
页面需要支持 / The page needs to support:
-
-
-
包括 / Including:
- 默认态 / Default state
- selected 态 / Selected state
- disabled 态 / Disabled state
- loading 态 / Loading state
- empty 态(如有)/ Empty state (if applicable)
---
### 布局要求 / Layout Requirements
注意 / Note:
- 固定区域 / Fixed areas
- 滚动区域 / Scrollable areas
- 自适应关系 / Adaptive relationships
- 区块层级 / Block hierarchy
- 页面间距与留白 / Page spacing and whitespace
---
### 组件拆分建议 / Component Split Suggestions
建议拆分 / Suggested splits:
-
-
-
保证结构清晰,方便后续迭代 / Ensure clear structure for future iteration。
---
### UI 策略 / UI Strategy
根据当前情况选择 / Choose based on current situation:
#### 骨架模式 / Skeleton Mode
- 先搭页面骨架 / Build page skeleton first
- 不做高保真 UI / No high-fidelity UI
- 样式保持简洁 / Keep styles simple
- 后续再继续精修 / Refine later
#### 自由发挥 UI / Free UI Design
- 在截图结构基础上优化视觉 / Optimize visuals based on screenshot structure
- 优先复用项目 UI 组件库 / Prefer project UI component library
- 保持现代、统一、简洁 / Modern, unified, clean
- 保证正式页面质量 / Production-ready quality
#### 设计稿还原 / Design Restoration
- 尽量还原设计稿 / Match design as closely as possible
- 保持布局与间距一致 / Keep layout and spacing consistent
- 优先复用设计系统 / Prefer design system
- 保证视觉统一 / Visual consistency
---
### 输出要求 / Output Requirements
- 使用项目现有技术栈 / Use the project's existing tech stack
- 优先复用已有 UI 组件 / Prefer reusing existing UI components
- 没有接口可使用 mock 数据 / Use mock data if no API is available
- 不实现复杂业务逻辑 / Do NOT implement complex business logic
- 组件拆分合理 / Reasonable component splits
- 保持代码可维护 / Maintainable code```