agentleFS
JakkuSakuraJakkuSakura/skills/macos-gui-automation/SKILL.md

macos-gui-automation

Skill1 starsChanged 9 months agoMITView on GitHub

Use Peekaboo on macOS for GUI-level automation (screenshots, UI inspection, clicks/typing, window/app control). Trigger this skill when tasks require real GUI interaction, screenshot automation, or browser-level automation on macOS.

  • Installs packages

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 5 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Prefer Homebrew for persistent use:

    line 26
  2. Distinctive:

    Run a natural-language automation:

    line 117
  3. Very specific:

    Use peekaboo see to confirm the current UI state before clicking.

    line 125
  4. Distinctive:

    Prefer text-based clicks for stability.

    line 126
  5. Distinctive:

    Keep automation steps small and re-check state after each interaction.

    line 128
  6. Very specific:

    If see or image returns empty output, re-check Screen Recording permission.

    line 132
  7. Very specific:

    If click or type fails, re-check Accessibility permission.

    line 133
  8. Distinctive:

    Use the permissions commands to verify the system state before proceeding.

    line 134

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

macOS GUI Automation (Peekaboo)

Overview

This skill guides reliable macOS GUI automation using Peekaboo (CLI/MCP). Use it for screenshot-driven UI validation, input automation, app/window control, and browser-level tests when headless automation is insufficient.

When to Use

  • GUI-level tests that require real app rendering and user input.
  • Browser automation with visual verification or non-DOM interactions.
  • Capturing screenshots or inspecting UI elements for automation logic.
  • Running end-to-end tests that require Accessibility or Screen Recording APIs.

Preconditions

  • macOS 15+ with Screen Recording and Accessibility permissions granted.
  • Peekaboo installed (Homebrew or npx). If using npx, Node 22+ is required.

Installation

Prefer Homebrew for persistent use:

brew install steipete/tap/peekaboo

For one-off usage:

npx -y @steipete/peekaboo

Core Workflow

  1. Verify permissions.
  2. Capture or inspect the UI to locate targets.
  3. Perform actions (click, type, hotkey, scroll).
  4. Capture screenshots for verification.
  5. Repeat for the next step in the flow.

Command Patterns

Check permissions:

peekaboo permissions status
peekaboo list permissions
# If using an older build, try:
# peekaboo permissions check

Request permissions (if needed):

peekaboo permissions grant screen-recording
peekaboo permissions grant accessibility
# If using an older build, try:
# peekaboo permissions request screen-recording
# peekaboo permissions request accessibility

See the screen and identify elements (capture + snapshot id):

peekaboo see --json-output

Click by text using a snapshot id:

peekaboo click --on "OK" --snapshot "<snapshot_id>"

Example snapshot capture pipeline:

SNAPSHOT=$(peekaboo see --app Safari --json-output | jq -r '.data.snapshot_id')
peekaboo click --on "Reload this page" --snapshot "$SNAPSHOT"

Type text:

peekaboo type "hello world"

Send hotkeys:

peekaboo hotkey cmd,shift,4

Scroll:

peekaboo scroll down

Target a specific app or window:

peekaboo app list
peekaboo window list

Capture a screenshot:

peekaboo image

Run a natural-language automation:

peekaboo "Open Notes and create a TODO list with three items"

Reliability Tips

  • Use peekaboo see to confirm the current UI state before clicking.
  • Prefer text-based clicks for stability; fall back to coordinates only when required.
  • Capture a screenshot after every meaningful step for test evidence.
  • Keep automation steps small and re-check state after each interaction.

Troubleshooting

  • If see or image returns empty output, re-check Screen Recording permission.
  • If click or type fails, re-check Accessibility permission.
  • Use the permissions commands to verify the system state before proceeding.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.