peekaboo
Provides macOS screen capture and UI automation capabilities for desktop applications.
Install
mkdir -p .claude/skills/peekaboo-steipete && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/16004" && unzip -o skill.zip -d .claude/skills/peekaboo-steipete && rm skill.zipInstalls to .claude/skills/peekaboo-steipete
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
macOS screenshots, UI inspect, clicks, typing, app/window automation.Key capabilities
- →Capture macOS screenshots.
- →Inspect UI elements on macOS.
- →Automate clicks on the macOS GUI.
- →Automate typing on the macOS GUI.
- →Control macOS applications and windows.
- →Check permissions for screen recording and accessibility.
How it works
The skill uses the `peekaboo` binary to interact with the macOS GUI, performing actions like screen capture, UI inspection, and input automation.
Inputs & outputs
When to use peekaboo
- →Taking automated screenshots
- →Interacting with desktop GUI elements
- →Automating app clicks and typing
About this skill
Peekaboo
Use 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.
Binary
- Prefer
~/bin/peekaboowhen present; it is Peter's signed local release copy. - Otherwise use
peekaboofromPATH. - Check the selected binary before relying on syntax or installed state.
PB="${PEEKABOO_BIN:-$HOME/bin/peekaboo}"
[ -x "$PB" ] || PB="$(command -v peekaboo)"
"$PB" --version
Runtime host and permissions
- Launch
Peekaboo.appwithout taking focus when a GUI Bridge host is needed:open -gj -a Peekaboo. - The app owns its TCC grants and serves
~/Library/Application Support/Peekaboo/bridge.sock. The reusable daemon has separate permissions and servesdaemon.sock;daemon startis not an app launch. - Normal runtime selection prefers a healthy reusable daemon, then the GUI
host, before starting a daemon. Use
bridge status --verbose --jsonto see the actual selection. When app-held TCC is required, pass--bridge-socket "$HOME/Library/Application Support/Peekaboo/bridge.sock"and verifyhostKind: guiinstead of assuming the app was selected. - Check
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. - Prefer Bridge capture from SSH, LaunchAgent, Codex, and other background
sessions.
--no-remote --capture-engine cgis a local-debug override and can return wallpaper-only pixels outside the active Aqua session. - Never run an unsigned or ad-hoc build against saved TCC or Keychain state.
Background-first safety
- Keep the user's foreground app, keyboard focus, and physical cursor untouched
by default. Supply an exact
--app,--pid,--window-id, or fresh snapshot target and use Peekaboo's background delivery. - Never add
--foregroundmerely to make a command work speculatively. Add it only when the user authorized foreground interaction or the target demonstrably rejects background delivery. - Shared-cursor and targetless global input must use explicit foreground mode.
This includes
move,drag, targetless/smooth scroll, and targetless keyboard input;click --long-pressis foreground-only. Foreground mode can interrupt the user. - Background typing, key chords, and paste need a resolvable app/PID and Event Synthesizing permission. Window selectors require foreground mode for these process-targeted keyboard operations.
- Do not click, type, paste, quit, or otherwise mutate UI unless the user asked or the target is a controlled test. Re-observe after mutations; never replay an indeterminate input blindly.
v4 command names
- Inventory:
app list,window list, andscreen list; there is no top-levellistcommand. - Screenshots and UI inspection:
see --no-elementsfor pixels, orsee --tree --no-screenshotfor AX-only text; do not use the removedimageorinspect-uiCLI commands. - Keyboard chords:
press; do not use the removedhotkeycommand. - Named Accessibility actions:
action; do not useperform-action. - Coordinate clicks:
click --at x,y; do not use--coords.
Common commands
"$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 --json
Click coordinates safely
Screenshot 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" --json
Peekaboo 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.
Workflow
- Resolve
PB, confirm its version, and launch the signed GUI host in the background when app-held TCC is needed. - Verify the selected Bridge host and compare permissions across sources.
- Resolve the target with
app listorwindow list; prefer PID/window ID over a broad name or title when cleanup or mutation must be exact. - Observe without focus theft: use
see --no-elementsfor a screenshot, ordinaryseefor element IDs, orsee --tree --no-screenshotfor AX-only inspection. Pass--pathwhen the caller needs the image file. - Interact in the background with an exact target and fresh snapshot. Prefer
actionor an element click over coordinate input. - Verify every mutation with a new
seeor a purpose-built read-only command. - Escalate to explicit
--foregroundonly for authorized shared cursor/global input or a confirmed application limitation; never silently promote modes. - Use
capture livefor change-aware capture,capture videofor video frame sampling,tools describe <name>for MCP schemas, and<command> --helpfor current CLI syntax. - Verify image artifacts with
sips -g pixelWidth -g pixelHeight <path>or view them locally.
Source of truth: ~/Projects/peekaboo/docs/commands/ and the selected binary's
--help output.
When not to use it
- →When the task is not related to macOS automation.
- →When the task does not involve GUI interaction or screen capture.
- →When the target system is not macOS.
Limitations
- →The skill is specific to macOS.
- →Screenshot functionality may be blocked by missing Screen Recording permissions on remote Macs.
- →Clicks/typing/window control require Accessibility permissions.
How it compares
This workflow provides programmatic control over macOS GUI elements, enabling automated tasks that would otherwise require manual user interaction.
Compared to similar skills
peekaboo side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| peekaboo (this skill) | 0 | 1mo | Review | Intermediate |
| session-status | 1 | 7mo | Review | Beginner |
| it-operations | 1 | 8mo | No flags | Advanced |
| customerio-cost-tuning | 0 | 1mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by steipete
View all by steipete →You might also like
session-status
WellApp-ai
Generate breadcrumb headers/footers with takt time tracking and muda metrics
it-operations
davila7
Manages IT infrastructure, monitoring, incident response, and service reliability. Provides frameworks for ITIL service management, observability strategies, automation, backup/recovery, capacity planning, and operational excellence practices.
customerio-cost-tuning
jeremylongshore
Optimize Customer.io costs and usage. Use when reducing expenses, optimizing usage, or right-sizing your Customer.io plan. Trigger with phrases like "customer.io cost", "reduce customer.io spend", "customer.io billing", "customer.io pricing".
perplexity-incident-runbook
jeremylongshore
Execute Perplexity incident response procedures with triage, mitigation, and postmortem. Use when responding to Perplexity-related outages, investigating errors, or running post-incident reviews for Perplexity integration failures. Trigger with phrases like "perplexity incident", "perplexity outage", "perplexity down", "perplexity on-call", "perplexity emergency", "perplexity broken".
plex
Akpo-Fure
>-
oly
slaveOftime
Use when starting a long-running or interactive CLI command with oly, especially when it may need later input, should be detachable, or should keep durable logs for supervision and resume.