跳到主要内容

browser_cdp 精选

Use this skill when the user explicitly wants to connect to a running Chrome browser, scan local CDP ports, specify a `cdp_port`, or share a single browser across multiple agents/tools. By default browser opens no debugging port; pass an explicit `cdp_port` only when the user wants another local tool to attach.

自动化 Codex CLIMCP 客户端 Apache-2.0 3.6 万
在 GitHub 打开

安装方式

cp -r src/qwenpaw/agents/tools/deprecated_browser/skills/browser_cdp-en ~/.claude/skills/browser-cdp-en

把该 skill 目录放进客户端 skills 目录。不同客户端的目录可能不同,Claude Code 默认是 ~/.claude/skills/

整仓一次性获取:git clone --depth 1 https://github.com/agentscope-ai/QwenPaw.git

依赖与权限

  • 无需 API Key
  • 需要联网访问外部服务
  • 依赖外部命令:playwright
  • 以上为按正文与 frontmatter 自动推断的信号,仅供参考;安装前建议先阅读原文。
触发场景
scan local CDP portssp

SKILL.md 正文

来源 agentscope-ai/QwenPaw@02b6a6d · 许可 Apache-2.0 · 内容未修改
Deprecated: This reference supports the stable browser implementation.
hatch. Prefer the unified browser tool when experimental mode is enabled.

Browser CDP Reference

By default, browser opens no debugging port: the browser is managed directly by Playwright. This skill covers the cases where a CDP port is wanted on purpose.

This skill focuses on more "explicit" CDP usage:

  1. Scanning local CDP ports
  2. Connecting to an existing Chrome (connect_cdp)
  3. Explicitly specifying a cdp_port when launching the browser
  4. Sharing a single browser instance across multiple agents/tools

In other words:

  • The default start opens no debugging port, so users typically do not need to understand or be aware of CDP details
  • Only enter the scope of this skill when the user explicitly mentions "connect to an existing browser / scan ports / specify a port / share a browser"
Privacy Recommendation
The default start exposes nothing — no debugging port is opened. Only pass cdp_port when the user explicitly wants another local tool to attach, and warn about the exposure first.
Warning: One browser instance per workspace
Only one browser can be running or connected per workspace at a time. If a browser instance already exists, you must execute stop first before switching to a new browser or a new CDP connection.

When to Use

Use this skill only when the user explicitly expresses one of the following intentions:

  • "Connect to my already-open Chrome"
  • "Scan for available CDP ports on this machine"
  • "Launch the browser with a fixed debug port"
  • "Let other agents/tools connect to this browser too"
  • "Attach to the browser via the remote debugging port"

In the following cases, you should typically not use this skill:

  • The user just says "open the browser"
  • The user just says "open a visible window"
  • The user does not mention sharing, ports, CDP, or remote debugging

In these cases, use the standard start, adding headed=true if needed — refer to browser_visible.


Scenario 1: Scanning Local CDP Ports

Default scan range is 9000–10000:

{"action": "list_cdp_targets"}

Specify a single port:

{"action": "list_cdp_targets", "port": 9222}

Custom scan range:

{"action": "list_cdp_targets", "port_min": 8000, "port_max": 12000}

Use cases:

  • The user has manually launched Chrome with a remote debugging port
  • You do not know the exact port and need to scan first
  • You need to verify available attach targets on the local machine before connecting

Scenario 2: Connecting to an Existing Chrome

Connect to an existing CDP endpoint:

{"action": "connect_cdp", "cdp_url": "http://localhost:9222"}

Characteristics:

  • After a successful connection, you can continue using standard operations such as open, snapshot, click, type, etc.
  • This attaches to an external browser, not a new process launched by QwenPaw
  • stop only disconnects — it will not close the external browser
  • External CDP connections are also subject to idle auto-stop management, but the auto-stop semantics for external CDP is "auto-disconnect, not close the external browser"

Use cases:

  • The user has their own Chrome open and wants the agent to take over directly
  • You need to attach to the user's existing login state or open tabs

Scenario 3: Launching with an Explicit cdp_port

If the user explicitly requests a fixed port, or needs to provide the endpoint to other tools, specify cdp_port in start:

{"action": "start", "cdp_port": 9222}

To also open a visible window:

{"action": "start", "headed": true, "cdp_port": 9222}

Current behavior:

  • If the explicitly specified cdp_port is already in use, an error is raised immediately — it will not forcefully reuse the port
  • If cdp_port is not specified, no port is opened and none is chosen automatically
  • An explicitly specified port still has a tiny race window: between "checking that the port is free" and "Chrome actually binding to it", another process could theoretically claim it; on failure, cleanup occurs and an error is reported, but there is no automatic retry

Therefore:

  • Do not pass cdp_port proactively when the user has not explicitly requested a port
  • Only pass cdp_port explicitly when the user requests a fixed port or external sharing

Multi-Workspace and Port Conflicts

The current port strategy for multiple workspaces:

  • Explicitly specified port: checks whether 127.0.0.1:cdp_port is already in use; if so, fails immediately and prompts the user to choose a different port or stop the old process
  • No explicit port: no port is opened, so there is no conflict to begin with

This means:

  • Multiple workspaces using the default launch always coexist, because no port is opened
  • If multiple workspaces all request the same fixed cdp_port, the later one will fail because the port is already in use

Stop Behavior

CDP-related stop behavior differs depending on the type:

1. Managed CDP launched by QwenPaw

For example:

{"action": "start", "cdp_port": 9222}

These browsers are launched and owned by QwenPaw. stop will:

  • Disconnect the Playwright / CDP connection
  • Terminate the browser process

2. External CDP Browser

For example:

{"action": "connect_cdp", "cdp_url": "http://localhost:9222"}

These browsers are not launched by QwenPaw. stop will only:

  • Disconnect
  • Not close the external browser process

Division of Responsibility with browser_visible

  • browser_visible: handles whether to show a window
  • browser_cdp: handles "whether to connect / expose / specify / scan CDP ports"

In short:

  • User cares about "seeing the browser window" → think browser_visible first
  • User cares about "connecting to an existing browser / specifying a debug port / sharing with others" → think browser_cdp first

Notes

  • The default start opens no debugging port; surface CDP concepts to the user only when they explicitly ask for them
  • Before using explicit CDP capabilities, warn the user about the risk of sensitive data exposure
  • Auto-stop for external CDP means "auto-disconnect," not "auto-close the user's browser"
  • Activity is currently refreshed primarily by tool operations; the user's manual interactions in the browser window typically do not reset the idle timer
  • private_mode is an explicit parameter for each start call and is not persisted as workspace state

质量与来源

所属仓库
agentscope-ai/QwenPaw
仓库星标
3.6 万
最近更新
今天
采集时间
今天
commit
02b6a6d088e3
内容指纹
sha256:5d320a9e2b69cf4
文件路径
src/qwenpaw/agents/tools/deprecated_browser/skills/browser_cdp-en/SKILL.md

同仓库其它 Skill

查看全部 48 个
edu-math-tutorial
数学题分步讲解视频的领域知识。适用场景:(1) 用户给出一道数学题并要求做讲解/ 解题视频;(2) 用户说"讲解这道题"、"生成解题视频"、"make a math tutorial"; (3) 需要中文数学教学视频,涉及方程、公式或几何图形。本 skill 只提供领域 知识(题目拆解、讲解节奏、旁白文案规范、版式与 KaTeX 排版风格);画面、 配音与成片一律用 Creator 原生 Element 与工具从源头构建。
精选 agentscope-ai/QwenPaw 3.6 万 原文
Codex CLIMCP 客户端
professional-media-prompts
为 Creator 编译制作级视觉资产图、电影分镜图和参考生视频 Prompt。适用于 角色身份板/设定图、关键帧或多宫格分镜、短片动作节拍、R2V/I2V/T2V 提示词, 尤其适合要求角色一致性、镜头语言、参考图职责、Seedance 时间段或声音设计的 任务。不用于纯素材剪辑、只查询模型参数,或只评价已经生成的成片。
精选 agentscope-ai/QwenPaw 3.6 万 原文
Codex CLIMCP 客户端
visual-asset-design
为角色/场景/道具设计视觉资产、编写或修复 VisualVariant 与阵容图的生成 Prompt 时使用。涵盖参考图布局(艺术身份板/序列关键帧/环境研究板/道具研究 板)、构图与镜头语言、图片审核误判规避、实体 continuity 与以主图为参考 的跨 Variant 衍生设计。不用于视频 Prompt 编译(见 professional-media-prompts)、 纯素材剪辑或只评价已生成产物。
精选 agentscope-ai/QwenPaw 3.6 万 原文
Codex CLIMCP 客户端
alicloud_cli
阿里云 CLI 中文文档镜像检索与命令辅助:先走章节索引,再下钻正文页面,给出命令前必须有本地文档证据。
精选 agentscope-ai/QwenPaw 3.6 万 原文
Codex CLIMCP 客户端
terraform-cli-setup
Terraform CLI 安装与初始化技能。当用户本地未安装 Terraform 时自动完成安装,确保 terraform 命令可用并能执行 init/validate。不负责 Provider 凭证配置,凭证在实际使用时由 terraform-skill 引导。
精选 agentscope-ai/QwenPaw 3.6 万 原文
Codex CLIMCP 客户端
terraform-skill
Use when working with Terraform or OpenTofu - creating modules, writing tests (native test framework, Terratest), setting up CI/CD pipelines, reviewing configurations, choosing between testing approaches, debugging state issues, implementing security scanning (trivy, checkov), or making infrastructure-as-code architecture decisions
精选 agentscope-ai/QwenPaw 3.6 万 原文
Codex CLIMCP 客户端
agent-browser
Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.
精选 shanraisshan/claude-code-best-practice 6.7 万 原文
Claude CodeCodex CLIGemini CLI
presentation-structure
Knowledge about the presentation slide format, weight system, navigation, and section structure
精选 shanraisshan/claude-code-best-practice 6.7 万 原文
Claude CodeCodex CLIGemini CLI
presentation-styling
Knowledge about CSS classes, component patterns, and syntax highlighting in the presentation
精选 shanraisshan/claude-code-best-practice 6.7 万 原文
Claude CodeCodex CLIGemini CLI
vibe-to-agentic-framework
The conceptual framework behind the presentation — what "Vibe Coding to Agentic Engineering" means, why the journey is structured the way it is, and how every slide fits the narrative arc
精选 shanraisshan/claude-code-best-practice 6.7 万 原文
Claude CodeCodex CLIGemini CLI
time-skill
Display the current time in Pakistan Standard Time (PKT, UTC+5). Use when the user asks for the current time, Pakistan time, or PKT.
精选 shanraisshan/claude-code-best-practice 6.7 万 原文
Claude CodeCodex CLIGemini CLI
weather-fetcher
Instructions for fetching current weather temperature data for Dubai, UAE from Open-Meteo API
精选 shanraisshan/claude-code-best-practice 6.7 万 原文
Claude CodeCodex CLIGemini CLI