Use this skill to drive native macOS UI with Peekaboo.
peekaboo CLI via exec.Run these checks in order:
bash
command -v peekaboo
peekaboo --version
If peekaboo is missing, install it proactively:
bash
brew install steipete/tap/peekaboo
After installation, verify again:
bash
command -v peekaboo && peekaboo --version
If Homebrew is missing, check for it first:
bash
command -v brew
If brew is also missing, ask one concise question before installing Homebrew or using another path.
Before GUI actions, check permissions:
bash
peekaboo permissions status
If Screen Recording or Accessibility is missing, tell the user exactly what is missing and pause until granted. Do not pretend automation can succeed without them.
For a quick readiness check, you can run:
bash
~/.openclaw/skills/peekaboo-macos-automation/scripts/doctor.sh
Before see, click, set-value, or other window-level actions on a named app, do this first:
bash
peekaboo app switch --to "AppName"
If needed, unhide or launch it first:
bash
peekaboo app unhide --app "AppName"
peekaboo app launch "AppName"
Do not assume a running app has a capturable front window. Bring it forward first, then inspect it.
Use structured inspection first. Start broad, then narrow:
bash
peekaboo list apps
peekaboo app switch --to "Safari"
peekaboo see --app "Safari" --json
peekaboo image --mode screen --retina --path ~/Desktop/peekaboo-screen.png
When a command returns a snapshot_id, reuse it for follow-up actions.
A good first-pass sequence is:
bash
peekaboo list apps
peekaboo app switch --to "TargetApp"
peekaboo see --app "TargetApp" --json
Prefer actions in this order:
set-valueperform-actionclick --on <id/query>typeExamples:
bash
peekaboo set-value --on T1 --value "hello" --snapshot "$SNAPSHOT"
peekaboo perform-action --on B1 --action AXPress --snapshot "$SNAPSHOT"
peekaboo click --on "Save" --snapshot "$SNAPSHOT"
peekaboo type --text "hello world"
peekaboo app switch --to "AppName" && peekaboo see --app "AppName" --jsonpeekaboo click --on "Label" --snapshot "$SNAPSHOT"peekaboo set-value --on T1 --value "text" --snapshot "$SNAPSHOT"peekaboo perform-action --on B1 --action AXPress --snapshot "$SNAPSHOT"peekaboo hotkey cmd,shift,tpeekaboo app switch --to "Notes"peekaboo dialog listpeekaboo menubar listpeekaboo dock listpeekaboo space listpeekaboo agent "..."Ask before:
Do not ask before installing Peekaboo itself if Homebrew is already available and the user asked to use or set up Peekaboo.
If peekaboo see fails:
peekaboo app switch --to "AppName"peekaboo app unhide --app "AppName"peekaboo see --app frontmost --jsonIf a semantic action fails:
perform-actionclick or keyboard inputIf permission output is unclear, report the raw missing permission names to the user.
Keep updates short and concrete: