AGENT SKILL
CDP Browser
暂无简介
- License 许可
- Apache-2.0
- 所属仓库
- lhwzds/skrun
- 最近更新
- 2026-11-06
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- id
- cdp-browser
- kind
- skill_binary
- name
- CDP Browser
02 资源文件 6
- 参考文档artifact.json459 B
- 其他Cargo.toml345 B
- 参考文档schema/input.json719 B
- 参考文档schema/output.json334 B
- 参考文档smoke.json27 B
- 脚本src/main.rs21.0 KB
03 SKILL.md 正文
CDP Browser
Binary skill that controls Chrome through the Chrome DevTools Protocol.
The binary accepts either command-line arguments or a JSON request from stdin. It prints one JSON response to stdout.
Actions
describe: Return skill metadata without side effects.launch: Start Chrome with a CDP port.status: Check whether CDP is reachable.open: Open a URL in a new tab.list: List current tabs.eval: Evaluate JavaScript in the selected tab.click: Click an element by CSS selector.type: Type text into an element by CSS selector.screenshot: Capture the selected tab to a PNG file.
Input
{
"action": "open",
"port": 9222,
"url": "https://example.com"
}
{
"action": "type",
"port": 9222,
"selector": "input[name='q']",
"text": "RestFlow"
}
Output
{
"ok": true,
"action": "open",
"data": {
"target_id": "ABC",
"url": "https://example.com/"
},
"error": null
}
CLI Examples
cargo run -- launch --port 9222
cargo run -- open --port 9222 --url https://example.com
cargo run -- eval --port 9222 --expression "document.title"
cargo run -- screenshot --port 9222 --path /tmp/cdp.png