windows-harness

windows-harness is a skill for Claude Code, Codex from browser-use/windows-harness. It costs 66 tokens per session (4,784 once invoked), scanned A, original, MIT.

A tool for controlling a Windows desktop from a persistent Python session. It can work with applications, web pages, dialogs, files, screenshots, and the clipboard.

In plain words
What is it for?
Use it to inspect windows, type and click, read interface elements, take screenshots, automate browsers, paste clipboard content, run PowerShell, and manage files.
Why use it?
It helps automate tasks that require visible desktop interaction, including native Windows programs and browser-based applications. Keeping one session open preserves state across multiple actions.

Skill for Claude CodeCodex

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/browser-use/windows-harness/windows_harness
Any agent
npx skills add browser-use/windows-harness --skill windows_harness
Clone the repo
git clone --depth 1 https://github.com/browser-use/windows-harness

Made for: Claude Code, Codex.

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 windows-harness

README.md
[![agentmods](https://agentmods.dev/badge/skills/browser-use/windows-harness/windows_harness.svg)](https://agentmods.dev/skills/browser-use/windows-harness/windows_harness)
Your own site
<a href="https://agentmods.dev/skills/browser-use/windows-harness/windows_harness"><img src="https://agentmods.dev/badge/skills/browser-use/windows-harness/windows_harness.svg" alt="Measured on agentmods" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 4,784 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.00066 $0.04784
Opus 5 $0.00033 $0.02392
Sonnet 5 $0.00013 $0.00957
Haiku 4.5 $0.00007 $0.00478

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

Security

Grade A, and why

windows-harness 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 5d ago.

The scan reads SKILL.md. This mod also ships 13 executable files (__init__.py, annotation.py, browser.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

src/windows_harness/SKILL.md · 387 lines

How it starts

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

Windows Harness

Use one CLI call per decision point, not per primitive:

windows-harness <<'PY'
app = "Notepad"
win.see(app)
win.type("hello", app=app)
print(win.see(app))
PY

The CLI preloads win, lazy browser, Path, and subprocess. Prefer bounded stdin programs; reserve windows-harness repl for manual exploration and always exit it.

How to invoke: exactly two forms

One-off questions — use a subcommand (identical in PowerShell, cmd, and bash):

windows-harness apps                 # app inventory, compact JSON (--all adds system windows)
windows-harness see "CC Switch"      # one screenshot -> JSON with its "path"
windows-harness state "Notepad"      # UIA tree as JSON (--screenshot adds image)

Anything multi-step — write a .py file, then run it. No quoting or encoding traps in any shell; this is always the most reliable channel:

windows-harness run task.py          # win, browser, Path, subprocess preloaded

Write generated task scripts to the harness scripts dir (printed by windows-harness doctor as scripts_dir, default %USERPROFILE%\.windows-harness\scripts); run resolves bare filenames there. Never write task scripts into the caller's working directory or invent ad-hoc folders like .windows-harness-temp/ — they pollute the user's repo and show up as untracked files. Never run them via python script.py / python -c either: bypassing windows-harness run also bypasses the preloaded win session, so every call pays a fresh interpreter start and loses the element table behind element_index.

Never use <<'PY' heredocs outside bash; never enumerate windows through hand-rolled C#/PowerShell — win.list_apps() already did it. Screenshots land in %TEMP%\windows-harness-*.png and persist: the returned "path" stays readable after the CLI exits, so just open it. Set WINDOWS_HARNESS_OVERLAY=off to skip the pointer renderer for minimum latency.

Delivery: foreground first

Every input primitive takes delivery="foreground" (default) or delivery="background".

Read the full file on GitHub · 387 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. 5d ago First seen · 387 lines · 66 tokens per session scan A 1d2f0c9e78d9

Subscribe to this mod's changes

windows-harness is a skill published in the GitHub repository browser-use/windows-harness (61 stars, last pushed 10d ago), licensed MIT. It adds 66 tokens to every session and 4,784 once invoked, about $0.0003 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-30.

Related

Other skills, from other repositories

use-agent-browser-for-airi

Test AIRI display-model imports with agent-browser across stage-tamagotchi Electron, stage-web, and stage-pocket mobile web layouts. Use when uploading and verifying contributor-supplied Live2D ZIP, VRM, or MMD ZIP/PMX/PMD files through AIRI's model selector, including onboarding bypass, format-specific import…

moeru-ai/airi · 87 tokens

opencli-sitemap-author

Use when creating or maintaining OpenCLI site sitemaps: agent-facing navigation, page-state, action, workflow, API-reference, pitfall, and fallback knowledge for a website. Use after browser exploration discovers durable site context, when a sitemap is stale, or when promoting local site knowledge into the repo.

jackwener/OpenCLI · 67 tokens

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

every-app/open-seo · 35 tokens

interactive-login

How to complete browser/interactive logins (aws / gh / glab / gcloud). The platform backgrounds the login poller so it survives the human's browser round-trip — and when that does NOT work.

yc-software/qm · 46 tokens

pinchtab-mcp

Use this skill when a task requires browser automation through PinchTab's MCP server connected to a remote browser instance. Covers navigation, element interaction, data extraction, form filling, multi-step flows, and session management via MCP tools.

pinchtab/pinchtab · 52 tokens

azure-messaging-webpubsub-java

Build real-time web applications with Azure Web PubSub SDK for Java. Use when implementing WebSocket-based messaging, live updates, chat applications, or server-to-client push notifications.

microsoft/skills · 43 tokens