Search

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 source installs☆ 0 Repository stars

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

SkillHub CLI

skillhub install ddmy/dkey-switch

Inspect the source and compatibility requirements, then follow its installation steps.

Give your agent the source link and ask it to inspect instructions and dependencies before explaining the installation steps.

View source ↗Guides

Skill instructions


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 information

Source
github
Repository
openclaw/skills
Path
skills/ddmy/dkey-switch
Version
—
Commit
eb87fde46591a68b05fe6c2db9a284358688f216
Classification source
rules
Status
active
Visibility
public

These signals come from indexed source analysis and may lag behind changes. Check the current source files.

Extracted content

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 <关键...

Related skills

OpenClaw

13-Day Sprint Method

galizki

Productivity system based on Maya calendar with 13 natural tones for project management and personal development

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.