From 7f9e36160ef7e83d4c72bd4166e44934ccc90c92 Mon Sep 17 00:00:00 2001 From: hp0912 <809211365@qq.com> Date: Thu, 4 Jun 2026 21:05:28 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=BD=91=E9=A1=B5=E5=B7=A5=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- skills/web-page/SKILL.md | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/skills/web-page/SKILL.md b/skills/web-page/SKILL.md index 6fe5f5a..eb25ea4 100644 --- a/skills/web-page/SKILL.md +++ b/skills/web-page/SKILL.md @@ -10,8 +10,6 @@ argument-hint: "需要 url;mode 可为 content 或 screenshot;自动化可 这是一个本地网页读取、自动化交互和截图技能。它使用基础镜像中的 Chromium 以 headless 模式打开网页,通过 Chrome DevTools Protocol 在本地完成页面渲染、点击、输入、表单操作、正文抽取和截图,不调用外部 AI 接口。 -验证码处理采用安全边界内的自动检测:脚本可以识别常见验证码/人机验证页面并停止自动化,给出明确错误提示;不提供破解、绕过、代答验证码或规避网站风控的能力。遇到验证码时,应让用户在合法授权下人工完成验证,或使用已验证后的页面/会话环境继续处理。 - 技能脚本位于 `scripts/web_page.ts`,依赖基础镜像提供的 Node.js 24+ 和全局安装的 `tsx`(用于直接运行 TypeScript)以及 Chromium。基础镜像中已配置 `CHROME_BIN=/usr/bin/chromium` 和 `CHROME_PATH=/usr/bin/chromium` 时,无需额外安装浏览器。 ## 触发条件 @@ -86,11 +84,6 @@ argument-hint: "需要 url;mode 可为 content 或 screenshot;自动化可 "action_timeout_ms": { "type": "integer", "description": "单个自动化动作默认超时时间,默认 15000。" - }, - "captcha_strategy": { - "type": "string", - "enum": ["detect", "ignore"], - "description": "验证码处理策略。detect 表示执行动作前后检测疑似验证码并停止;ignore 表示不检测。传 actions 时默认 detect,否则默认 ignore。" } }, "required": ["url"], @@ -110,7 +103,6 @@ argument-hint: "需要 url;mode 可为 content 或 screenshot;自动化可 - `--actions ''` 可选,页面打开后顺序执行的自动化动作 - `--actions_file <本地JSON路径>` 可选,从文件读取自动化动作 - `--action_timeout_ms <毫秒>` 可选,单个动作默认超时时间,默认 `15000` -- `--captcha_strategy ` 可选,传 actions 时默认 `detect`,否则默认 `ignore` - `--output <本地PNG路径>` 可选,仅截图模式使用 - `--send ` 可选,仅截图模式使用,默认 `auto` @@ -141,7 +133,6 @@ argument-hint: "需要 url;mode 可为 content 或 screenshot;自动化可 - `wait_for_selector`:等待元素状态。需要 `selector`,可选 `state` 为 `attached`、`visible`、`hidden`、`detached`,默认 `visible`。 - `scroll`:按偏移滚动页面。可选 `x`、`y`,默认 `x=0,y=600`。 - `scroll_to`:滚动到坐标或元素。可传 `x/y`,或传 `selector` / `text`。 -- `captcha_check`:主动检查当前页面是否疑似出现验证码/人机验证。 示例:点击链接后读取跳转页面内容。 @@ -192,7 +183,6 @@ tsx scripts/web_page.ts --url 'https://example.com' --mode content 2. 如果动作会触发页面跳转,给对应动作设置 `wait_for_navigation: true`。 3. 如果需要等待异步渲染结果,使用 `wait_for_selector` 或设置更长的 `wait_ms_after`。 4. 自动化动作完成后,继续按 `mode=content` 输出页面内容,或按 `mode=screenshot` 输出/发送截图。 -5. 默认情况下,只要传了 `actions`,脚本会启用 `captcha_strategy=detect`。检测到疑似验证码时会停止操作并输出失败原因;不要尝试破解或绕过验证码。 ### 截图网页 @@ -234,7 +224,6 @@ tsx scripts/web_page.ts --url 'https://example.com' --mode screenshot --screensh - `actions` 必须是 JSON 数组,或包含 `actions` 数组的 JSON 对象。 - `actions_file` 必须是可读取的本地 JSON 文件。 - `action_timeout_ms` 和单个动作的 `timeout_ms` 必须大于 0。 -- `captcha_strategy` 只能是 `detect` 或 `ignore`。 - 自动化动作必须符合对应类型的必填字段要求,例如 `fill` 必须传 `selector` 和 `value`,`click` 必须传 `selector` 或 `text`。 - Chromium 路径优先读取 `CHROME_BIN`,其次读取 `CHROME_PATH`,再回退到常见系统路径。 @@ -242,7 +231,6 @@ tsx scripts/web_page.ts --url 'https://example.com' --mode screenshot --screensh - `content` 模式成功时,智能体应基于脚本输出给用户总结、解释或回答问题。 - 自动化动作失败时,脚本会输出具体失败在第几个 action 及失败原因。 -- 检测到验证码/人机验证时,回复用户需要人工完成验证或提供已验证后的页面环境;不要承诺自动破解验证码。 - `screenshot` 模式成功且已发送图片时,脚本输出「页面截图已发送」。 - `screenshot` 模式成功但未发送图片时,脚本输出本地 PNG 路径,智能体可继续用 `send-local-image` 技能发送。 - 失败时,返回脚本输出的具体错误信息。