screenshot-ui-locator
此技能用于引导 AI 视觉模型分析桌面截图,识别用户描述的 UI 元素,并返回归一化坐标位置。
Choose how to use this skill
You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.
1. Native installer
This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.
Do not guess an installer command or replace an existing version without reviewing the diff.
2. Complete package recommended
Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.
No complete ProSkills package is published for this listing yet.3. Prompt-only
Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.
Need only the instruction file?
Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.
No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.
// RATINGS
Not yet listed on ClawHub or SkillsMP
// README
Awesun UI Locator - 截图 UI 元素定位器
一个用于分析桌面截图并精确定位UI元素的AI技能。通过AI视觉模型识别截图中的按钮、输入框、图标等界面元素,并返回标准化坐标位置。
🚀 核心功能
- 智能识别:自动识别截图中的各种UI元素(按钮、输入框、图标、文本等)
- 精确定位:返回元素的标准化坐标 (x_norm, y_norm),范围 [0.0, 1.0]
- 多种元素支持:支持按钮、输入框、图标、导航元素、文本等常见UI组件
- 多格式支持:兼容PNG、JPEG、JPG等常见图片格式
- 上下文理解:根据用户的自然语言描述准确匹配目标元素
📋 工作流程
1. 读取截图(通过Awesun MCP)
# 提供截图文件路径
/path/to/screenshot.png
2. 描述目标元素
用户:找到登录按钮的位置
用户:右上角的设置图标在哪里
用户:位于页面底部的提交按钮
3. 获取坐标结果
{
"found": true,
"element": "登录按钮",
"coordinates": {
"x": 0.5,
"y": 0.417
},
"confidence": "high",
"description": "位于页面中央偏上的蓝色按钮,显示'登录'文字"
}
🔧 安装指南
前置条件
-
Python 环境 - 用于坐标计算工具
- 版本要求:Python 3.7 或更高
- 安装地址:https://python.org
- 用于运行坐标计算脚本和辅助工具
-
向日葵客户端 - 用于远程控制功能
- 版本要求:16.3.2 或更高
- 下载地址:https://sunlogin.oray.com/download/beta
-
可用于支持Claude Skills的各类Agent:
- Claude Code
- Open Code
- 🦞OpenClaw
🔨 安装
如果自动安装失败,可以按以下步骤手动安装:
- 克隆仓库:
git clone https://github.com/OrayDev/awesun-ui-locator.git
cd awesun-ui-locator
- 复制技能文件:
# 找到你的AI编辑器配置目录
# Claude Code: ~/.claude/skills/
# Open Code: ~/.opencode/skills/
# OpenClaw: ~/.openclaw/skills/
# 复制技能文件
cp -r . ~/.claude/skills/awesun-ui-locator/
- 让Agent重新加载Skills
📋 技能规格
强化的UI元素类型
| 元素类型 | 描述 | 示例 |
|---|---|---|
| 按钮 | 各种类型的操作按钮 | 登录、提交、取消、确认 |
| 输入框 | 文本输入区域 | 搜索框、用户名、密码框 |
| 图标 | 功能性图标元素 | 设置齿轮、汉堡菜单、关闭按钮 |
| 导航 | 导航相关元素 | 标签页、分页器、面包屑 |
| 文本 | 文字内容元素 | 标题、链接、标签 |
坐标系统
- 原点:左上角 (0.0, 0.0)
- 范围:X轴和Y轴均为 [0.0, 1.0]
- 精度:小数点后6位
- 返回:元素中心点的归一化坐标
查找策略
- 位置描述:支持相对位置描述("左上角"、"页面中央"、"右下角")
- 颜色特征:结合颜色信息提高识别准确度("蓝色按钮"、"红色图标")
- 文字内容:基于显示文字精确匹配("显示'确认'的按钮")
- 上下文关系:考虑元素间的层级关系("弹窗中的关闭按钮")
🎯 使用示例
示例1:定位登录按钮
输入:
- 图片路径:
/Users/demo/desktop-screenshot.png - 用户描述:
"找到登录按钮"
输出:
{
"found": true,
"element": "登录按钮",
"coordinates": {
"x": 0.5,
"y": 0.417
},
"confidence": "high",
"description": "位于页面中央偏上的蓝色按钮,显示'登录'文字"
}
📚 参考资料
- 技能详细说明:SKILL.md
- UI元素识别指南:references/ui_patterns.md
- 坐标计算工具:scripts/coordinate_utils.py
🤝 贡献指南
我们欢迎社区贡献!如果你有改进建议或发现了bug:
- Fork 此仓库
- 创建功能分支:
git checkout -b feature/your-feature - 提交修改:
git commit -m "Add some feature" - 推送分支:
git push origin feature/your-feature - 创建 Pull Request
⚠️ 注意事项
- 确保提供的截图清晰且包含目标元素
- 使用尽可能具体的描述来提高识别准确度
- 大文件处理可能需要更多时间
- 某些复杂界面可能需要多次尝试不同的描述方式
📞 支持与反馈
如果遇到问题或需要帮助:
Built by Oray Awesun Team
// HOW IT'S BUILT
KEY FILES