From plugin-windows-mcp
This skill should be used when the user asks about "Windows automation best practices", "reliable automation", "automation performance", "error handling in automation", "automation workflow design", "Windows MCP tips", "troubleshooting automation", "automation strategy", or needs guidance on designing robust, efficient, and maintainable Windows automation workflows.
npx claudepluginhub mustafaakben/plugin-windows-mcp --plugin plugin-windows-mcpThis skill uses the workspace's default tool permissions.
This skill provides principles and patterns for building reliable, efficient, and maintainable Windows automation workflows using Windows MCP tools.
Verifies tests pass on completed feature branch, presents options to merge locally, create GitHub PR, keep as-is or discard; executes choice and cleans up worktree.
Guides root cause investigation for bugs, test failures, unexpected behavior, performance issues, and build failures before proposing fixes.
Writes implementation plans from specs for multi-step tasks, mapping files and breaking into TDD bite-sized steps before coding.
This skill provides principles and patterns for building reliable, efficient, and maintainable Windows automation workflows using Windows MCP tools.
When a task can be accomplished via command line, use the Shell tool instead of GUI automation.
Why: Shell commands are faster, more reliable, and less affected by UI changes.
| Task | GUI Approach (Fragile) | CLI Approach (Preferred) |
|---|---|---|
| Create a folder | File Explorer + right-click + New Folder | Shell("New-Item -ItemType Directory -Path 'C:\\Folder'") |
| Copy files | File Explorer drag-and-drop | Shell("Copy-Item 'source' 'dest'") |
| Check disk space | Open This PC, read labels | Shell("Get-CimInstance Win32_LogicalDisk") |
| Install software | Download + click installer | Shell("winget install AppName") |
Use GUI only when: no CLI alternative exists, visual verification is essential, or the task inherently requires visual interaction.
Every GUI interaction should follow this cycle:
Snapshot to identify the current state and target elementsScreenshot to confirm the action produced the expected resultNever chain multiple actions without verifying intermediate results, especially for critical operations.
Use the cheapest observation tool that provides sufficient information:
Screenshot when only a visual check is needed (fast)Snapshot when element IDs or coordinates are needed (slower)Snapshot(use_dom=True) only when DOM content is specifically required (slowest)Avoid long, arbitrary Wait() calls. Instead:
# Bad: arbitrary long wait
App(launch "Word") -> Wait(5)
# Good: short wait + verification loop
App(launch "Word") -> Wait(1.5) -> Screenshot -> check if loaded
Recommended wait times:
When an action does not produce the expected result:
Snapshot to understand the current stateAction1 -> Verify1 -> Action2 -> Verify2 -> Action3 -> Verify3
Best for critical workflows where each step must succeed.
Snapshot -> identify all targets
MultiSelect or MultiEdit -> batch action
Verify result
Best for repetitive tasks on multiple items.
Source: Scrape/Clipboard/Snapshot -> extract data
Transform: process data
Output: Clipboard/Type/Shell -> deliver results
Best for data extraction and transfer workflows.
Setup: Launch/switch apps -> arrange windows
Work: interact with each app in sequence
Cleanup: close temporary apps, save results
Best for multi-application workflows.
MultiSelect/MultiEdit over repeated Click/TypeScreenshot for verification, Snapshot only when element IDs are neededShortcut("ctrl+s") is faster than navigating File > SaveScreenshot instead of over-waitingSnapshot(use_dom=True) is the most expensive operation| Pitfall | Solution |
|---|---|
| Clicking without Snapshot first | Always Snapshot to get current coordinates |
| Typing into wrong field | Click the target field first to ensure focus |
| Stale coordinates after scroll/resize | Re-Snapshot after any content change |
| Long waits "just in case" | Use short waits + verification |
| Ignoring failed actions | Always verify with Screenshot after actions |
| Using GUI when CLI works | Check if Shell can accomplish the task first |
| Not handling dialogs | Snapshot to detect unexpected popups |
| Hardcoding coordinates | Use Snapshot element IDs when possible |
-Force flagsANONYMIZED_TELEMETRY=false to disable data collectionTool returns no response:
uvx windows-mcp)Click hits wrong target:
App does not launch:
Shell("where appname")Shell command fails:
Snapshot shows no elements:
Wait(1) and retryuse_dom=True for web-based applicationsFor detailed troubleshooting and advanced automation patterns:
references/troubleshooting.md — Comprehensive troubleshooting guide, error recovery patterns, and environment setup verification