control-window

control-window is a skill for Claude Code, Codex from shahriarshm/planchette. It costs 80 tokens per session (979 once invoked), scanned A, original, MIT.

Instructions for controlling another macOS application through its window, using screenshots and mouse or keyboard actions. It relies on the planchette command and requires macOS permissions for screen recording and accessibility.

In plain words
What is it for?
Use them to click buttons, type, press keys, scroll, capture screenshots, and read or operate a non-terminal app window.
Why use it?
They provide a repeatable way to inspect what is on screen, choose the next action, and check the result instead of guessing coordinates or application state.

Skill for Claude CodeCodex

Part of the planchette plugin — 1 skill, 1 command, 1 MCP server shipped together

Install

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.

agentmods
npx agentmods add skills/shahriarshm/planchette/control-window
Any agent
npx skills add shahriarshm/planchette --skill control-window
Clone the repo
git clone --depth 1 https://github.com/shahriarshm/planchette

Made for: Claude Code, Codex.

Or install planchette, the plugin that ships this one along with the rest of its 1 skill, 1 command, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for control-window

README.md
[![agentmods](https://agentmods.dev/badge/skills/shahriarshm/planchette/control-window.svg)](https://agentmods.dev/skills/shahriarshm/planchette/control-window)
Your own site
<a href="https://agentmods.dev/skills/shahriarshm/planchette/control-window"><img src="https://agentmods.dev/badge/skills/shahriarshm/planchette/control-window.svg" alt="Measured on agentmods" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 979 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What 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.

ModelPer sessionOnce invoked
Fable 5 $0.00080 $0.00979
Opus 5 $0.00040 $0.00490
Sonnet 5 $0.00016 $0.00196
Haiku 4.5 $0.00008 $0.00098

Measured 4d ago against content hash c041e8367ca7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

control-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 4d ago.

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.

skills/control-window/SKILL.md · 71 lines

How it starts

The opening of the file, as written. The whole thing — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Controlling a macOS window

You drive a real macOS window through the planchette CLI. You ARE the agent loop: capture the window, look at it, decide the next action, run it, look again.

Prerequisites

  • planchette must be on PATH (uv tool install . from the plugin repo).
  • The terminal app running your agent needs Screen Recording and Accessibility permission (System Settings → Privacy & Security). Without them, captures come out black and input does nothing.

The loop

  1. Pick the target window. Run planchette pick. A dim overlay appears — tell the user to hover the window they want and click it (Escape cancels). The command blocks until they click, so allow a generous timeout (e.g. 120s). On success it selects and raises that window. If the user already named the app, skip the overlay: planchette pick --name "Telegram" selects the frontmost match by app/title substring, and planchette pick --list shows the candidates.

  2. Capture. Run planchette capture. It prints PATH WIDTHxHEIGHT. View that PNG with your file-reading/image tool. Every coordinate you pass below is a pixel in this image: (0,0) at top-left, up to WIDTH×HEIGHT.

  3. Act — one action, then look again. Pick the single next step toward the goal and run the matching command:

    • planchette click X Y — left click (--double for double-click, --right for a context menu)
    • planchette drag X1 Y1 X2 Y2 — press-drag-release: select text, move sliders, drag & drop
    • planchette move X Y
    • planchette type "text" — types into the selected window; click the field first
    • planchette key "cmd+t" — combos use cmd/ctrl/alt/shift + a key; add --repeat N to press it N times (e.g. arrow-key navigation)
    • planchette scroll X Y up|down [lines]

    Text too small to read in the capture? planchette capture --crop X Y W H saves a native-resolution zoom of that region (coords in last-capture pixels). It's a magnifier only — keep computing click coordinates in the full capture's space.

Read the full file on GitHub · 71 lines

Changes

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.

  1. 4d ago First seen · 71 lines · 80 tokens per session scan A c041e8367ca7

Subscribe to this mod's changes

control-window is a skill published in the GitHub repository shahriarshm/planchette (0 stars, last pushed 2mo ago), licensed MIT. It adds 80 tokens to every session and 979 once invoked, about $0.0004 per session on Opus 5. 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-31.

Related

Other skills, from other repositories

macos-harness

Control a whole Mac from one persistent Python session with screenshots, PID-targeted input, an animated virtual pointer, targeted Apple Accessibility, Apple Events, Browser Harness CDP, and filesystem access. Use for native, Electron, browser, dialog, file, or cross-app tasks without moving the physical cursor or…

browser-use/macos-harness · 71 tokens

host-computer-use

Beta desktop control through the connected A0 CLI host. Use for the user's host/local computer screenshots, screen inspection, menus, native app UI, OS-level clicking, scrolling, typing, or checking computeruseremote status. Use instead of linux-desktop for host/local machine control. Do not use for ordinary browser…

agent0ai/agent-zero · 78 tokens

macos-computer-use

Skill "macos-computer-use" from furkangonel/cowrangler, covering macos computer use (arka plan, model bağımsız), standart i̇ş akışı, capture modları, aksiyonlar and arka plan kuralları.

furkangonel/cowrangler · 28 tokens

apple-notes

Manage Apple Notes via memo CLI: create, search, edit.

mateaix/mateclaw · 17 tokens

data-analysis

Analyze, explore, clean, and visualize datasets with statistical rigor. Use when user asks to analyze data, find patterns, compute statistics, create visualizations, clean messy data, or explore a dataset. Trigger when user says things like "analyze this data", "what trends do you see", "find patterns in", "create a…

Upsonic/Upsonic · 138 tokens

summarization

Summarize documents, articles, conversations, code, and technical content into concise, accurate summaries. Use when user asks to summarize, condense, create a TL;DR, write an executive summary, extract key points, or distill content. Trigger when user says things like "summarize this", "give me the key points"…

Upsonic/Upsonic · 144 tokens