edge-cdp

edge-cdp: Remote control and automation for the Edge browser via the DevTools Protocol, supporting screenshots, DOM read/modify, executing JS, and cookie management.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "edge-cdp" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-1507213bba661b0fe21f0835bc6468a2fecbc7e1212a69138b9693e84df3a71a. Verify the upstream source and version against https://skillhub.cn/skills/user_3ef04463/edge-cdp before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

edge-cdp: Remote control and automation for the Edge browser via the DevTools Protocol, supporting screenshots, DOM read/modify, executing JS, and cookie management.

0 Downloads

Introduction source: third_party · user_3ef04463 · 2.3.1 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Audience
Translation pending; see source documentation.
Inputs and outputs
When the same input runs multiple times, the core conclusion should be consistent (allowing differences in expression) and, if there is a significant contradiction in output, priority should be given to trace the source of the last change The reference type data is based on the original source and does not vary the conclusion by model sampling differences
Software, accounts and paid services
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: edge-cdp
slug: edge-cdp
displayName: Edge CDP
version: 2.3.1
author: QianQiong
license: MIT
summary: Edge CDP 浏览器远程控制,通过 DevTools Protocol 实现截图、DOM、JS、Cookie 管理
allowedTools: []
description: Edge CDP 自动化 Skill。通过 Chrome DevTools Protocol 远程控制 Microsoft Edge 浏览器,支持页面导航、截图、DOM操作、JS执行、Cookie管理。适用于浏览器自动化场景。
metadata: {"openclaw":{"emoji":"🌐"}}

When to Use / 触发场景

Trigger keywords: Edge CDP, DevTools Protocol, browser automation, msedge, 浏览器自动化, 截图, DOM操作, Cookie管理

Usage Scenario 说明
Edge CDP、浏览器自动化、msedge 启动/控制 Edge 浏览器
CDP、DevTools Protocol 通过 CDP 执行浏览器操作
截图、DOM操作、Cookie管理 常见自动化任务

概述

Microsoft Edge 基于 Chromium,支持完整的 Chrome DevTools Protocol (CDP)。本 Skill 通过 WebSocket 连接 Edge 的 CDP 调试端口,实现远程自动化控制。

环境要求

项目 值
浏览器路径 C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe
版本 150.0.4078.65
CDP 端口 9222
WebSocket 端点 ws://127.0.0.1:9222/devtools/browser/<uuid>

启动命令

Start-Process "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" -ArgumentList "--remote-debugging-port=9222"

健康检查:

powershell -ExecutionPolicy Bypass -File "C:\Users\Administrator\.qclaw\workspace-departments\tiangongge\scripts\check-edge-cdp.ps1"

验证 CDP

Invoke-RestMethod -Uri "http://127.0.0.1:9222/json/version" -TimeoutSec 5
Invoke-RestMethod -Uri "http://127.0.0.1:9222/json" -TimeoutSec 5

常用 CDP 操作

页面导航

{ "id": 1, "method": "Page.navigate", "params": { "url": "https://example.com" } }

截图

{ "id": 2, "method": "Page.captureScreenshot", "params": { "format": "png", "quality": 80 } }

执行 JavaScript

{ "id": 3, "method": "Runtime.evaluate", "params": { "expression": "document.title", "returnByValue": true } }

Cookie 管理

{ "id": 4, "method": "Network.getCookies", "params": { "urls": ["https://example.com"] } }

DOM 查询

{ "id": 6, "method": "DOM.getDocument" }
{ "id": 7, "method": "DOM.querySelector", "params": { "nodeId": 1, "selector": "#main" } }

网络拦截

{ "id": 9, "method": "Network.enable" }

故障排查

问题 原因 解决方案
连接拒绝 Edge 未启动或未带调试参数 Start-Process ... -ArgumentList "--remote-debugging-port=9222"
WebSocket 断开 标签页关闭 重新获取 json/version 拿新 WebSocket URL
端口占用 其他进程占 9222 netstat -ano | findstr 9222 查占用
权限不足 防火墙阻止本地连接 127.0.0.1:9222 加防火墙白名单

变更记录

  • v2.0.1 2026-07-20: 周检维护,补全metadata,上架ClawHub
  • v2.0.0 2026-07-15: QQBrowser → Edge 全量迁移
  • v1.0.0 2026-07-06: 初始版本(QQBrowser CDP)

FAQ(高频问题速查)

Q1:Edge 没启动/连接不上? 先按「启动命令」用 --remote-debugging-port 启动 Edge,再测 http://127.0.0.1:9222/json/version(QP-E901)。

Q2:CDP 端口被占用? 换端口启动,注意 9222 被占用时 Edge 不会报错只是连不上。

Q3:截图/DOM 操作失败? 确认目标页面已加载完成;frame 内元素需先切换到对应 frame。

Q4:这个 skill 能控制 Chrome 吗? CDP 协议通用,Chrome/Edge 均可;本 skill 以 Edge 为例。

运行时稳定性保障(QP 韧性体系)

本技能为 Prompt 型技能,稳定性通过以下机制保障:

输出一致性校验

  • 同一输入多次运行时,核心结论应一致(允许表达方式差异)
  • 若输出出现显著矛盾,优先回溯最后一次修改的源头
  • 引用型数据以原始来源为准,不因模型采样差异改变结论

异常输入降级链

正常输入 → 完整流程
    ↓ 关键信息缺失
    追问补充(1轮)→ 仍不足?→ 标注「信息不足」+ 给出最小可行输出
    ↓ 超出能力边界
    硬边界拦截 → 明确告知「不在能力范围」+ 建议替代方案
    ↓ 模型采样不稳定
    核心结论不变 → 仅标注「表达可能存在微调」

重试与恢复指引

场景 处理
输出明显偏离工作流程 用户可追加「请严格按工作流程重新执行」触发重试
数据引用不一致 以首次引用来源为准,后续引用追加「已核实与首次一致」
中间步骤遗漏 用户可指定步骤号要求补执行
外部依赖不可用 标注「外部依赖暂不可用」+ 使用缓存/已知数据替代,不静默跳过

用户干预入口

  • 任何步骤输出不满足预期时,直接指出问题即可触发修正
  • 不需要重新描述全部需求,模型保留上下文并增量修正
  • 连续 2 轮修正失败 → 建议缩小范围或拆分子任务

QP 错误码(专用段 E901+)

码 含义 修正引导
QP-E901 CDP 连接失败 检查 Edge 是否以 remote-debugging 启动、端口是否正确
QP-E902 端口占用 换端口重启浏览器
QP-E903 页面加载未完成 等待 load 事件后再操作
QP-E904 frame 定位失败 显式切换到目标 frame
QP-E905 WebSocket 断开 重连,检查浏览器是否被关闭

输入/输出约束

项 约束
输入 目标 URL + 操作指令(导航/截图/DOM/JS/Cookie)
前置 Edge 以 --remote-debugging-port 启动,CDP 端点可达
输出 操作结果(截图文件/DOM 结构/JS 返回值/Cookie 数据)

Current listing version

2.3.1

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value85/100

Highlights

  • 提供完整的 Edge CDP 浏览器自动化能力,覆盖截图、DOM操作、JS执行、Cookie管理等核心场景
  • 包含详细的环境要求、启动命令和故障排查指南,实用性强
Trigger Precision90/100

Highlights

  • 触发词覆盖全面且精准,包括 Edge CDP、DevTools Protocol、浏览器自动化等关键词
  • 边界清晰,不易与其他 Skill 重叠
Structure and Standards90/100

Areas to improve

  • When to Use 章节标题为中文 Reported severity: Minor

    When to Use 章节实际存在但标题为中文,建议统一为英文

    Recommendation: 将 'When to Use / 触发场景' 改为 'When to Use' 以符合规范

Highlights

  • 结构清晰,包含启动、验证、操作、排查完整流程
  • 提供丰富的 CDP 命令示例和错误码指引
Execution Reliability85/100

Areas to improve

  • 健康检查脚本使用绝对路径 Reported severity: Minor

    健康检查脚本路径为 C:\Users\Administrator\...,可能不适用于所有环境

    Recommendation: 建议使用相对路径或环境变量,提高脚本通用性

Highlights

  • 覆盖主要异常场景并提供解决方案
  • 提供专用错误码和修正引导,便于故障排查
Evidence Verifiability (mean of the first four)88/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

Domains or addresses referenced in the document

These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.

  • 127.0.0.1
  • example.com

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Translation pending; see source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.