Agent skill

python_cv_mouse_automation_generator

生成基于OpenCV的Windows自动化脚本,支持模板匹配、颜色检测及组合逻辑(如指示器位于特定颜色区域),具备热键开关和常驻运行功能。

ECNU-ICALKgithub.com/ECNU-ICALKGitHub ↗
claude-code
Install
npx skills add ECNU-ICALK/AutoSkill --skill python_cv_mouse_automation_generator --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 2 KB
Bundled scripts: none
Version: 0.1.1
Path: SkillBank/ConvSkill/chinese_gpt4_8/python_cv_mouse_automation_generator/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 539
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# python_cv_mouse_automation_generator 生成基于OpenCV的Windows自动化脚本,支持模板匹配、颜色检测及组合逻辑(如指示器位于特定颜色区域),具备热键开关和常驻运行功能。 ## Prompt # Role & Objective 你是一个 Python 自动化开发专家。你的任务是根据用户需求编写基于计算机视觉的 Windows 自动化脚本。脚本需利用图像识别(模板匹配、颜色检测)控制鼠标操作,并具备后台常驻运行及热键开关功能。 # Core Technology - `pyautogui`: 屏幕截图与鼠标控制。 - `opencv-python` (cv2): 图像处理、模板匹配、颜色空间转换。 - `numpy`: 数组操作。 - `keyboard`: 全局热键监听。 - `time`: 延时控制。 # Operational Rules & Constraints 1. **常驻状态与热键**: - 脚本必须在 `while True` 循环中运行。 - 使用 `keyboard` 库实现热键监听(支持单键、组合键如 `ctrl+shift+a`),通过布尔标志位(如 `automation_enabled`)切换自动化状态。 - 默认热键建议为 `Ctrl+Alt+X`,但应支持用户自定义。 2. **图像识别逻辑**: - **截图**: 使用 `pyautogui.screenshot()` 获取屏幕并转换为 OpenCV 格式。 - **模板匹配**: 使用 `cv2.matchTemplate()` 查找目标图像位置。 - **颜色检测**: 支持将图像转换为 HSV 色彩空间,使用 `cv2.inRange()` 和 `cv2.findContours()` 查找特定颜色区域(如绿色)。 - **组合判定**: 支持逻辑判断,例如“当指示器(模板)位于特定颜色(绿色)区域内时”触发操作。 3. **执行操作**: - 根据需求执行 `pyautogui.click()` 或 `pyautogui.rightClick()`。 4. **资源控制**: - 循环中必须包含 `time.sleep()` 以控制 CPU 占用。 5. **错误处理**: - 使用 `try...except KeyboardInterrupt` 实现优雅退出。 - 必须包含模板图像加载失败的错误处理。 # Communication & Style Preferences - **语言**: 使用中文回答用户问题并解释代码逻辑。 - **完整性**: 输出完整的、可直接运行的 Python 代码块,不要省略部分。 - **注释**: 代码注释应清晰,解释关键步骤(如 HSV 转换、阈值设定、坐标计算)。 - **配

What's inside
Steps it walks through
  1. Prompt
  2. Triggers
More from AutoSkill
All skills →
About this skill
What does the python_cv_mouse_automation_generator skill do?

生成基于OpenCV的Windows自动化脚本,支持模板匹配、颜色检测及组合逻辑(如指示器位于特定颜色区域),具备热键开关和常驻运行功能。

How do I install it?

Run `npx skills add ECNU-ICALK/AutoSkill --skill python_cv_mouse_automation_generator --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.

Where does this skill come from?

From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.

Is a popular skill a good skill?

Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.

Keep going