Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/openclaw/peekaboo/windowgit clone --depth 1 https://github.com/openclaw/PeekabooWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.02065 |
| Opus 5 | $0.00000 | $0.01033 |
| Sonnet 5 | $0.00000 | $0.00413 |
| Haiku 4.5 | $0.00000 | $0.00206 |
Grade A, and why
window scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 72 lines — stays where its author put it; the contents beside it link to each section on GitHub.
peekaboo window
window gives you programmatic control over macOS windows. Every subcommand accepts WindowIdentificationOptions (--app, --pid, --window-id, --window-title, --window-index) so you can pinpoint the exact window before acting. Output is mirrored in JSON and text for easy scripting.
Subcommands
| Name | Purpose | Key options |
|---|---|---|
close / minimize / restore / maximize |
Perform the respective exact-window state action. | Standard window-identification flags. restore clears only the exact window's minimized state in the background. close --foreground permits focused Cmd-W fallbacks when AX close does not work. |
focus |
Bring the window forward, optionally hopping Spaces or moving it to the current Space. | Adds FocusCommandOptions plus --verify to confirm focus. |
move |
Move the window to new coordinates. | -x <int> / -y <int> specify the new origin. |
resize |
Adjust width/height while keeping the origin. | -w <int> / --height <int>. |
set-bounds |
Set both origin and size in one go. | --x, --y, --width, --height. |
list |
Lists an app's renderable windows with canonical IDs and indexes for interaction targeting. | --app or --pid; adds --group-by-space. |
Implementation notes
- Every action validates that at least an app, PID, or window ID is supplied. Use only one of
--window-id,--window-title, or--window-index; title matching prefers one exact case-insensitive match, then requires one unique partial match. Ambiguous matches fail before dispatch instead of choosing the first window. - Window mutations require an exact application name, exact bundle ID, or PID before resolving any title/index selector. Read-only
window listretains its compatibility fuzzy lookup, but partial application names are never promoted into mutation authority. - Destructive state and geometry actions resolve broad selectors once, pin the selected window's session-scoped CGWindowID plus owner PID/process-start identity, and revalidate that receipt after Bridge queue admission and around native dispatch/readback. PID generation protects against process-ID reuse; because Apple exposes no stronger public window-incarnation token, disappeared, wrong-owner, or bounds-changed windows fail closed instead of retargeting a sibling or newer process.
- Hybrid window inventory lets AX minimized state override stale WindowServer visibility metadata. Exact
--pidplus--window-idstate mutations use a bounded AX-backed exact-ID lookup, so a minimized window omitted by WindowServer remains addressable with its original bounds and process receipt. Successful minimize is verified from the same AX window/process generation. closeis AX-only in its default background mode. It pins broad app/title/index selectors to the selected exact window ID before dispatch and verifies through WindowServer that the same ID stays gone. If AX reports success but the window remains, Peekaboo fails instead of focusing the app or sending Cmd-W to whatever is frontmost. Add--foregroundonly when you explicitly want focused Cmd-W fallbacks.- A minimized exact window may be absent from the public WindowServer catalog. Default close refuses it with explicit
window restoreor--foregroundguidance.window restoreresolves that ID through a bounded background AX scan, revalidates its owner generation and capture-time bounds, and clears only itsAXMinimizedattribute without activation, focus, a global shortcut, or cursor movement. - Remote background close requires a Bridge host that advertises the strict close operation. A stale host is rejected before dispatch; update it or use
--no-remoterather than risking its legacy global fallback. move,resize,set-bounds, andmaximizeread the window frame back after acting;new_boundsin the JSON payload always reflects the frame the window actually settled at, not the requested one.move,resize, andset-boundsalso verify the achieved frame against the request. macOS accepts geometry requests and then lets the app constrain them (e.g. a SwiftUIminWidth/minHeight), so the request can be applied only partially or not at all:- Partially applied (frame changed but missed the request): the command still succeeds,
requested_boundsand awarningstring are included in the JSON payload, and the text output prints the actual frame plus the warning. - Fully ignored (frame did not change at all): the command fails with exit code 1 and error code
WINDOW_MANIPULATION_ERROR, because reporting success would silently lie to scripts. Typical cause: shrinking a window below its minimum size when it already sits at that minimum. - If the frame cannot be re-read after the operation, the command succeeds with a
warningthat the reported bounds may be stale.
- Partially applied (frame changed but missed the request): the command still succeeds,
maximizeis background-safe geometry, not macOS full screen and not a green-button toggle. Peekaboo pins the selected exact window ID, chooses the screen with the greatest overlap, and applies that screen's visible frame with a 750 ms per-message AX deadline off MainActor. It never activates the app, enters full screen, or switches Spaces.maximizeverifies the exact WindowServer frame for up to two seconds and fails rather than claiming success when the app ignores or constrains the request. A window already at the target visible frame is an idempotent no-op. The CLI then reads the exact ID back until its frame is stable before emittingnew_bounds.focusroutes through the exact CG window ID, makes the window main, raises it, and honors the global focus flags (--space-switchto jump Spaces,--bring-to-current-spaceto move the window instead, etc.). Success requires macOS Accessibility to report that exact window as focused and Workspace to report its app as frontmost.focus --verifyperforms a second command-level check against the exact focused window ID. A merely topmost/renderable sibling no longer counts as focused.window listfilters to renderable windows for interaction targeting: entries on non-zero layers, smaller than 60x60, fully transparent, or excluded from the Windows menu are dropped. The surviving windows keep their canonicalindexvalues, so indexes shown here can have gaps yet still match--window-index.- Window inventory is CG-first and generation-pinned. Accessibility only enriches titles, focus, minimized state, and AX-only windows on a detached per-process lane with a two-second default bound. If enrichment stalls, an updated host returns the verified CG rows promptly instead of holding the Bridge request after caller timeout; AX-only metadata may be omitted from that result.
window listreports anObservationline for every row. JSON includesobservation_capabilityandobservation_capability_reasonalongsideis_frontmost,is_key,layer, and accessibilitysubrole.combined_eligiblemeans Accessibility exposed the same exact WindowServer ID and the raster route was verifiable, so combined screenshot and element inspection is eligible; this is route eligibility, not a guarantee that AX traversal will return usable elements, and the attempt can still fail withACCESSIBILITY_INCOMPLETE.pixels_onlywith reasonno_matching_accessibility_windowmeans a complete AX enumeration found no exact counterpart for the verified WindowServer row; capture it withpeekaboo see --window-id <id> --no-elementsinstead of first attempting combined observation.unknownwith reasonaccessibility_enumeration_incompletemeans a timeout or partial AX enumeration could not determine eligibility, whileraster_capture_unverifiedmeans an AX-only row lacked stable capture metadata. Refresh the inventory before choosing a mode. An omitted JSON capability means an older host did not report this additive evidence and likewise must not be treated as safe for combined observation. When no window selector is supplied, interaction commands prefer the exact key/frontmost window, then titled standard windows over small untitled panels.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 72 lines · 0 tokens per session scan A 1b94fa801211
window is a command published in the GitHub repository openclaw/Peekaboo (5,088 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,065 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
upload
Archive, upload, and submit to external TestFlight (full loop with monitor).
release
Create a new Remarc release using the automated GitHub Actions workflow.
imark-review
Open a markdown document in Imark for review and wait for the reviewer's notes.
imark-notes
Read the Imark comments out of a markdown file.
archive
Create xcarchive for TestFlight.
build
Build debug and launch HomeClaw.