macOS screen capture, accessibility inspection, and background-first app/window/UI automation with Peekaboo v4.
66
79%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./skills/peekaboo/SKILL.mdUse Peekaboo for native macOS capture, UI inspection, and automation. Prefer its
native app, window, Accessibility, and input commands over AppleScript or
osascript whenever Peekaboo exposes the operation.
~/bin/peekaboo when present; it is Peter's signed local release copy.peekaboo from PATH.PB="${PEEKABOO_BIN:-$HOME/bin/peekaboo}"
[ -x "$PB" ] || PB="$(command -v peekaboo)"
"$PB" --versionPeekaboo.app without taking focus when a GUI Bridge host is needed:
open -gj -a Peekaboo.~/Library/Application Support/Peekaboo/bridge.sock. The reusable daemon has
separate permissions and serves daemon.sock; daemon start is not an app
launch.bridge status --verbose --json to see
the actual selection. When app-held TCC is required, pass
--bridge-socket "$HOME/Library/Application Support/Peekaboo/bridge.sock"
and verify hostKind: gui instead of assuming the app was selected.permissions status --all-sources --json. Grant Screen Recording,
Accessibility, and Event Synthesizing to the process reported as the selected
source, not merely to the invoking terminal.--no-remote --capture-engine cg is a local-debug override and can
return wallpaper-only pixels outside the active Aqua session.--app, --pid, --window-id, or fresh snapshot
target and use Peekaboo's background delivery.--foreground merely to make a command work speculatively. Add it
only when the user authorized foreground interaction or the target demonstrably
rejects background delivery.move, drag, targetless/smooth scroll, and targetless keyboard
input; click --long-press is foreground-only. Foreground mode can interrupt
the user.app list, window list, and screen list; there is no top-level
list command.see --no-elements for pixels, or
see --tree --no-screenshot for AX-only text; do not use the removed image
or inspect-ui CLI commands.press; do not use the removed hotkey command.action; do not use perform-action.click --at x,y; do not use --coords."$PB" permissions status --all-sources --json
open -gj -a Peekaboo
"$PB" bridge status --verbose --json
"$PB" screen list --json
"$PB" app list --include-hidden --include-background --json
"$PB" window list --app Safari --json
# Screenshot only; observation does not activate the target app.
"$PB" see --no-elements --mode screen --path /tmp/screen.png --json
# Interactive map plus a directly accessible image artifact.
"$PB" see --app Safari --annotate --path /tmp/safari-see.png --json
# AX-only inspection, with no pixel capture or screenshot artifact.
"$PB" see --app Safari --tree --no-screenshot --json
# Use IDs and the snapshot returned by a fresh `see`.
"$PB" click --on "$ELEMENT_ID" --snapshot "$SNAPSHOT_ID" --json
"$PB" action AXPress --on "$ELEMENT_ID" --snapshot "$SNAPSHOT_ID" --json
# Process-targeted background keyboard delivery.
"$PB" type "text" --app TextEdit --json
"$PB" press cmd+shift+t --app Safari --json
"$PB" paste "text" --app TextEdit --json
"$PB" tools --json
"$PB" tools describe click --jsonScreenshot pixels are not automatically click coordinates. click --at uses
logical points. With target flags, coordinates are relative to the resolved
window; without them they are global screen coordinates. Add --global to make
targeted coordinates use the global logical space. Use screen list --json for
display bounds and scale factors when converting Retina pixels.
A background coordinate click requires an explicit snapshot from a fresh exact-window observation. First resolve the canonical window ID, then observe that exact window and use both its window ID and returned snapshot ID:
"$PB" window list --app Safari --json
"$PB" see --app Safari --window-id 12345 --path /tmp/safari.png --json
"$PB" click --window-id 12345 --at 20,40 --snapshot "$SNAPSHOT_ID" --jsonPeekaboo revalidates the captured PID, process generation, window ID, and bounds
before dispatch. If the exact receipt cannot be established, background input
must fail instead of guessing. Use --foreground only when visible shared-pointer
interaction is intentional. Background right/double click can be dispatched to
an exact route but remains effect-unverifiable; run a fresh see before retrying.
For element work, prefer IDs from a fresh see and pass the snapshot explicitly.
Queries and the implicit latest snapshot are convenient but less deterministic.
After an action changes UI, capture a new snapshot rather than reusing stale IDs.
PB, confirm its version, and launch the signed GUI host in the
background when app-held TCC is needed.app list or window list; prefer PID/window ID over
a broad name or title when cleanup or mutation must be exact.see --no-elements for a screenshot,
ordinary see for element IDs, or see --tree --no-screenshot for AX-only
inspection. Pass --path when the caller needs the image file.action or an element click over coordinate input.see or a purpose-built read-only command.--foreground only for authorized shared cursor/global
input or a confirmed application limitation; never silently promote modes.capture live for change-aware capture, capture video for video frame
sampling, tools describe <name> for MCP schemas, and <command> --help for
current CLI syntax.sips -g pixelWidth -g pixelHeight <path> or view
them locally.Source of truth: ~/Projects/peekaboo/docs/commands/ and the selected binary's
--help output.
dc4f583
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.