winui-ui-testing

A guide for automatically testing Windows desktop interfaces through UI Automation, the accessibility system that lets software inspect and operate controls.

In plain words
What is it for?
Exploring an app's controls, creating PowerShell test scripts, checking text boxes, combo boxes, and toggles, testing shortcuts and typing, and exercising file dialogs or drag-and-drop.
Why use it?
It replaces repeated manual clicking with scripted checks that can verify controls, values, keyboard input, and application behavior in one test run.

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/microsoft/win-dev-skills/winui-ui-testing
Any agent
npx skills add microsoft/win-dev-skills --skill winui-ui-testing
Clone the repo
git clone --depth 1 https://github.com/microsoft/win-dev-skills

Made for: Claude Code, Codex.

Per session 122 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,085 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.00122 $0.06085
Opus 5 $0.00061 $0.03043
Sonnet 5 $0.00024 $0.01217
Haiku 4.5 $0.00012 $0.00609

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

Security

Grade A, and why

winui-ui-testing 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 3d 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.

plugins/winui/agent-plugin/skills/winui-ui-testing/SKILL.md · 369 lines

How it starts

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

Scope — any Windows app

winapp ui drives Windows UI Automation (UIA), the accessibility layer every Windows UI framework exposes, so the AutomationId-based approach in this skill works on any Windows desktop app: Win32, WPF, WinForms, and WinUI 3, packaged or unpackaged. The file-picker tests below already drive the OS's Win32 file dialog through the same verbs. For a non-WinUI app, use the same verbs and script template and skip the WinUI-specific gotchas (x:Bind LostFocus commit, ContentDialog selectors, MSIX relaunch).

Approach

The goal of this skill is to validate UI and app functionality automatically, without manual interaction, by exercising the app's UI elements, verifying their state, and asserting that the app behaves as expected under test conditions.

There are two main approaches:

  1. Interactive exploration — manually run the app, use winapp ui <command> to explore the UI tree, find AutomationIds, verify element properties, and test functionality interactively. This is useful for discovery, but slow and expensive if repeated for every test iteration.
  2. Scripted batch testing — generate a ui-tests.ps1 script that exercises all UI elements and asserts expected behavior in one pass. This allows you to run the tests automatically, capture results, and iterate quickly without manually interacting with the app each time.

Unless the user asked for interactive exploration, or you are unfamiliar with the code/app or need to explore the UI tree to discover AutomationIds for hidden or dynamically generated elements (flyouts, dialogs, lazy-loaded content), prefer scripted batch testing — it is faster, repeatable, and produces a record of pass/fail results that can be reviewed and acted on.

winapp ui Verbs

  • Query: status, list-windows, inspect, search, get-property, get-value, get-focused, wait-for
  • Interact: invoke, click, set-value, focus, scroll, scroll-into-view
  • Advanced input: send-keys (synthetic keyboard + accelerators), hover (tooltips/flyouts), drag (drag-drop, reorder, sliders), touch (tap/swipe/pinch/stretch), pen (stylus ink, pressure/tilt/eraser)
  • Capture: screenshot, record (H.264 MP4 video)

Read the full file on GitHub · 369 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. 3d ago First seen · 369 lines · 122 tokens per session scan A 1b6164a6b6cd

Subscribe to this mod's changes

winui-ui-testing is a skill published in the GitHub repository microsoft/win-dev-skills (406 stars, last pushed 6d ago), licensed MIT. It adds 122 tokens to every session and 6,085 once invoked, about $0.0006 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

playwright-testing

Generer og kjør Playwright E2E-tester for webapplikasjoner med page objects, auth fixtures og tilgjengelighetstester.

navikt/copilot · 33 tokens

technical-design-doc-creator

Creates comprehensive Technical Design Documents (TDD) with mandatory and optional sections through interactive discovery. Use when user asks to "write a design doc", "create a TDD", "technical spec", "architecture document", "RFC", "design proposal", or needs to document a technical decision before implementation. Do…

tech-leads-club/agent-skills · 86 tokens

spec-driven-eval

Scores how completely an implementation fulfills a PRD/spec, case by case, and produces a single comparable final grade. Invoke only when explicitly named (e.g. run spec-driven-eval); do not auto-trigger. Use when benchmarking spec-driven implementations, grading acceptance criteria, evaluating whether a feature was…

tech-leads-club/agent-skills · 123 tokens

content-to-pipeline

When the user wants to turn content into revenue, build a content-led GTM motion, reverse engineer distribution, or repurpose content across platforms. Also use when the user mentions 'content marketing,' 'content-led growth,' 'content to pipeline,' 'distribution,' 'content repurposing,' 'content strategy,' 'thought…

tech-leads-club/agent-skills · 111 tokens

domain-identification-grouping

Groups existing components into logical business domains to plan service-based architecture. Use when asking "which components belong together?", "group these into services", "organize by domain", "component-to-domain mapping", or planning service extraction from an existing codebase. Do NOT use for identifying new…

tech-leads-club/agent-skills · 78 tokens

frontend-blueprint

AI frontend specialist and design consultant that guides users through a structured discovery process before generating any code. Collects visual references, design tokens, typography, icons, layout preferences, and brand guidelines to ensure the final output matches the user's vision with high fidelity. Use when the…

tech-leads-club/agent-skills · 170 tokens