skills/mac-screen-control/SKILL.md
macOS screen/keyboard/mouse control via Accessibility API and CGEvent. Use when user wants to control desktop applications, automate UI interactions, take screenshots, click elements, type text (including Chinese), or manage windows on macOS. Triggers on keywords like 'Mac控制', '屏幕控制', '桌面自动化', 'Mac automation', 'screen control', 'click element', 'type text'.
npx skillsauth add hs3180/disclaude mac-screen-controlInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You control macOS desktop applications using hardware-level events (CGEvent) and the Accessibility API.
Platform: macOS only. If not on macOS, inform the user this skill requires a Mac.
Verify with: python3 -c "import Quartz; print('OK')" or fallback: python3 -c "import ctypes; ctypes.CDLL('/System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/HIToolbox'); print('OK')"
All operations go through the helper script: skills/mac-screen-control/scripts/mac_control.py
# Full screen
python3 skills/mac-screen-control/scripts/mac_control.py screenshot --output /tmp/screenshot.png
# Region only
python3 skills/mac-screen-control/scripts/mac_control.py screenshot --output /tmp/region.png --x 100 --y 200 --width 500 --height 300
After taking a screenshot, use the Read tool to view it and analyze the screen content.
# Left click at coordinates (logical points, not Retina pixels)
python3 skills/mac-screen-control/scripts/mac_control.py click --x 500 --y 300
# Double click
python3 skills/mac-screen-control/scripts/mac_control.py click --x 500 --y 300 --double
# Right click
python3 skills/mac-screen-control/scripts/mac_control.py click --x 500 --y 300 --right
# Move without clicking
python3 skills/mac-screen-control/scripts/mac_control.py move --x 500 --y 300
# Drag from one point to another
python3 skills/mac-screen-control/scripts/mac_control.py drag --from-x 100 --from-y 100 --to-x 500 --to-y 300
Coordinate system: CGEvent uses logical points (not Retina pixels). If you get a pixel coordinate from a screenshot, divide by the screen's backingScaleFactor (usually 2x on Retina).
# Type text (supports Chinese, emoji, all Unicode)
python3 skills/mac-screen-control/scripts/mac_control.py type --text "Hello 你好 🎉"
# Press key combination
python3 skills/mac-screen-control/scripts/mac_control.py key --key "return"
python3 skills/mac-screen-control/scripts/mac_control.py key --key "c" --modifiers "command"
python3 skills/mac-screen-control/scripts/mac_control.py key --key "tab" --modifiers "command"
Chinese text: Uses clipboard-based injection (pbcopy + Cmd+V). This is the most reliable method for CJK input, bypassing IME issues entirely. The clipboard is saved and restored after typing.
Modifier keys: command, shift, option, control
Special keys: return, tab, escape, delete, backspace, space, up, down, left, right, home, end, f1-f12
# Get window bounds for an application
python3 skills/mac-screen-control/scripts/mac_control.py window --app "Feishu"
# Activate (bring to front) an application
python3 skills/mac-screen-control/scripts/mac_control.py activate --app "Feishu"
# List all visible windows
python3 skills/mac-screen-control/scripts/mac_control.py list-windows
# Get screen info (resolution, scale factor)
python3 skills/mac-screen-control/scripts/mac_control.py calibrate
Returns:
{
"screens": [
{
"width": 1440,
"height": 900,
"scaleFactor": 2,
"primary": true
}
],
"note": "CGEvent uses logical points (width x height). Screenshot pixels = logical * scaleFactor"
}
# Find elements in an application by role
python3 skills/mac-screen-control/scripts/mac_control.py find-element --app "Feishu" --role "AXButton"
# Find elements containing text
python3 skills/mac-screen-control/scripts/mac_control.py find-element --app "Feishu" --text "Send"
Returns element info with position, size, role, and title — can be used directly for click/type operations.
screenshot --output /tmp/screen.pngclick --x {x} --y {y}type --text "你好世界"key --key "return"activate --app "Feishu"key --key "k" --modifiers "command shift"type --text "chat name"key --key "return"type --text "message content"key --key "return"drag --from-x {sx} --from-y {sy} --to-x {tx} --to-y {ty}sleep 0.5scaleFactor for CGEventtools
--- name: issue-solver description: Issue Solver - creates a scheduled task to scan a GitHub repo for open issues, pick the best candidate, and submit a fix PR. Use when user wants to set up automated issue resolution. Keywords: "Issue Solver", "自动修 Bug", "solve issues", "issue solver", "issue solver 安装". allowed-tools: Read, Write, Edit, Bash, Glob, Grep --- # Issue Solver — Schedule 安装器 为指定 GitHub 仓库创建 Issue 扫描定时任务。将 schedule 模板实例化为可执行的 SCHEDULE.md。 **适用于**: 安装/配置 Issue Solver 定时任务 | **不适用于
testing
Dissolve a Feishu group chat and clean up associated resources. Use when a PR is merged/closed, a discussion is finished, or a group needs to be removed. Keywords: "解散群", "dissolve group", "删除群", "close group", "清理群".
data-ai
手气不错 — disclaude dogfooding skill. Randomly selects a real use case from disclaude's feature set, simulates a natural user interaction, and reports observations. Use when user says keywords like "手气不错", "随机测试", "feeling lucky", "dogfooding", "自我体验", "feeling-lucky".
tools
Feishu/Lark document operations via lark-cli. Read, upload, import, export, and manage Feishu docs. Keywords: '飞书文档', '上传文档', '读飞书文档', 'lark cli', '导入文档', '导出文档', 'upload to feishu', 'feishu doc', 'lark doc', 'lark-cli', 'feishu.cn', '读文档'.