用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/lza6/Claude-code-cli-config --skill windows-control命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | windows-control |
| description | 完整的 Windows 桌面控制。鼠标、键盘、屏幕截图 - 像人类一样与任何 Windows 应用程序交互。 |
Windows 的完整桌面自动化。像人类用户一样控制鼠标、键盘和屏幕。
所有脚本都位于“skills/windows-control/scripts/”中
py screenshot.py > output.b64
返回整个屏幕的 base64 PNG。
py click.py 500 300 # Left click at (500, 300)
py click.py 500 300 right # Right click
py click.py 500 300 left 2 # Double click
py type_text.py "Hello World"
在当前光标位置键入文本(按键之间间隔 10 毫秒)。
py key_press.py "enter"
py key_press.py "ctrl+s"
py key_press.py "alt+tab"
py key_press.py "ctrl+shift+esc"
py mouse_move.py 500 300
将鼠标移动到坐标(平滑的 0.2 秒动画)。
py scroll.py up 5 # Scroll up 5 notches
py scroll.py down 10 # Scroll down 10 notches
py focus_window.py "Chrome" # Bring window to front
py minimize_window.py "Notepad" # Minimize window
py maximize_window.py "VS Code" # Maximize window
py close_window.py "Calculator" # Close window
py get_active_window.py # Get title of active window
# Click by text (No coordinates needed!)
py click_text.py "Save" # Click "Save" button anywhere
py click_text.py "Submit" "Chrome" # Click "Submit" in Chrome only
# Drag and Drop
py drag.py 100 100 500 300 # Drag from (100,100) to (500,300)
# Robust Automation (Wait/Find)
py wait_for_text.py "Ready" "App" 30 # Wait up to 30s for text
py wait_for_window.py "Notepad" 10 # Wait for window to appear
py find_text.py "Login" "Chrome" # Get coordinates of text
py list_windows.py # List all open windows
py read_window.py "Notepad" # Read all text from Notepad
py read_window.py "Visual Studio" # Read text from VS Code
py read_window.py "Chrome" # Read text from browser
使用 Windows UI 自动化提取实际文本(不是 OCR)。比截图更快、更准确!
py read_ui_elements.py "Chrome" # All interactive elements
py read_ui_elements.py "Chrome" --buttons-only # Just buttons
py read_ui_elements.py "Chrome" --links-only # Just links
py read_ui_elements.py "Chrome" --json # JSON output
返回带有点击坐标的按钮、链接、选项卡、复选框、下拉列表。
py read_webpage.py # Read active browser
py read_webpage.py "Chrome" # Target Chrome specifically
py read_webpage.py "Chrome" --buttons # Include buttons
py read_webpage.py "Chrome" --links # Include links with coords
py read_webpage.py "Chrome" --full # All elements (inputs, images)
py read_webpage.py "Chrome" --json # JSON output
增强了浏览器内容提取,包括标题、文本、按钮和链接。
# List all open dialogs
py handle_dialog.py list
# Read current dialog content
py handle_dialog.py read
py handle_dialog.py read --json
# Click button in dialog
py handle_dialog.py click "OK"
py handle_dialog.py click "Save"
py handle_dialog.py click "Yes"
# Type into dialog text field
py handle_dialog.py type "myfile.txt"
py handle_dialog.py type "C:\path\to\file" --field 0
# Dismiss dialog (auto-finds OK/Close/Cancel)
py handle_dialog.py dismiss
# Wait for dialog to appear
py handle_dialog.py wait --timeout 10
py handle_dialog.py wait "Save As" --timeout 5
处理保存/打开对话框、消息框、警报、确认等。
py click_element.py "Save" # Click "Save" anywhere
py click_element.py "OK" --window "Notepad" # In specific window
py click_element.py "Submit" --type Button # Only buttons
py click_element.py "File" --type MenuItem # Menu items
py click_element.py --list # List clickable elements
py click_element.py --list --window "Chrome" # List in specific window
按名称单击按钮、链接、菜单项,无需坐标。
py read_region.py 100 100 500 300 # Read text from coordinates
注意:需要安装 Tesseract OCR。使用 read_window.py 代替以获得更好的结果。
# Press Windows key
py key_press.py "win"
# Type "notepad"
py type_text.py "notepad"
# Press Enter
py key_press.py "enter"
# Wait a moment, then type
py type_text.py "Hello from AI!"
# Save
py key_press.py "ctrl+s"
# Read current VS Code content
py read_window.py "Visual Studio Code"
# Click at specific location (e.g., file explorer)
py click.py 50 100
# Type filename
py type_text.py "test.js"
# Press Enter
py key_press.py "enter"
# Verify new file opened
py read_window.py "Visual Studio Code"
# Read current content
py read_window.py "Notepad"
# User types something...
# Read updated content (no screenshot needed!)
py read_window.py "Notepad"
方法 1:Windows UI 自动化(最佳)
Method 2: Click by Name (NEW)
方法 3:对话框处理(新)
方法4:屏幕截图+视觉(后备)
方法 5:OCR(可选)
read_region.py 与 Tesseract 一起使用pyautogui.FAILSAFE = True(将鼠标移至左上角以中止)状态: ✅ 准备使用(v2.0 - 对话框和 UI 元素) 创建时间: 2026-02-01 更新时间: 2026-02-02