Windows Desktop Automation v2

    2

    Automate any Windows app with UI Automation, OCR, and hotkeys. Drive legacy/Citrix/RDP UIs. Python scripts for pywinauto + OpenCV.

    Free

    19 usesSecurity scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    windows-desktop-automation-v2

    Example session with this skill installed

    Automate the Order Entry app: search for customer 5502, click View Details, and save a screenshot of the result to the evidence folder.

    • Read your context and instructions
    • Compiled the windows-desktop-automation-v2
    • Found window: Order Entry.
    • Switched to UIA backend.
    • Located "Customer ID" field: typed "5502".
    • Clicked "View Details" button.
    • Verification: Detail view visible.
    • Success: Saved evidence/order_5502_result.png.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Windows Desktop Automation

    End-to-end Windows desktop automation for AI coding agents. Drive legacy applications, terminal emulators, Citrix windows, and GUI-only tools with the same rigor you apply to REST APIs.

    What it does

    This skill gives your AI agent a structured workflow for automating any Windows desktop application — even those with no CLI, no API, and no documented automation surface. It combines four proven techniques into one resilient stack:

    • UI Automation (pywinauto + UIA) for native Win32, WPF, WinForms, and Qt apps
    • Hotkey/Macro layer for keyboard-shortcut-driven workflows
    • Image recognition (OpenCV + Tesseract OCR) for Citrix, RDP, custom-drawn, and remote-desktop UIs
    • Resilience patterns — retry, recovery, evidence capture, and human-in-the-loop fallback

    It enforces a "sniff → classify → select → execute → verify" cycle before any click or keypress, dramatically reducing the silent-failure problem that kills most RPA scripts.

    When to use it

    • The target app has no API, no CLI, and no automation hooks
    • You need to drive Citrix, RDP, terminal emulators, or VB6/MFC legacy apps
    • Selenium/Playwright can't help (the UI is not in a browser)
    • You need screen-scraping + form-filling with audit trail
    • A human currently does the task and you want to hand it off to an agent

    Why it's better than ad-hoc prompting

    Most LLMs will try to pyautogui.click(540, 320) once and call it done. This skill is different:

    • It inspects the window tree first (Inspect.exe, uiautomation, pywinauto) before any action
    • It classifies the target control (Edit, Button, List, Tree, etc.) and picks the right interaction mode
    • It uses multiple locator strategies in parallel (UIA, name, class, image hash, OCR) and falls back gracefully
    • It captures screenshots before/after every step for postmortem
    • It never trusts a click — verifies state change with a follow-up read

    Architecture

    ┌──────────────────────────────────────────────────────────┐
    │                    Agent (Claude/Cursor)                 │
    │  - Translates intent into action plan                    │
    │  - Calls helper scripts via Bash                         │
    └───────────────┬──────────────────────────────────────────┘
                    │
                    ▼
    ┌──────────────────────────────────────────────────────────┐
    │             skills/windows-desktop-automation/           │
    │  scripts/                                                │
    │    ├── sniff_window.py     # UIA + window tree dump      │
    │    ├── classify_target.py  # Control type + locator plan │
    │    ├── act.py              # Click/type/scroll + verify  │
    │    ├── ocr_click.py        # Image+OCR fallback          │
    │    ├── hotkey.py           # Global hotkey macros         │
    │    └── evidence.py         # Screenshot + log capture    │
    │  references/                                              │
    │    ├── locator-strategies.md                              │
    │    ├── citrix-rdp-gotchas.md                              │
    │    └── uia-cheatsheet.md                                 │
    └──────────────────────────────────────────────────────────┘
    

    Quick start

    # 1. Install
    pip install pywinauto opencv-python pytesseract pillow psutil
    
    # 2. Sniff a window to discover its controls
    python scripts/sniff_window.py --title "Order Entry"
    
    # 3. Drive an action
    python scripts/act.py --window "Order Entry" \
      --action type --control "Customer ID" --value "ACME-001"
    
    # 4. If UIA fails, fall back to image+OCR
    python scripts/ocr_click.py --window "Order Entry" \
      --template templates/submit_button.png
    

    Supported scenarios

    ScenarioToolReliability
    Native Win32/WPF/WinFormspywinauto UIA backend★★★★★
    Qt appspywinauto + UIA★★★★
    Java Swingpywinauto + JAB★★★★
    Citrix / RDPOCR + image templates★★★
    Custom-drawn legacyOCR + image templates★★
    Browser-as-UIPlaywright (use that instead)★★★★★

    Installation

    Claude Code / OpenClaw / Codex CLI

    npx agensi install windows-desktop-automation
    

    Manual

    Download windows-desktop-automation.zip and unzip to ~/.claude/skills/ (or your agent's skills directory).

    Example usage

    "Open SAP GUI, navigate to transaction VA01, create a sales order for customer ACME-001, and dump the resulting order number to a JSON file."

    The skill will:

    1. Launch SAP GUI and wait for the main window
    2. Sniff the tree, locate the transaction code field
    3. Type "VA01", press Enter, wait for the new screen
    4. Re-sniff, locate the Order Type field
    5. Drive the multi-step form with locator+image fallback
    6. Capture the resulting order number from the status bar
    7. Write JSON + screenshots to ./evidence/

    Common failure modes (and how this skill handles them)

    • Window not found → polls every 500ms up to 30s, then OCR fallback
    • Control not enabled → waits + retries, then captures evidence
    • Modal dialog appears → auto-detects via window-tree diff, dismisses or escalates
    • Stale element reference → re-sniffs and re-locates
    • OS DPI scaling mismatch → normalizes via GetDpiForWindow
    • Locked workstation → checks GetForegroundWindow, refuses to run

    Pricing

    Single-purchase, lifetime access. Includes:

    • All 6 helper scripts
    • 3 reference docs (locator strategies, Citrix gotchas, UIA cheatsheet)
    • 5 example workflows
    • Future updates for the same major version

    Support

    GitHub-style issues aren't open for marketplace items. For help, contact via the creator's page — typically a 48-hour response window.

    Compatibility

    Works with any agent that supports the SKILL.md standard and can execute Python: Claude Code, OpenClaw, Codex CLI, Cursor, Gemini CLI, Cline, Windsurf, Aider. Tested on Windows 10/11, Server 2019+.

    Tags

    windows, automation, desktop, ui-automation, pywinauto, ocr, rpa, devops, citrix, rdp, legacy

    • Does not work on macOS or Linux.
    • Requires an unlocked Windows session (no lock screen).
    • OCR accuracy depends on image quality and font.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    19 uses

    Times used to date

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 4 months ago

    • Free with an Agensi account

    Requires

    Python
    Node.js

    Permissions

    Terminal / Shell
    Browser
    Listed4 months ago

    What's inside

    Frequently Asked Questions

    This skill is designed specifically for legacy or non-web applications (VB6, SAP, Citrix, or Delphi) where standard tools like Playwright or Selenium cannot reach the UI elements.

    It is compatible with any AI coding agent that can execute shell commands and Python, including Claude Code, Cursor, Windsurf, Aider, and Cline.

    Yes, the skill includes a fallback layer using OpenCV image recognition and Tesseract OCR to interact with apps that don't expose a standard UI tree, such as remote desktops and Citrix.

    The package includes a suite of six specialized Python scripts, three comprehensive strategy guides for UI navigation, several example workflows, and lifetime access to version 2 updates.

    The skill uses a 'sniff → verify' cycle that captures screenshots before and after every action, automatically handling modal pop-ups and stale references to ensure the agent doesn't get stuck.

    You will need a Windows environment (10, 11, or Server) with Python installed; the skill provides a one-line command to install necessary libraries like pywinauto and OpenCV.

    New in Workflow Automation

    Free