一键导入
macos-gui-automation
Use when controlling macOS GUI apps, automating clicks/screenshots, or remotely keeping a Mac awake with Amphetamine/caffeinate.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when controlling macOS GUI apps, automating clicks/screenshots, or remotely keeping a Mac awake with Amphetamine/caffeinate.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Durable knowledge-vault reference for the Prismtek/Buddy talking-host lip-sync workflow.
Configure, extend, or contribute to Hermes Agent.
Use when reviewing betting-model pipelines, sports prediction datasets, backtests, expected value math, and model-risk controls without placing bets.
Use when planning, drafting, repurposing, and promoting content across YouTube, X, and Twitch while keeping posting, DMs, replies, deletions, and account changes approval-gated.
Use when turning approved bookmarks and linked articles into ranked research digests, summaries, and next actions using read-only browser or API adapters.
Use when preparing concise pre-call context briefs from approved notes, prior conversations, public signals, project status, and open questions.
| name | macos-gui-automation |
| description | Use when controlling macOS GUI apps, automating clicks/screenshots, or remotely keeping a Mac awake with Amphetamine/caffeinate. |
| version | 1.0.0 |
| author | Hermes Agent |
| license | MIT |
| metadata | {"hermes":{"tags":["macOS","GUI","Automation","Vision","cliclick"],"related_skills":["apple-notes","apple-reminders"]}} |
This skill enables the agent to interact with non-CLI macOS applications by creating a feedback loop of screen capture, visual analysis, and simulated input.
brew install cliclickSystem Settings $\rightarrow$ Privacy & Security $\rightarrow$ Accessibility $\rightarrow$ Enable the relevant terminal app.cliclick commands will execute but the system will block the actual mouse movement/clicks.To interact with a GUI app, follow this iterative loop:
osascript -e 'tell application "AppName" to activate'
# OR if the app name is different from the process name:
osascript -e 'tell application "System Events" to set frontmost of process "ProcessName" to true'
screencapture -x /path/to/screenshot.png
vision_analyze to find the exact [X, Y] pixel coordinates of the target UI element.
cliclick or osascript for input.
cliclick c:X,Ycliclick m:X,Ycliclick t:textosascript -e 'tell application "System Events" to keystroke "text"'
osascript -e 'tell application "System Events" to key code 48' # Tab
osascript -e 'tell application "System Events" to key code 36' # Enter
sleep intervals (0.2s - 0.5s) between clicks to allow the UI to react.cliclick success means the game state updated.When Chrome/Chromium is running with --remote-debugging-port=9222, prefer Chrome DevTools Protocol for web portals before coordinate-based GUI clicks:
curl -s http://127.0.0.1:9222/json/list
Use the target page's webSocketDebuggerUrl and evaluate DOM JavaScript through CDP to read visible text, click buttons, or fill inputs. This is useful when vision/OCR quota is exhausted, when Chrome AppleScript JavaScript is disabled (View -> Developer -> Allow JavaScript from Apple Events), or when dynamic portals like Hostinger hPanel/Cloudflare are easier to verify through DOM state.
Keep the same verification rule: after a CDP click/input, re-read DOM text or verify the real external receipt endpoint. Do not assume a CDP command changed server state.
When the user is away and asks if the Mac is awake / closed / Amphetamine was not enabled, do not wait for GUI automation. Start a CLI power assertion first, then verify it:
# Start as a tracked background process (not nohup/disown in a foreground command)
/usr/bin/caffeinate -dimsu
# Verify
pgrep -afil 'caffeinate|Amphetamine' || true
pmset -g assertions | sed -n '1,180p'
open -gj -a /Applications/Amphetamine.app 2>/dev/null || true
Receipt to look for in pmset: PreventSystemSleep: 1, PreventUserIdleSystemSleep: 1, PreventUserIdleDisplaySleep: 1, with owner caffeinate command-line tool. Use Amphetamine GUI only as an optional secondary launch; caffeinate is the immediate reliable fix.
nohup/&/disown in a foreground command, rerun the keep-awake command with the terminal tool's background=true option, then verify in a separate command.cliclick returns success but nothing happens on screen, the Accessibility permission is missing. Instruct the user to enable it in System Settings.xattr -rd com.apple.quarantine /path/to/app to remove the quarantine flag before launching.screencapture pixel dimensions may differ from coordinate systems in some legacy apps, though cliclick generally aligns with the screen resolution.osascript activate command.| Action | Command | Notes |
|---|---|---|
| Right Click | cliclick rc:X,Y | Moves mouse to X,Y and performs a right click |
| Move | cliclick m:X,Y | Moves mouse to X,Y without clicking |
| Type | cliclick t:text | Types the specified string |
| Key Press | cliclick kp:key | Presses a specific key (e.g., kp:enter) |