Skip to content
Back to skills

cuadesktopoperatorskill

ASecurity

Windows desktop operation skill for MCP-capable AI agents. Use when the task requires observing the current desktop, launching or focusing apps, clicking or typing in Windows GUI apps, using reusable desktop macros, or running an observe-plan-act-verify loop through the local desktop-operator MCP server.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 26, 2026
ai-agentspython

Works with

  • claude code
  • cursor
  • cli
  • mcp

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned May 27, 2026

npx -y skills add Marways7/cua_desktop_operator_skill --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of cuadesktopoperatorskill?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for cuadesktopoperatorskill
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/marways7-cuadesktopoperatorskill/badge)](https://www.skillsdirectory.com/skills/marways7-cuadesktopoperatorskill)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: cua_desktop_operator_skill
description: Windows desktop operation skill for MCP-capable AI agents. Use when the task requires observing the current desktop, launching or focusing apps, clicking or typing in Windows GUI apps, using reusable desktop macros, or running an observe-plan-act-verify loop through the local desktop-operator MCP server.
---

# CUA Desktop Operator Skill

Use this skill when the user wants desktop control on Windows through a local MCP server.

## What this skill expects

- A local Python runtime with the desktop operator dependencies installed.
- The `desktop-operator` MCP server available over stdio.
- The agent can inspect screenshot artifacts returned by `desktop_observe`.
- Temporary artifacts should be cleaned after task success unless the user asked to keep them.

If the current client does not expose the `desktop_*` MCP tools yet:

1. Read `references/mcp-client-setup.md`.
2. If the client is Codex, Claude Code, Cursor, or OpenCode, configure the local MCP server before attempting the desktop task.
3. If the client is something else, stop and ask the user to add the MCP server manually, then send them the config snippet from `references/mcp-client-setup.md`.
4. After configuration, reload the client if needed and verify that `desktop-operator` is visible before starting the task.

If the runtime is not ready:

1. Run `scripts/setup_runtime.ps1`.
2. Run `scripts/start_mcp_server.ps1`.

## Core workflow

Use this loop for almost every GUI task:

1. Call `desktop_observe`.
2. Inspect the screenshot, active window, visible windows, and optional cropped window image.
3. Choose the smallest next step.
4. Prefer the highest-signal tool that fits:
   - `desktop_focus_window` before keyboard input
   - `desktop_click_relative` before absolute clicks
   - `desktop_uia_*` when a stable control is visible in UIA
   - `desktop_run_macro` when the action pattern is reusable
5. After each mutating action, call `desktop_observe` or `desktop_validate_state`.
6. Repeat until the success condition is visible.
7. If the task is complete and the user did not ask to keep screenshots, logs, or debug traces, call `desktop_cleanup_artifacts`.

## Tool selection order

Use tools in this order unless the task clearly needs something else:

1. `desktop_observe`
2. `desktop_find_window` or `desktop_list_windows`
3. `desktop_focus_window`
4. `desktop_run_macro` for stable repeated flows
5. `desktop_click_relative` / `desktop_uia_click`
6. `desktop_paste_text` for Chinese or mixed-language text
7. `desktop_type_text` only for short plain text
8. `desktop_validate_state`

## Action policy

- Keep actions small and reversible.
- Prefer one to three tool calls before observing again.
- Use `desktop_wait` when the UI is loading instead of stacking blind clicks.
- Use `match_index` whenever multiple similar windows exist.
- Use `desktop_run_macro` with `macro_id="__catalog__"` to inspect the built-in macro catalog.
- Clean temporary artifacts after successful completion unless the user explicitly asked to retain them.

## Safety policy

- Do not run destructive OS actions unless the user explicitly asked for them.
- Validate focus before typing or pressing submit keys.
- If a click misses once, re-observe before trying again.
- If UIA lookup is slow or empty, return to screenshot-driven interaction.

## References

- MCP tool details: `references/mcp-tool-catalog.md`
- MCP client setup: `references/mcp-client-setup.md`
- Interaction patterns: `references/interaction-patterns.md`
- Macro catalog: `references/macro-catalog.md`
- Failure recovery: `references/failure-recovery.md`
- Cross-agent notes: `references/compatibility.md`

Files in this skill

  • README.ja.md19.1 KB
  • README.ko.md16.4 KB
  • README.zh-CN.md14.5 KB
  • README.zh-Hant.md14.5 KB
  • SECURITY.md979 B
  • SKILL.md3.6 KB
  • agents/openai.yaml607 B
  • desktop_operator_core/__init__.py580 B
  • desktop_operator_core/artifacts.py4.5 KB
  • desktop_operator_core/macros.py8.2 KB
  • desktop_operator_core/models.py3.8 KB
  • desktop_operator_core/runtime.py28 KB
  • desktop_operator_core/uia.py4.7 KB
  • desktop_operator_core/windows.py3.1 KB
  • desktop_operator_mcp/__init__.py75 B
  • desktop_operator_mcp/__main__.py64 B
  • desktop_operator_mcp/requirements.txt93 B
  • desktop_operator_mcp/server.py11.8 KB
  • references/compatibility.md714 B
  • references/failure-recovery.md713 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.