搜索

PythonReactSEOPDF
OpenClaw

Dkey Switch

 name: dkey switch description: AI 窗口切换技能。用于定位并激活 Windows 上的目标窗口,支持智能模糊匹配、窗口查找、进程匹配、句柄激活与标签切换回退。 argument hint: <窗口关键字|进程名|窗口句柄 metadata: { "clawdbot":{ "emoji":"🪟", "requires":{ "bins": "powershell" }, "install": {"id":"winget powershell","kind":"winget","package":"Microsoft.PowerShell","bins": "powershell" ,"label":"Install PowerShell winget "} } }

ddmy0 来源安装数☆ 0 仓库 Stars

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install ddmy/dkey-switch

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明


name: dkey-switch description: AI 窗口切换技能。用于定位并激活 Windows 上的目标窗口,支持智能模糊匹配、窗口查找、进程匹配、句柄激活与标签切换回退。 argument-hint: <窗口关键字|进程名|窗口句柄> metadata: { "clawdbot":{ "emoji":"🪟", "requires":{ "bins":["powershell"] }, "install":[ {"id":"winget-powershell","kind":"winget","package":"Microsoft.PowerShell","bins":["powershell"],"label":"Install PowerShell (winget)"} ] } }

核心定位

本技能可以 直接执行窗口切换动作,而非仅提供快捷键建议。

关键特性:

  • 智能模糊匹配:支持缩写(如"企微"→"企业微信")、拼音首字母、跳跃匹配
  • 双步安全流程:先 find-window 确认,再 activate-window 激活
  • 精确回退机制:激活失败时自动降级到 Dalt 或 Dctrl

命令速查表

命令 用途 示例
find-window <关键字> [数量] [--json] 首选:查找候选窗口 find-window 企微 3 --json
activate-window <关键字> [序号] [--json] 激活指定候选 activate-window 企微 1 --json
activate-process <进程名> [--json] 按进程名激活 activate-process Code --json
activate-handle <句柄> [--json] 精确句柄激活 activate-handle 0x2072C --json
list-windows [--json] 列出所有窗口 list-windows --json
Dalt -N Alt+Tab 切换 N 次 Dalt -1
Dctrl -N Ctrl+Tab 标签切换 Dctrl -1

AI 标准操作流程(重要)

Step 1: 总是先执行 find-window

scripts\d-switch.cmd find-window <用户关键词> 5 --json

Step 2: 分析返回结果

情况 A:完全匹配(高置信度)

  • 条件:items[0].title 与用户说的窗口名基本一致
  • 操作:直接激活,无需询问用户

情况 B:部分匹配(需确认)

  • 条件:有候选结果,但第一项不完全匹配用户描述
  • 操作:列出候选列表,询问用户确认

情况 C:无匹配

  • 条件:count == 0 或 status == "not_found"
  • 操作:尝试更通用关键词,或告知用户未找到

Step 3: 执行激活

# 用户确认后(或高置信度直接激活)
scripts\d-switch.cmd activate-window <关键...

来源信息

Source
github
Repository
openclaw/skills
Path
skills/ddmy/dkey-switch
Version
—
Commit
eb87fde46591a68b05fe6c2db9a284358688f216
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

来源内容

SKILL.md
---
name: dkey-switch
description: AI 窗口切换技能。用于定位并激活 Windows 上的目标窗口,支持智能模糊匹配、窗口查找、进程匹配、句柄激活与标签切换回退。
argument-hint: <窗口关键字|进程名|窗口句柄>
metadata: {
   "clawdbot":{
      "emoji":"🪟",
      "requires":{
         "bins":["powershell"]
      },
      "install":[
         {"id":"winget-powershell","kind":"winget","package":"Microsoft.PowerShell","bins":["powershell"],"label":"Install PowerShell (winget)"}
      ]
   }
}
---

## 核心定位

本技能可以 **直接执行窗口切换动作**,而非仅提供快捷键建议。

**关键特性**:
- **智能模糊匹配**:支持缩写(如"企微"→"企业微信")、拼音首字母、跳跃匹配
- **双步安全流程**:先 `find-window` 确认,再 `activate-window` 激活
- **精确回退机制**:激活失败时自动降级到 `Dalt` 或 `Dctrl`

---

## 命令速查表

| 命令 | 用途 | 示例 |
|------|------|------|
| `find-window <关键字> [数量] [--json]` | **首选**:查找候选窗口 | `find-window 企微 3 --json` |
| `activate-window <关键字> [序号] [--json]` | 激活指定候选 | `activate-window 企微 1 --json` |
| `activate-process <进程名> [--json]` | 按进程名激活 | `activate-process Code --json` |
| `activate-handle <句柄> [--json]` | 精确句柄激活 | `activate-handle 0x2072C --json` |
| `list-windows [--json]` | 列出所有窗口 | `list-windows --json` |
| `Dalt -N` | Alt+Tab 切换 N 次 | `Dalt -1` |
| `Dctrl -N` | Ctrl+Tab 标签切换 | `Dctrl -1` |

---

## AI 标准操作流程(重要)

### Step 1: 总是先执行 find-window

```bash
scripts\d-switch.cmd find-window <用户关键词> 5 --json
```

### Step 2: 分析返回结果

**情况 A:完全匹配(高置信度)**
- 条件:`items[0].title` 与用户说的窗口名**基本一致**
- 操作:**直接激活**,无需询问用户

**情况 B:部分匹配(需确认)**
- 条件:有候选结果,但第一项不完全匹配用户描述
- 操作:**列出候选列表,询问用户确认**

**情况 C:无匹配**
- 条件:`count == 0` 或 `status == "not_found"`
- 操作:尝试更通用关键词,或告知用户未找到

### Step 3: 执行激活

```bash
# 用户确认后(或高置信度直接激活)
scripts\d-switch.cmd activate-window <关键...

相关技能

OpenClaw

1password

daggerkun007

Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.