Community程式設計與開發github.com

Peekaboo

使用 Peekaboo CLI 擷取 macOS 使用者介面、操作目標元素並驗證結果。

Peekaboo 是什麼?

Peekaboo 是一個 CLI 工具,專為 macOS 上的 AI 代理與開發者設計,用於自動化 UI 互動,包含檢查、操作(點擊、輸入、拖曳、按鍵組合)與驗證。它支援經由 OpenClaw Bridge 與 OpenClaw 主機連線以啟用電腦控制,並提供 v4 語法。使用時需注意權限設定(如螢幕錄製)、保留橋接 socket 環境變數,並在每次操作前取得最新 UI 狀態以確保目標新鮮度。支援的相關命令包含 `app list`、`see`(含元素偵測或純螢幕截圖)、`press` 與 `drag`,皆可輸出 JSON 格式以便程式化處理。遇到錯誤時應優先查閱橋接狀態與權限狀態命令。

相容平台~Claude Code~Codex CLI✓Cursor
npx skills add https://github.com/clawdbot/clawdbot/tree/main/skills/peekaboo

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

Peekaboo 是做什麼的?

使用 Peekaboo 來檢查 macOS UI、對目標元素進行操作,並驗證結果。 以下範例使用 v4 語法。請執行 peekaboo --version 以及已安裝命令的 --help 查看說明; 若使用舊版本,請依該版本的說明操作。

OpenClaw Bridge

當電腦控制啟用、提供者設為 Peekaboo 且 Peekaboo Bridge 啟用時,OpenClaw macOS 應用程式會託管 Peekaboo Bridge。 在透過該主機執行時,請保留現有的 OpenClaw socket 選項:

export PEEKABOO_BRIDGE_SOCKET="${PEEKABOO_BRIDGE_SOCKET:-$HOME/Library/Application Support/OpenClaw/bridge.sock}"
peekaboo bridge status --json

請確認所選的主機與 socket 是您預期使用的。保留明確指定的 PEEKABOO_BRIDGE_SOCKET 或 --bridge-socket 選項。如果所需的主機 不可用,請回報該結果;不要清除選項或切換電腦控制提供者來讓命令成功執行。

權限歸屬於執行操作的程序或 Bridge 主機。 除非呼叫端具有所需權限,否則請勿傳遞 --no-remote。

尋找已安裝的命令

請使用葉節點命令的說明查看旗標與目標要求,而不是在不同命令間複製旗標。 使用根命令的說明來探索可用命令:

peekaboo --help
peekaboo app list --help
peekaboo see --help
peekaboo press --help
peekaboo drag --help

V4 移除了下列舊的命令根:

舊命令V4 命令
list appsapp list
imagesee --no-elements 用於不含元素偵測的像素截圖
hotkeypress 搭配和弦,如 cmd+shift+t
swipedrag --from … --to …

對於其他操作,包括點擊、輸入、滾動以及管理視窗或選單, 請使用 peekaboo <command> --help。將命令選項放在葉節點命令之後; --json 要求結構化輸出。

檢查、操作、驗證

從應用程式清單與目標的新鮮視圖開始:

peekaboo app list --json
peekaboo see --app Safari --window-title "Example" --annotate \
  --path /tmp/peekaboo-example.png --json

在操作前讀取回傳的元素。將操作綁定到預期的應用程式、視窗以及 最新的快照;請勿重複使用範例元素 ID。操作後,再次檢查 UI 並 確認要求的結果。當視窗變更或目標過期時,請重新整理觀察結果。

若要進行不含元素偵測的螢幕截圖:

peekaboo see --mode screen --screen-index 0 --no-elements --retina \
  --path /tmp/peekaboo-screen.png --json

原始鍵盤和弦需要明確的前景互動或由 press 接受的新鮮精確視窗收據。 拖曳總是移動共享游標,並且需要 --foreground。當前景互動已授權時:

peekaboo press cmd+shift+t --app Safari --foreground --json
peekaboo drag --from 100,500 --to 100,200 --duration 800ms --foreground --json

請使用目前觀察結果中的實際目標與座標。建議使用明確的持續時間單位, 例如 800ms;請查閱每個命令的說明了解其選項與先決條件。

疑難排解

  • 若收到命令已移除的錯誤,請使用已安裝 CLI 所指定的取代命令。
  • 若遇到主機或權限失敗,請對所選主機檢查 peekaboo bridge status --json 和 peekaboo permissions status --json。
  • 若遇到定位目標失敗,請查閱葉節點命令的說明,並使用 see 取得最新的 UI 狀態。
  • 在 macOS 15+ 上,私密視窗選取器提示與基礎的螢幕錄製授權是分開的, 即使 Bridge 權限正確也可能出現。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

acp-router

Route plain-language requests for Claude Code, Cursor, Copilot, OpenClaw ACP, OpenCode, Gemini CLI, Qwen, Kiro, Kimi, iFlow, Factory Droid, Kilocode, or explicit ACP harness work into either OpenClaw ACP runtime sessions or direct acpx-driven sessions ("telephone game" flow). For coding-agent thread requests, read this skill first, then use only `sessions_spawn` for thread creation. Codex chat binding defaults to the native Codex app-server plugin unless ACP is explicit or background spawn needs ACP.

add-model-provider

Add and live-prove a model provider with non-interactive config one-liners, without exposing credentials.

agent-transcript

Requested GitHub PR/issue agent transcripts: redact, trim, preview, and insert safely.

apple-notes

Create, view, edit, delete, search, move, or export Apple Notes via the memo CLI on macOS.

apple-reminders

List, add, edit, complete, or delete Apple Reminders and reminder lists via remindctl.

auto-qa

Run OpenClaw-wide autonomous QA and live/stress campaigns across independent subsystem lanes, with verified fixes and a resumable evidence report.

autoreview

Structured code review through the shared OpenClaw agent-skills installation.

bear-notes

Create, search, and manage Bear notes via grizzly CLI.

blacksmith-testbox

Run Blacksmith Testbox for CI-parity checks, secrets, hosted services, migrations, or builds local cannot reproduce.

block-kit

Use proactively for structured or interactive Slack replies, and when asked to author or validate native Slack Block Kit JSON.

blogwatcher

Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.

blucli

BluOS CLI (blu) for discovery, playback, grouping, and volume.

bluebubbles

Send and manage iMessages via BlueBubbles, including attachments, tapbacks, edits, replies, and groups.

browser-automation

Use when controlling web pages with the OpenClaw browser tool, especially multi-step flows, login checks, tab management, or recovery from stale refs/timeouts.

camsnap

Capture frames or clips from RTSP/ONVIF cameras and local webcams, including USB pan/tilt/zoom control.

canvas

Present HTML on connected OpenClaw node canvases, navigate/eval/snapshot, and debug canvas host URLs.

channel-message-flows

Use when running QA Lab channel message flow evidence.

clawdtributor

Clawtributor PRs here, last week or another window: discover conversation refs, recheck GitHub, rank by impact.

clawhub

Search ClawHub for plugins by default, or skills when explicitly requested; install, verify, update, uninstall, publish, or sync skills.

相關技能