{
  "markdown": "<div align=\"right\">\n  <details>\n    <summary>🌐 Language</summary>\n    <div>\n      <div align=\"center\">\n        <a href=\"https://openaitx.github.io/view.html?user=eze-is&project=web-access&lang=en\">English</a>\n        | <a href=\"https://openaitx.github.io/view.html?user=eze-is&project=web-access&lang=zh-CN\">简体中文</a>\n        | <a href=\"https://openaitx.github.io/view.html?user=eze-is&project=web-access&lang=zh-TW\">繁體中文</a>\n        | <a href=\"https://openaitx.github.io/view.html?user=eze-is&project=web-access&lang=ja\">日本語</a>\n        | <a href=\"https://openaitx.github.io/view.html?user=eze-is&project=web-access&lang=ko\">한국어</a>\n        | <a href=\"https://openaitx.github.io/view.html?user=eze-is&project=web-access&lang=fr\">Français</a>\n        | <a href=\"https://openaitx.github.io/view.html?user=eze-is&project=web-access&lang=de\">Deutsch</a>\n        | <a href=\"https://openaitx.github.io/view.html?user=eze-is&project=web-access&lang=es\">Español</a>\n        | <a href=\"https://openaitx.github.io/view.html?user=eze-is&project=web-access&lang=pt\">Português</a>\n        | <a href=\"https://openaitx.github.io/view.html?user=eze-is&project=web-access&lang=ru\">Русский</a>\n      </div>\n    </div>\n  </details>\n</div>\n\n<img width=\"879\" height=\"376\" alt=\"image\" src=\"https://github.com/user-attachments/assets/a87fd816-a0b5-4264-b01c-9466eae90723\" />\n\n<p align=\"center\">\n  <b>给 AI Agent 装上完整联网能力的 Skill。</b><br/>\n  <a href=\"https://web-access.eze.is\">🌐 官网</a> · <a href=\"https://mp.weixin.qq.com/s/rps5YVB6TchT9npAaIWKCw\">📖 设计详解</a> · <a href=\"#安装\">⚡ 快速安装</a>\n</p>\n\nAI Agent 原本的联网能力（WebSearch、WebFetch）缺少调度策略和浏览器自动化能力。这个 Agent Skill 补上的是：**联网策略 + CDP 浏览器操作 + 站点经验积累**。兼容所有支持 SKILL.md 的 Agent（Claude Code、Cursor、Gemini CLI、Codex CLI 等）。\n\n> 推荐必读：[Web Access：一个 Skill，拉满 Agent 联网和浏览器能力](https://mp.weixin.qq.com/s/rps5YVB6TchT9npAaIWKCw) ，完整介绍了 Web-Access Skill 的开发细节与 Agent Skill 设计哲学，帮助你也能写出类似通用、高上限的 Skill\n\n---\n\n## v2.5.4 能力\n\n| 能力 | 说明 |\n|------|------|\n| 联网工具自动选择 | WebSearch / WebFetch / curl / Jina / CDP，按场景自主判断，可任意组合 |\n| CDP Proxy 浏览器操作 | 直连用户日常浏览器（Chrome / Edge / Chromium 系），天然携带登录态，支持动态页面、交互操作、视频截帧 |\n| 三种点击方式 | `/click`（JS click）、`/clickAt`（CDP 真实鼠标事件）、`/setFiles`（文件上传） |\n| 本地浏览器书签/历史检索 | `find-url.mjs` 跨 Chrome / Edge 查询公网搜不到的目标（内部系统）或用户访问过的页面，支持关键词/时间窗/访问频度排序 |\n| 并行分治 | 多目标时分发子 Agent 并行执行，共享一个 Proxy，tab 级隔离 |\n| 站点经验积累 | 按域名存储操作经验（URL 模式、平台特征、已知陷阱），跨 session 复用 |\n| 媒体提取 | 从 DOM 直取图片/视频 URL，或对视频任意时间点截帧分析 |\n\n**v2.5.4 更新：**\n- **修复新标签页空白竞态** — `/new` 先创建 `about:blank` 并完成 CDP attach，再显式导航；不再把浏览器初始空白文档误判为目标页面\n- **目标内容就绪契约** — 导航成功或 `readyState` 完成不等于任务完成；遇到验证页、登录跳转和异步渲染时继续观察，直到目标内容出现或确认受阻\n- **完整 URL 安全传输** — `/new` 和 `/navigate` 从 v2.5.3 起使用 POST body 传 URL，查询参数中的 `&` 不再被错误切分\n\n<details><summary>v2.5.2 更新</summary>\n\n- **Microsoft Edge 支持** — CDP Proxy 不再绑定 Chrome，新增 Edge 适配（及 Chromium、Chrome Canary 等 Chromium 系，通过同一套自动发现机制接入）。在 `edge://inspect/#remote-debugging` 勾选 \"Allow remote debugging for this browser instance\" 即可\n- **浏览器偏好持久化** — 新增 `config.env`（gitignored，首次运行从模板创建），通过 `WEB_ACCESS_BROWSER` 固定默认浏览器；多浏览器同时开启 toggle 时 Agent 会询问偏好。也支持单次覆盖 `--browser <chrome|edge>`\n- **不擅自降级** — 偏好/指定的浏览器没启动或没开 toggle 时硬错并给出明确处理步骤，不会悄悄连到别的浏览器；proxy 首次成功连接后 pin 住浏览器 id，避免运行中漂移\n- **find-url 也支持 Edge** — 本地书签/历史检索默认遍历 Chrome 与 Edge，可用 `--browser <chrome|edge>` 限定单一浏览器\n</details>\n\n<details><summary>v2.5.0 更新</summary>\n\n- **本地 Chrome 资源检索** — 新增 `scripts/find-url.mjs`，从本地 Chrome 书签/历史按关键词/时间窗/访问频度定位 URL。典型场景：用户提到组织内部系统（\"我们的 XX 平台\"等公网搜不到的目标）、回查之前访问过但不记得地址的页面、查看最近高频访问网站等（场景感谢 @MVPGFC 在 #60 提出）\n</details>\n\n<details><summary>v2.4.3 更新</summary>\n\n- **修复 CLAUDE_SKILL_DIR 路径问题** — bash 代码块改用 `${CLAUDE_SKILL_DIR}` 字符串替换语法，修复 Windows Git Bash 路径转换错误和变量未设置问题（#47 #46）\n- **站点经验列表合并到前置检查** — 启动检查通过后自动输出已有站点经验列表，移除不可靠的 `!` 内联注入\n</details>\n\n<details><summary>v2.4.1 更新</summary>\n\n- **跨平台支持** — 脚本从 bash 迁移到 Node.js，Windows / Linux / macOS 均可使用\n- **DOM 边界穿透** — 新增技术事实：eval 递归遍历可穿透 Shadow DOM、iframe 等选择器不可跨越的边界\n</details>\n\n<details><summary>v2.4 更新</summary>\n\n- **站点内 URL 可靠性** — 新增事实说明：站点生成的链接自带完整上下文，手动构造的 URL 可能缺失隐式必要参数\n- **平台错误提示不可信** — 新增技术事实：平台返回的\"内容不存在\"等提示可能是访问方式问题而非内容本身问题\n- **小红书站点经验增强** — xsec_token 机制、创作者平台状态校验、暂存草稿流程\n</details>\n\n<details><summary>v2.3 更新</summary>\n\n- **浏览哲学重构** — 更清晰的「像人一样思考」框架，强调目标驱动而非步骤驱动\n- **Jina 积极推荐** — 明确鼓励在合适场景主动使用 Jina 节省 token\n- **子 Agent prompt 指引优化** — 明确加载写法，增加避免动词暗示执行方式的说明\n</details>\n\n## 安装\n\n**方式一：npx skills 一键安装（推荐）**\n\n```bash\nnpx skills add eze-is/web-access\n```\n\n> [skills CLI](https://github.com/vercel-labs/skills) 是开源的 Agent Skill 包管理器，自动检测你的 Agent 环境并安装到正确位置。\n\n**方式二：让 Agent 自动安装**\n\n```\n帮我安装这个 skill：https://github.com/eze-is/web-access\n```\n\n**方式三：Plugin 安装（Claude Code）**\n\n```bash\nclaude plugin marketplace add https://github.com/eze-is/web-access\nclaude plugin install web-access@web-access --scope user\n```\n\n**方式四：手动**\n\n```bash\ngit clone https://github.com/eze-is/web-access ~/.claude/skills/web-access\n```\n\n## 前置配置（CDP 模式）\n\nCDP 模式需要 **Node.js 22+** 和浏览器（Chrome / Edge）开启远程调试：\n\n1. 在你想用的浏览器地址栏打开对应 inspect 页面：\n   - Chrome：`chrome://inspect/#remote-debugging`\n   - Edge：`edge://inspect/#remote-debugging`\n2. 勾选 **Allow remote debugging for this browser instance**（可能需要重启浏览器）\n\n### 浏览器偏好（config.env）\n\nskill 长期偏好保存在 `${CLAUDE_SKILL_DIR}/config.env`（首次运行自动从 `config.env.template` 创建，gitignored）：\n\n```bash\n# 留空 = 每次启动都询问偏好；设值 = 固定使用该浏览器\nWEB_ACCESS_BROWSER=edge\n```\n\n合法值：`chrome` / `edge`\n\n**临时用别的浏览器**（不修改 config.env）：\n\n```bash\nnode \"${CLAUDE_SKILL_DIR}/scripts/check-deps.mjs\" --browser chrome\n```\n\n**切换浏览器**（proxy 已连接旧的）：\n\n```bash\npkill -f cdp-proxy.mjs && node \"${CLAUDE_SKILL_DIR}/scripts/check-deps.mjs\"\n```\n\n环境检查（Agent 运行时会自动完成前置检查，无需手动执行）：\n\n```bash\nnode \"${CLAUDE_SKILL_DIR}/scripts/check-deps.mjs\"\n# $CLAUDE_SKILL_DIR 是 skill 加载时自动设置的环境变量\n# 手动运行请替换为实际路径，如 ~/.claude/skills/web-access\n```\n\n## CDP Proxy API\n\nProxy 通过 WebSocket 直连浏览器（兼容 `chrome://inspect` / `edge://inspect` 方式，无需命令行参数启动），提供 HTTP API：\n\n```bash\n# 启动（Agent 会自动管理 Proxy 生命周期，无需手动启动）\nnode \"${CLAUDE_SKILL_DIR}/scripts/cdp-proxy.mjs\" &\n\n# 页面操作\ncurl -s -X POST --data-raw 'https://example.com' http://localhost:3456/new  # 新建 tab（v2.5.3 起 URL 走 POST body）\ncurl -s -X POST \"http://localhost:3456/eval?target=ID\" -d 'document.title'  # 执行 JS\ncurl -s -X POST \"http://localhost:3456/click?target=ID\" -d 'button.submit'  # JS 点击\ncurl -s -X POST \"http://localhost:3456/clickAt?target=ID\" -d '.upload-btn'  # 真实鼠标点击\ncurl -s -X POST \"http://localhost:3456/setFiles?target=ID\" \\\n  -d '{\"selector\":\"input[type=file]\",\"files\":[\"/path/to/file.png\"]}'        # 文件上传\ncurl -s \"http://localhost:3456/screenshot?target=ID&file=/tmp/shot.png\"     # 截图\ncurl -s \"http://localhost:3456/scroll?target=ID&direction=bottom\"           # 滚动\ncurl -s \"http://localhost:3456/close?target=ID\"                             # 关闭 tab\ncurl -s \"http://localhost:3456/health\"                                      # 查看状态（含 managedTabs 数量）\n```\n\nProxy 会自动追踪通过 `/new` 创建的 tab，闲置 15 分钟后自动关闭，防止 Agent 异常退出时留下孤儿 tab。可通过环境变量 `CDP_TAB_IDLE_TIMEOUT`（单位毫秒）调整超时时间。\n\n## ⚠️ 使用前提醒\n\n通过浏览器自动化操作社交平台（如小红书）存在账号被平台限流或封禁的风险。**强烈建议使用小号进行操作。**\n\n## 使用\n\n安装后直接让 Agent 执行联网任务，skill 自动接管：\n\n- \"帮我搜索 xxx 最新进展\"\n- \"读一下这个页面：[URL]\"\n- \"去小红书搜索 xxx 的账号\"\n- \"帮我在创作者平台发一篇图文\"\n- \"同时调研这 5 个产品的官网，给我对比摘要\"\n\n## 设计哲学\n\n> Skill = 哲学 + 技术事实，不是操作手册。讲清 tradeoff 让 AI 自己选，不替它推理。\n\n详见 [SKILL.md](./SKILL.md) 中的浏览哲学部分。\n\n## License\n\nMIT · 作者：[一泽 Eze](https://github.com/eze-is) · [官网](https://web-access.eze.is)\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=eze-is/web-access&type=Date)](https://star-history.com/#eze-is/web-access&Date)\n\n## Clawhub Download History\n\n[![Download History](https://skill-history.com/chart/eze-is/web-access.svg)](https://skill-history.com/eze-is/web-access)\n\n<img width=\"1280\" height=\"306\" alt=\"image\" src=\"https://github.com/user-attachments/assets/2afa25c2-3730-413e-b40f-94e52567249d\" />\n",
  "bytes": 7784,
  "sha": "dc213ede611f118900f8dad7229380563e5364c21a44db0eb809aa858a82e491",
  "repo_slug": "eze-is/web-access",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/skl_eze_is_web_access_web_access_7bb3da75/readme"
}