Agent skill

Windows CLI

by sbroenne in sbroenne/mcp-windows

Guidance for driving Windows desktop automation from the wincli command-line tool - the token-efficient entry point that mirrors the Windows MCP server.

MITAuto-check passedProductivity & Automation

Install Windows CLI

skills CLI
$ npx skills add sbroenne/mcp-windows --skill windows-cli -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install sbroenne/mcp-windows windows-cli --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/sbroenne/mcp-windows.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugin/skills/windows-cli .claude/skills/windows-cli && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
windows-cli
GitHub stars
105
Token cost
~1.8k tokens
SKILL.md length
898 words
Files
1
Skills in repo
3
Repo updated
First seen
Licence
MIT

At a glance

Guidance for driving Windows desktop automation from the wincli command-line tool - the token-efficient entry point that mirrors the Windows MCP server.

  • Works in 7 steps: Observe existing windows with wincli… → wincli ui snapshot --window --mode auto… → wincli ui find|click|type|select|read… → …
  • A coding agent has shell access and wants one compact command surface instead of many MCP tool schemas
  • SKILL.md covers Context, Discovery (do this first), Preferred workflow and Patterns, plus 1 more section
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Windows CLI is an agent skill from sbroenne/mcp-windows. Guidance for driving Windows desktop automation from the wincli command-line tool - the token-efficient entry point that mirrors the Windows MCP server. Use when a coding agent has shell access and wants one compact command surface instead of many MCP tool schemas.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in Productivity & Automation, covering MCP servers and Desktop control. It works with Model Context Protocol, .NET and Windows. The repository describes itself as: Let AI agents control Windows applications. Click buttons, type text, toggle settings — all by name, not coordinates. Uses the Windows UI Automation API to find UI elements… The licence is MIT.

When your agent uses it

  • A coding agent has shell access and wants one compact command surface instead of many MCP tool schemas
  • Tasks that involve MCP servers
  • Tasks that involve Desktop control

Example prompts

  • “/windows-cli”

Workflow steps

7 steps, taken from the first numbered list in SKILL.md.

  1. Observe existing windows with wincli window find --title or launch with wincli app --path .
  2. wincli ui snapshot --window --mode auto to see controls and establish a baseline for repeated observations.
  3. wincli ui find|click|type|select|read --window ... for normal controls.
  4. wincli ui read-table --window --element-id to pull an observed grid/table into structured rows + headers.
  5. wincli file-save --window --path for supported Save / Save As dialogs.
  6. wincli clipboard get|set|clear for fast bulk text IO; keep reusable ui batch steps
  7. Fall back to wincli screenshot, wincli mouse, or wincli keyboard only for custom-drawn UI.

What it can do on your machine

Read from SKILL.md and the folder at commit a76b3ee. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Windows CLI loads about 1.8k tokens when it runs. Until then it costs about 69 tokens; SKILL.md has 898 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~69
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from sbroenne/mcp-windows at commit a76b3ee, republished under its MIT licence (© sbroenne). 898 words, ~1,768 tokens.

Download SKILL.mdSave it as .claude/skills/windows-cli/SKILL.md (or your agent's skills folder).
name
windows-cli
description
Guidance for driving Windows desktop automation from the wincli command-line tool - the token-efficient entry point that mirrors the Windows MCP server. Use when a coding agent has shell access and wants one compact command surface instead of many MCP tool schemas.
domain
windows-automation
confidence
high
source
plugin

Context

wincli is the command-line twin of the Windows MCP server. Every command calls the exact same underlying tool through a persistent user-owned CLI daemon. When you already have a shell, discover only the commands you need instead of loading every MCP tool schema. The context saving depends on the host's tool-loading behavior. IDs from CLI discovery can be reused across commands against that daemon. MCP instances have separate owners; never transfer their IDs to the CLI.

Discovery (do this first)

  • wincli --help - the command map and a common workflow.
  • wincli tools - every command with its options.
  • wincli tools --json - machine-readable tool manifest (names, descriptions, JSON input schemas); the same surface the MCP server exposes via tools/list, not a CLI flag schema. Use tools for kebab-case CLI spellings.
  • wincli guidance - CLI lifetime limitations followed by the shared semantic-automation guide.

Preferred workflow

  1. Observe existing windows with wincli window find --title <part> or launch with wincli app --path <exe>. Inspect launchStatus and window/windows: the handle may be missing or ambiguous. Inspect candidates or rediscover with window find; do not continue with handle-based commands until the intended target is identified. possibleHandoff does not confirm delivery or loaded content; verify the intended page/document before acting.
  2. wincli ui snapshot --window <handle> --mode auto to see controls and establish a baseline for repeated observations.
  3. wincli ui find|click|type|select|read --window <handle> ... for normal controls.
  4. wincli ui read-table --window <handle> --element-id <grid-id> to pull an observed grid/table into structured rows + headers. For a web page, add --format article to wincli ui read to get clean main-content text (nav/breadcrumb chrome and inline link URLs stripped, headings/lists as markdown).
  5. wincli file-save --window <handle> --path <file> for supported Save / Save As dialogs. Use wincli file-open --window <handle> --path <file> for Open flows. Inspect remaining dialogs after failure or confirmation_required. Choose any confirmation, cancellation, or correction explicitly; do not automatically repeat the helper.
  6. wincli clipboard get|set|clear for fast bulk text IO; keep reusable ui batch steps in project JSON files and run them with --steps-file.
  7. Fall back to wincli screenshot, wincli mouse, or wincli keyboard only for custom-drawn UI.

Patterns

Semantic-first automation
  • Discover elements with ui find using --name, --control-type, or --automation-id. Pass the returned --element-id to click/type/select/read/read-table; action selectors are rejected. Omit the ID only for an intentional whole-window ui read --window <h>.
  • Add --with-snapshot to ui click/ui type/ui select to get the updated tree back in the same call (perceive + act fused - avoids a second round trip).
  • Use ui batch --window <h> --steps '<json>' to run an ordered sequence (e.g. [{"action":"find","automationId":"UsernameInput","requireUnique":true},{"action":"type","elementId":"$prev","text":"me"}]) in a single invocation.
Waiting
  • Use ui wait --window <h> --name <x> (or --mode disappear) instead of sleeping, so automation checks an observable condition within a bounded timeout after dialogs, navigation, or tab switches.
  • Use ui wait --mode state --element-id <id> --desired-state enabled, or a batch discovery then {"action":"wait","mode":"state","elementId":"$prev","desiredState":"enabled"}, $prev must refer to one unambiguous immediately preceding result.
Element-ID lifetime
  • Reuse CLI IDs while their observed controls and daemon owner remain alive.
  • Replacement, eviction, or daemon restart invalidates old IDs. Rediscover; stale IDs never retarget by name.
  • Discovery supports --parent-element-id and --near-element from the same owner.
  • Reusable batches should discover controls afresh and consume same-run $prev, never persisted literal IDs.
  • CLI ui snapshot --mode auto returns a full baseline without --since <snapshotToken>. Supply that token for checked diffs; interleaved callers may safely receive a full snapshot.
  • Combine --with-snapshot --snapshot-mode auto --since <snapshotToken> for a post-action comparison. A full fallback is normal when a diff is unsafe or too large.
Show full SKILL.md (312 more words)Show less
Outcome verification
  • A successful click means input was dispatched, not that the requested application outcome completed.
  • Use a read, snapshot, or bounded wait to check the expected result.
  • Do not repeat a click solely because its target disappeared or its label changed.
  • If the response is lost after sending an action, inspect the current state before deciding what to do.
Application arguments
  • --args and --arguments are aliases. For child arguments beginning with --, use equals: wincli app --path C:\Tools\local-app.exe --args="--new-window target".
  • Separate --args "--new-window target" is deliberately rejected, even when quoted as one value. Missing values are also usage errors (exit 2); no application launches. The equals form preserves the complete argument string. Ordinary values work as --args "local document.txt".
Reusable batches
  • Keep a proven steps JSON array in your project.
  • Run it with wincli ui batch --window <h> --steps-file workflow.json.
  • Discover fresh targets on every run; do not store literal element IDs.
Clipboard
  • wincli clipboard set --text "<value>" then paste with wincli keyboard press --key v --modifiers ctrl.
  • Copy in the app (wincli keyboard press --key c --modifiers ctrl) then wincli clipboard get to read it.
Exit codes (script on these)
  • 0 success, 1 tool error (inspect the JSON error field), 2 usage error (bad arguments).
Output
  • stdout is the tool's JSON payload - parse it directly. Use --include-diagnostics (alias --diagnostics) on ui operations, file-open, or file-save for available diagnostic detail. Their command aliases have the same support; other command groups reject these flags. Diagnostics are not a global option.

Anti-patterns

  • Do not start with mouse/screenshot clicks when the app exposes accessible controls.
  • Do not save files with raw keyboard press --key s --modifiers ctrl when a Save As dialog may appear; use file-save.
  • Do not assume coordinates are stable across machines, themes, or display scaling.
  • Do not keep re-launching an app to "retry" - inspect existing windows and identify the intended target instead.

© sbroenne, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugin/skills/windows-cli of sbroenne/mcp-windows.

Open the folder on GitHubat commit a76b3ee

Compare with similar skills

Windows CLI next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Windows CLI compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Windows CLI this skillsbroenne/mcp-windows105—~1.8kAutomated safety check: PassMIT
Isolated Linux Agent Workspaceagent-sh/agent-workspace-linux185—~2.1kAutomated safety check: PassMIT
Windows QA EngineerCodeAlive-AI/ai-driven-development155—~1.4kAutomated safety check: PassMIT
Amazon Workspaces Agent Accessaws/agent-toolkit-for-aws2.8k—~2.7kAutomated safety check: PassApache-2.0
Linux Desktop Controlagent-sh/computer-use-linux661—~2.7kAutomated safety check: PassMIT
Browser MCP Agentantibrow/anti-detect-browser-skills9141 repos~4.2kAutomated safety check: WarnMIT

Similar skills

  • Isolated Linux Agent Workspace

    agent-sh/agent-workspace-linux

    Drives a hidden, agent-owned Linux desktop and browser over MCP for GUI testing and web automation without touching the user's real desktop.

    185 GitHub stars~2.1k tokensUpdated 4 days ago
    Productivity & AutomationAuto-check passed
  • Windows QA Engineer

    CodeAlive-AI/ai-driven-development

    A skill your agent uses when testing Windows 11 desktop apps (WinForms/WPF/UWP) via UFO UIA/Win32 automation MCP.

    155 GitHub stars~1.4k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Amazon Workspaces Agent Access

    aws/agent-toolkit-for-aws

    Official

    Connects AI agents to remote Windows desktop applications on Amazon WorkSpaces Applications (AppStream 2.0) through the managed Agent Access MCP server, and guides reliable desktop automation.

    2.8k GitHub stars~2.7k tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Linux Desktop Control

    agent-sh/computer-use-linux

    Lets an agent observe and operate a local Linux desktop through the computer-use-linux MCP server or Pi tools: accessibility trees, screenshots, windows and input.

    661 GitHub stars~2.7k tokensUpdated 3 days ago
    Productivity & AutomationAuto-check passed
  • Browser MCP Agent

    antibrow/anti-detect-browser-skills

    Give an AI agent its own real browser over MCP tool calls - launch, navigate, click, fill, screenshot, extract text, run JS - with a kernel-level real-device fingerprint and a persistent profile, so…

    914 GitHub starsUsed in 1 repo~4.2k tokens
    Productivity & AutomationAuto-check: warnings
  • Altic Studio

    altic-dev/altic-mcp

    macOS automation skill for AppleScript actions and Chrome browser control via MCP CDP tools.

    172 GitHub stars~3.3k tokensUpdated 2 mo ago
    Productivity & AutomationAuto-check passed

More from sbroenne/mcp-windows

  • Code Review

    sbroenne/mcp-windows

    Review pull requests in mcp-windows for concrete bugs in MCP and CLI contracts, Windows UI automation, element identity, snapshots, bounded searches, and service lifetime.

    105 GitHub stars~1.6k tokensUpdated yesterday
    Auto-check passed
  • Windows Automation

    sbroenne/mcp-windows

    Guidance for reliable, token-efficient Windows automation through MCP.

    105 GitHub stars~1.5k tokensUpdated yesterday
    Auto-check passed

Questions about Windows CLI

What does Windows CLI do?

Guidance for driving Windows desktop automation from the wincli command-line tool - the token-efficient entry point that mirrors the Windows MCP server. Windows CLI is an agent skill from sbroenne/mcp-windows. Guidance for driving Windows desktop automation from the wincli command-line tool - the token-efficient entry point that mirrors the Windows MCP server.

When should I use Windows CLI?

Windows CLI fits situations like: A coding agent has shell access and wants one compact command surface instead of many MCP tool schemas; tasks that involve MCP servers; tasks that involve Desktop control.

How do I install Windows CLI in Claude Code?

Run `npx skills add sbroenne/mcp-windows --skill windows-cli -a claude-code`. Or copy the skill folder (plugin/skills/windows-cli in sbroenne/mcp-windows) into .claude/skills/windows-cli in your project. Claude Code loads it when a task matches its description.

How do I install Windows CLI in Codex?

Run `npx skills add sbroenne/mcp-windows --skill windows-cli -a codex`. Or copy the skill folder (plugin/skills/windows-cli in sbroenne/mcp-windows) into .agents/skills/windows-cli in your project. Codex loads it when a task matches its description.

Can I use Windows CLI in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add sbroenne/mcp-windows --skill windows-cli -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/windows-cli, .gemini/skills/windows-cli, .github/skills/windows-cli and .opencode/skills/windows-cli in your project.

What does Windows CLI need to run?

SKILL.md names no scripts, command-line tools or credentials: Windows CLI is instructions for the agent only.

Does Windows CLI access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Windows CLI safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Windows CLI use?

Windows CLI is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Windows CLI use?

About 1.8k tokens (SKILL.md is roughly 7.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Windows CLI?

Skills that share tags, products or a category with Windows CLI: Isolated Linux Agent Workspace (agent-sh/agent-workspace-linux, 185 stars), Windows QA Engineer (CodeAlive-AI/ai-driven-development, 155 stars), Amazon Workspaces Agent Access (aws/agent-toolkit-for-aws, 2.8k stars) and Linux Desktop Control (agent-sh/computer-use-linux, 661 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Windows CLI?

sbroenne (a GitHub user) maintains it in sbroenne/mcp-windows, which has 105 GitHub stars. The repository holds 3 skills in this directory. The repository was last updated on October 6, 2026.

Source: sbroenne/mcp-windows on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.