Alex

Desktop Control (Windows)

开发编程v1.0.1
作者:Alex更新于 2026-05-17desktop-control-win@clawhub_lexylent/desktop-control-win
脚本工具

据 AlphaMoat 统计,截至 2026-10,Desktop Control (Windows) 累计下载 22,766 次、获 15 个星标,按累计下载量在本次参与排名的 10,914 个 AI 技能中排名第 1,248 位,在「开发编程」分类(1,069 个)中排名第 85 位。

列表默认按累计下载量排序,也可按星标排序;详情页排名按累计下载量计算。

累计下载
2.3万
星标
15
全站下载量排名
#1,248
全站前 12% · 「开发编程」前 8%
平台累计下载星标评论
ClawHub ↗1.4万12-
SkillHub ↗2.3万15—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

技能可启动与关闭程序、切换和调整窗口、模拟键鼠输入、管理进程、控制 VSCode 并读取剪贴板。它在动作前设了三道确认:关闭可能未保存的窗口、结束进程、发送输入都要先确认或先把目标窗口切到前台。分发包里的脚本是 .ps1.txt,需改名 .ps1 后放进 scripts/ 目录才能用。 剪贴簿与画面可能含有私人资讯;仅读取必要内容,操作前核对目标视窗。

资料发布于 2026-10-29

可以用来做什么

  • 启动程序、切换窗口并按快捷键完成重复操作
  • 在 VSCode 里安装扩展或管理正在运行的进程

什么时候用

  • 需要在 Windows 桌面上复现人工操作时
  • 要批量整理窗口或清理进程但担心误关时

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

帮我写一段切到目标窗口再输入文字的 PowerShell 调用,并在之前加确认
这几个进程可能还有未保存的文档,先列出它们再问我哪些可以结束

月度数据趋势

累计下载2.3万
8,1201.6万2.4万2026-03 · 累计下载 9,2052026-05 · 累计下载 1.3万2026-06 · 累计下载 1.3万2026-07 · 累计下载 1.4万2026-08 · 累计下载 1.5万2026-09 · 累计下载 1.6万2026-10 · 累计下载 2.3万26-0326-0926-10
星标15
511172026-03 · 星标 62026-05 · 星标 122026-06 · 星标 132026-07 · 星标 152026-08 · 星标 162026-09 · 星标 162026-10 · 星标 1526-0326-0926-10

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。 该技能有同名的其他版本,调整前的数据归属当前下载量最大的这一个。

月份累计下载环比星标
2026-102.3万—15
2026-091.6万—16
2026-081.5万+3.2%16
2026-071.4万+5.9%15
2026-061.3万+5.3%13
2026-051.3万—12
2026-039,205—6

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

14 KB · ClawHub v1.0.1
---
name: desktop-control
description: Control desktop applications on Windows — launch, close, focus, resize, move windows, simulate keyboard/mouse input, manage processes, control VSCode, read clipboard, and capture screen info. Use when the user wants to interact with any running program, switch windows, type text, press shortcuts, open files in VSCode, manage running processes, or get system display information.
---

# Desktop Control — Full Windows Application Control

## Publish-only note (ClawHub)
This Publish package includes scripts as `.ps1.txt` because Publish only accepts text files.
After download, rename each `*.ps1.txt` to `*.ps1` and place them in a `scripts/` folder to use the skill.
展开全部(共 345 行)
Control any desktop application on this Windows machine. Launch programs, manage windows, simulate input, control VSCode, and monitor processes — all via PowerShell scripts.

## CRITICAL: Script Location

All scripts are located relative to this skill folder:

```
SKILL_DIR = ~/.openclaw/workspace/skills/desktop-control/scripts
```

When running scripts, always use the full path:
```powershell
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/<script>.ps1" -Action <action> [params]
```

## IMPORTANT: Safety Rules

1. **Before closing windows** — Ask user for confirmation if the window might have unsaved work
2. **Before killing processes** — Always confirm with user unless they explicitly asked to kill it
3. **Before sending input** — Make sure the correct window is focused first
4. **Clipboard** — Warn user if you are overwriting clipboard content

---

## Action Reference

### 1. Window Management (`app-control.ps1`)

Manage application windows — launch, close, focus, resize, move, snap.

#### List all visible windows
```powershell
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/app-control.ps1" -Action list-windows
```
Returns: PID, window title, position (X,Y), size (W×H), state (Normal/Minimized/Maximized)

#### Launch an application
```powershell
# By name (searches PATH and common locations)
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/app-control.ps1" -Action launch -Target "notepad"

# By full path
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/app-control.ps1" -Action launch -Target "C:\Program Files\MyApp\app.exe"

# With arguments
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/app-control.ps1" -Action launch -Target "code" -Arguments "C:\Users\ibach\project"
```

#### Focus (bring to foreground)
```powershell
# By window title (partial match)
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/app-control.ps1" -Action focus -Target "Visual Studio Code"

# By PID
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/app-control.ps1" -Action focus -ProcId 12345
```

#### Close a window gracefully
```powershell
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/app-control.ps1" -Action close -Target "Notepad"
```

#### Minimize / Maximize / Restore
```powershell
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/app-control.ps1" -Action minimize -Target "Visual Studio Code"
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/app-control.ps1" -Action maximize -Target "Visual Studio Code"
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/app-control.ps1" -Action restore -Target "Visual Studio Code"
```

#### Move a window
```powershell
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/app-control.ps1" -Action move -Target "Notepad" -X 100 -Y 200
```

#### Resize a window
```powershell
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/app-control.ps1" -Action resize -Target "Notepad" -Width 800 -Height 600
```

#### Snap a window (half-screen)
```powershell
# Options: left, right, top, bottom, topleft, topright, bottomleft, bottomright
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/app-control.ps1" -Action snap -Target "Notepad" -Position left
```

---

### 2. Input Simulation (`input-sim.ps1`)

Simulate keyboard and mouse input into any application.

**IMPORTANT:** Always focus the target window FIRST using `app-control.ps1 -Action focus` before sending input.

#### Type text
```powershell
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/input-sim.ps1" -Action type-text -Text "Hello, World!"
```

#### Send keyboard shortcut
```powershell
# Common shortcuts: Ctrl+S, Ctrl+C, Ctrl+V, Ctrl+Z, Alt+F4, Ctrl+Shift+P, Win+D
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/input-sim.ps1" -Action send-keys -Keys "Ctrl+S"
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/input-sim.ps1" -Action send-keys -Keys "Ctrl+Shift+P"
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/input-sim.ps1" -Action send-keys -Keys "Alt+Tab"
```

#### Send special keys
```powershell
# Keys: Enter, Tab, Escape, Backspace, Delete, Up, Down, Left, Right, Home, End, PageUp, PageDown, F1-F12
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/input-sim.ps1" -Action send-keys -Keys "Enter"
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/input-sim.ps1" -Action send-keys -Keys "F5"
```

#### Mouse click at coordinates
```powershell
# Left click
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/input-sim.ps1" -Action mouse-click -X 500 -Y 300

# Right click
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/input-sim.ps1" -Action mouse-click -X 500 -Y 300 -Button right

# Double click
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/input-sim.ps1" -Action mouse-click -X 500 -Y 300 -DoubleClick
```

#### Move mouse
```powershell
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/input-sim.ps1" -Action mouse-move -X 500 -Y 300
```

#### Scroll
```powershell
# Scroll up (positive) or down (negative)
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/input-sim.ps1" -Action mouse-scroll -Clicks 3
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/input-sim.ps1" -Action mouse-scroll -Clicks -3
```

---

### 3. VSCode Control (`vscode-control.ps1`)

Control Visual Studio Code through the `code` CLI and extensions.

#### Open a file
```powershell
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/vscode-control.ps1" -Action open-file -Path "C:\Users\ibach\project\main.py"
```

#### Open a file at a specific line
```powershell
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/vscode-control.ps1" -Action goto -Path "C:\Users\ibach\project\main.py" -Line 42
```

#### Open a folder/workspace
```powershell
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/vscode-control.ps1" -Action open-folder -Path "C:\Users\ibach\project"
```

#### Open diff view
```powershell
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/vscode-control.ps1" -Action open-diff -Path "file1.py" -Path2 "file2.py"
```

#### List installed extensions
```powershell
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/vscode-control.ps1" -Action list-extensions
```

#### Install an extension
```powershell
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/vscode-control.ps1" -Action install-extension -ExtensionId "ms-python.python"
```

#### Uninstall an extension
```powershell
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/vscode-control.ps1" -Action uninstall-extension -ExtensionId "ms-python.python"
```

#### Open a new terminal in VSCode
```powershell
# This focuses VSCode and sends Ctrl+` to toggle terminal
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/vscode-control.ps1" -Action new-terminal
```

#### Open VSCode command palette
```powershell
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/vscode-control.ps1" -Action command-palette
```

#### Run a VSCode command by name
```powershell
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/vscode-control.ps1" -Action run-command -Command "workbench.action.toggleSidebarVisibility"
```

---

### 4. Process Management (`process-manager.ps1`)

Monitor and manage running processes.

#### List running processes
```powershell
# All processes
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/process-manager.ps1" -Action list

# Filter by name
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/process-manager.ps1" -Action list -Name "code"

# Top N by memory
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/process-manager.ps1" -Action list -SortBy memory -Top 10
```

#### Get detailed process info
```powershell
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/process-manager.ps1" -Action info -ProcId 12345
```

#### Start a new process
```powershell
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/process-manager.ps1" -Action start -Path "notepad.exe" -Arguments "C:\file.txt"
```

#### Kill a process (CONFIRM WITH USER FIRST)
```powershell
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/process-manager.ps1" -Action kill -ProcId 12345
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/process-manager.ps1" -Action kill -Name "notepad"
```

#### Monitor process resource usage
```powershell
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/process-manager.ps1" -Action monitor -ProcId 12345 -Duration 10
```

---

### 5. Screen & System Info (`screen-info.ps1`)

Get display information, window details, clipboard, and screenshots.

#### List displays/monitors
```powershell
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/screen-info.ps1" -Action displays
```

#### Get active (focused) window info
```powershell
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/screen-info.ps1" -Action active-window
```

#### Get detailed window info
```powershell
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/screen-info.ps1" -Action window-info -Target "Visual Studio Code"
```

#### Take a screenshot
```powershell
# Full screen
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/screen-info.ps1" -Action screenshot -OutputPath "$HOME/screenshot.png"

# Specific window
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/screen-info.ps1" -Action screenshot -Target "Notepad" -OutputPath "$HOME/notepad-screenshot.png"
```

#### Read clipboard
```powershell
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/screen-info.ps1" -Action clipboard-get
```

#### Set clipboard text
```powershell
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/screen-info.ps1" -Action clipboard-set -Text "Text to copy"
```

#### Get system info (uptime, OS, resolution)
```powershell
powershell -ExecutionPolicy Bypass -File "$HOME/.openclaw/workspace/skills/desktop-control/scripts/screen-info.ps1" -Action system-info
```

---

## Common Workflows

### Open a file in VSCode and navigate to a specific line
```
1. vscode-control.ps1 -Action goto -Path "C:\path\to\file.py" -Line 42
```

### Type something into a specific application
```
1. app-control.ps1 -Action focus -Target "Notepad"
2. input-sim.ps1 -Action type-text -Text "Hello World"
```

### Save the current document in any app
```
1. app-control.ps1 -Action focus -Target "<app name>"
2. input-sim.ps1 -Action send-keys -Keys "Ctrl+S"
```

### Arrange two windows side-by-side
```
1. app-control.ps1 -Action snap -Target "Visual Studio Code" -Position left
2. app-control.ps1 -Action snap -Target "Chrome" -Position right
```

### Kill a frozen application
```
1. process-manager.ps1 -Action list -Name "frozen-app"
   (note the PID)
2. ASK USER FOR CONFIRMATION
3. process-manager.ps1 -Action kill -ProcId <pid>
```

### Take a screenshot of a specific window
```
1. screen-info.ps1 -Action screenshot -Target "Chrome" -OutputPath "$HOME/chrome.png"
```

---

## Error Handling

- If a script returns exit code 0 → success
- If a script returns exit code 1 → error (check stderr output for details)
- If a window is not found → try `list-windows` first to get the exact title
- If `code` CLI is not found → VSCode may not be in PATH; try launching it first

## Troubleshooting

- **"Window not found"** → Use `list-windows` to see exact window titles, then match more precisely
- **"Access denied"** → Some system processes need admin rights; inform the user
- **Input not working** → Make sure the target window is focused AND in the foreground
- **VSCode CLI not found** → Try `code --version` first; if missing, launch VSCode from Start Menu

「开发编程」分类下的热门技能

编程大神.Skill开发编程

【全栈能力】编程大神.Skill:面向复杂真实项目的高阶全栈编程助手。不止生成代码,而是从一句目标接手陌生代码库,拆解需求、补齐实现、追到根因、完成重构、联调前后端,并把结果推进到能运行、能验证、能交付。覆盖 Web、后端、脚本、iOS、安卓、鸿蒙 ArkUI、微信小程序及其他技术栈,支持中英文工程、疑难 Bug、跨模块任务和长任务续做;用构建、日志、真实入口、设备或接口证据说明结果。仅问概念时直接回答,要求落地时持续推进到验收或明确阻塞。

↓ 1125.9万★ 82u_42bbb65f
编程专家Pro.Skill开发编程

编程专家 Pro:融合编程专家 2.0.3 工程专题与编程大神的鸿蒙 ArkTS/ArkUI、微信小程序和小游戏开发资料。用于项目实现、根因调试、审查、重构、测试、架构性能分析及多端开发验证。支持自然语言和 @专题标识,按任务读取包内知识;只问概念时直接回答。

↓ 626.9万★ 32user_47d655f0
编程专家.Skill开发编程

编程专家.Skill P8级编程助手,25年实战经验技能Skill,全栈:Java/Php网站/软件项目、API设计、Bug诊断、代码生成、代码审查、重构、测试用例、性能基准、技术选型、文档生成、任务拆解、Spec驱动、Karpathy规范、CMS二次开发、前端设计、MySQL/Mariadb、项目知识图谱,以及工程纪律层(根因调试硬闭环、阶段导航、事故复盘/SLO、威胁建模/供应链安全、生产就绪/渐进式发布、AI编码治理、面向Agent代码可读性、LLM应用安全)。支持 @标识 显式调用跳过路由。

↓ 600.7万★ 378user_741dc82b
dev-expert开发编程

编程专家.Skill P8级编程助手,25年实战经验技能Skill,全栈:Java/Php网站/软件项目、API设计、Bug诊断、代码生成、代码审查、重构、测试用例、性能基准、技术选型、文档生成、任务拆解、Spec驱动、Karpathy规范、CMS二次开发、前端设计、MySQL/Mariadb、项目知识图谱,以及工程纪律层(根因调试硬闭环、阶段导航、事故复盘/SLO、威胁建模/供应链安全、生产就绪/渐进式发布、AI编码治理、面向Agent代码可读性、LLM应用安全)。支持 @标识 显式调用跳过路由。

↓ 528.1万★ 32user_814dbe54
dev-expert-pro开发编程

编程专家 Pro:融合编程专家 2.0.3 工程专题与编程大神的鸿蒙 ArkTS/ArkUI、微信小程序和小游戏开发资料。用于项目实现、根因调试、审查、重构、测试、架构性能分析及多端开发验证。支持自然语言和 @专题标识,按任务读取包内知识;只问概念时直接回答。

↓ 104.7万★ -user_814dbe54
编程专家 Pro开发编程

编程专家 Pro:融合编程专家 2.0.3 工程专题与编程大神的鸿蒙 ArkTS/ArkUI、微信小程序和小游戏开发资料。用于项目实现、根因调试、审查、重构、测试、架构性能分析及多端开发验证。支持自然语言和 @专题标识,按任务读取包内知识;只问概念时直接回答。

↓ 98.2万★ 1user_28275a78
编程专家.Skill开发编程

编程专家.Skill P8级编程助手,25年实战经验技能Skill,全栈:Java/Php网站/软件项目、API设计、Bug诊断、代码生成、代码审查、重构、测试用例、性能基准、技术选型、文档生成、任务拆解、Spec驱动、Karpathy规范、CMS二次开发、前端设计、MySQL/Mariadb、项目知识图谱,以及工程纪律层(根因调试硬闭环、阶段导航、事故复盘/SLO、威胁建模/供应链安全、生产就绪/渐进式发布、AI编码治理、面向Agent代码可读性、LLM应用安全)。支持 @标识 显式调用跳过路由。

↓ 70.1万★ 6user_613b33ea
Github开发编程

用 gh 命令行工具查看 GitHub 上的 PR 检查、工作流运行与 API 查询的技能。

↓ 48.0万★ 714Peter Steinberger

数据月份:2026-10 · 下载/星标数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。