eric-patton

Cwin — AI skill for Claude Code

AI community

Windows CLI that screenshots, clicks and types into any window without stealing focus, so an AI coding agent can drive a GUI while you keep working.

How to install Cwin

This entry records only its repository, not the path inside it, so there is no exact command to give. Open eric-patton/cwin and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Cwin does

Windows CLI that screenshots, clicks and types into any window without stealing focus, so an AI coding agent can drive a GUI while you keep working. Layers PostMessage, UI Automation and SendInput and picks the right one per app framework.

Alternatives in AI

  • AIHawk — Open-source AI browser agent: describe any task in plain language and it autonomously browses, clicks, types a 30.3k ★
  • Pro Workflow — 1,400+ Battle-tested Claude Code workflows from power users 1.4k ★
  • NotebookLM Research Agent — A fully autonomous AI research agent that ingests sources into Google NotebookLM, runs deep web research, synt 168 ★

README

cwin

A small Windows CLI that lets you (or an LLM coding agent like Claude Code) drive **any** visible window on a Windows 11 machine — screenshot it, click in it, send keys to it, resize and move it — **without stealing focus** in the common case. Built so an interactive session can have the agent iterate on a UI in one window while you keep working in another.

cwin list
cwin shot   --title "MyApp" --out shot.png
cwin click  --title "MyApp" --x 200 --y 150
cwin click  --title "Calculator" --uia-id num7Button     # XAML — UIA path, no focus
cwin keys   --title "MyApp" --text "hello world"
cwin key    --title "MyApp" --key S --mods Ctrl
cwin uia    --title "MyApp"                              # discover element ids
cwin pos    --title "MyApp" --anchor bottom-right        # dock it out of the way
cwin background --title "MyApp"                          # drop to back of Z-order
cwin monitors                                            # list displays

`cwin --help` lists every subcommand; `cwin --help` dives in.

Why

When a person and an LLM iterate on UI work — a WPF app, a Godot game, a web frontend in a browser, an Electron tool — every loop usually requires the human to take a screenshot, click somewhere, type something, and tell the model what happened. cwin lets the model do it directly. The hard constraint, and the reason this isn't a one-liner around `SendInput`, is **don't disrupt the user**: no focus theft, no cursor jerks, no popping windows in front of what they're typing into.

That constraint forces a layered strategy:

layer API works on steals focus?
post PostMessage Win32, WPF, WinForms, Chromium/Electron no
uia UI Automation XAML/WinUI/UWP, WPF, Chromium/Electr