一键导入
browser-guide
Best practices for using the managed browser — handling login walls, CAPTCHAs, lazy-loaded content, paywalls, and tab cleanup. Target=camoufox 主力路径。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Best practices for using the managed browser — handling login walls, CAPTCHAs, lazy-loaded content, paywalls, and tab cleanup. Target=camoufox 主力路径。
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
智能搜索路由器。根据用户意图选择最佳搜索源,构造 URL 并导航,获取内容。 仅在默认搜索手段效果不佳、或需要登录自媒体平台(抖音/小红书/微博等)搜索时启用本技能; 常规通用搜索请先用 onboard 配置的搜索供应商(火山/serper/Tavily 等)。
Search WeChat Official Accounts, retrieve the account's latest post list, and fetch full article content by URL. Also supports interactive QR-code login flow for session management.
通过浏览器自动化发布视频到抖音创作者中心。纯浏览器操作方案。
平台登录态管理。约定各平台登录流程(强制有头手动登录)、探活规则、中央 cookie+UA 存储路径约定。仅管 4 个平台(douyin/kuaishou/bilibili/xhs-browse)。
发布记录追踪。使用 SQLite 数据库记录所有平台发布内容及其互动数据,按平台分表管理。三大块:与发布技能结合(发布记录 1B;打分+预测 1A 由 content-calibrator 负责)、数据更新、查询与平台设置。
下载分析抖音/B站/小红书爆款视频,生成追爆报告。仅产出报告,脚本另外使用 video-product 技能根据 追爆报告.md 生成。
| name | browser-guide |
| description | Best practices for using the managed browser — handling login walls, CAPTCHAs, lazy-loaded content, paywalls, and tab cleanup. Target=camoufox 主力路径。 |
| metadata | {"openclaw":{"emoji":"🌐"}} |
Follow these rules whenever you drive a browser against web pages.
本 skill 默认主力路径是 target=camoufox——即全局可用的 camoufox-cli 命令。下方所有操作命令、示例、selector 都只针对 target=camoufox 写。
如果你当前是 target=host(existing-session 真机 Chrome + chrome-mcp relay)或 target=node(remote-cdp 远端 Chrome):
camoufox-cli ... 命令、snapshot ref、eval 入参等具体操作和示例。camoufox-cli --session <name> [--persistent] [--headed] [--json] <command> [args...]
--session <name>:会话隔离单元,同名 session 共享一个 profile 目录。涉及登录的平台用一个且只用一个持久化 session 名。--persistent:冻结指纹到 ~/.camoufox-cli/profiles/<name>/camoufox-cli.json(首次生成后冻结)。持久化平台 session 必带;临时性 session(新闻等不登录站点)不带——走默认临时 profile,每次随机指纹,关闭自清。--headed:有头模式。需要用户配合过验证码、扫码、收短信的,或者填表场景,必须 --headed。例外:微信公众号 wx_mp 可无头截含二维码区域截图发用户登录;微信视频号 wechat-channel / 微博 / 闲鱼等扫码登录页无法无头截 QR,必须 --headed 弹窗让用户在浏览器里手动扫码。其他场景,包括探活,都可以使用默认的无头模式。--viewport <WxH>:固定窗口尺寸,如 1920x1080。camoufox 默认按指纹给移动端窗口比例,导致有头登录时二维码看不全;有头扫码登录(微博 / 闲鱼 / 视频号等)一律加 --viewport 1920x1080 强制桌面比例。业务无头操作无需此 flag。--json:命令输出走 JSON 信封({ok, ...} / {error, ...}),agent 解析稳定,推荐常带。upload / identity export):
open / back / forward / reload / url / title / close / snapshot / click / fill / type / select / check / hover / press / text / eval / screenshot / pdf / scroll / wait / tabs / switch / close-tab / sessions / cookies / install / upload / identityfail-first 队列:同一 session 已有命令在跑时,新命令直接 fail,返回文本:
session <name> 正忙,请等待当前操作完成后再试
读到这条 fail 文本说明有其他进程在使用同名session,你应该等待一段时间后再重试,卡死用 camoufox-cli close --all 兜底 teardown。
camoufox-cli 的 snapshot 返回带 ref 的语义快照(@e1 @e2 …),后续 click / fill / type / upload / hover / press 全部优先传 ref,不要自己 hack CSS selector。找不到元素时先 snapshot 看真实 DOM 结构再决定 selector 改写,不要盲试。
每个 camoufox-cli --session <s> open 都会拉起一个独立 daemon + 完整 Firefox 实例(每个 200-400MB + 若干 content 进程)。不关就一直在(idle 60s 才自退)。一次任务里开几十个 session 又不 close,13GB 机器几分钟就死机(真实事故:72 open / 1 close)。
铁律:
camoufox-cli --session <s> --json close。哪怕后面还要搜,也先 close 再开下一个,或干脆复用同一个 session 名(不要每次 search-$(date +%s) 起新名)——同名 session 复用同一个 daemon,不堆积。~/.camoufox-cli/profiles/<name>/),daemon 退出不丢登录,下次 open 自动加载。持久化 ≠ 一直开着。camoufox-cli --json close --all 兜底清掉所有自己开的 session。源头已有兜底:daemon idle 60s 自退 + 全局并发 daemon 上限 8(超了驱逐最老的)。但 skill 侧仍必须自觉 close——兜底是最后防线,不是不关的理由。
When a page shows a login wall, first identify which login mechanism is offered, then follow the matching procedure below.
General constraint: retry at most 2 times per login attempt — frequent retries risk account suspension.
When the login page shows a QR code (WeChat Official Account backend, WeChat Channels, Xiaohongshu creator centre, X/Twitter, etc.):
camoufox-cli --session <s> --json screenshot /tmp/qr-<platform>.png 截下 QR 图(或 snapshot 拿到 QR 元素 ref 后用 eval 取其 src/data URI)。"[平台名称] 登录已失效(或首次使用),请用 [平台] APP 扫描以下二维码登录。扫码并在手机上点击确认后,回复"已扫码"。"
snapshot 看 URL 是否跳走 / QR 元素是否消失 / dashboard 是否出现). Auto-detected → resume immediately without waiting for user reply.显式有头/无头模式场景规则:只有以下场景需要显式指定
camoufox-cli的有头/无头参数:
- login-manager 登录(douyin / kuaishou / bilibili / xhs-publish / xhs-browse 5 平台)——强制
--headed,用户在浏览器手动扫码/短信/账号密码- 需要用户手动过验证(captcha / 滑块 / 短信)——
--headed,用户才能在浏览器里手动操作- web-form-fill 表单填报——强制
--headed,便于用户时刻观察填报情况、可随时介入纠正其他场景默认走 camoufox 持久化 session,不显式指定有头/无头——camoufox-cli 默认行为即可。
wx_mp(公众号)无头截图 QR 是特例,适用于
wx-mp-hunter+wx-mp-engagement两技能。视频号 / 微博 / 闲鱼等扫码登录页无法无头截 QR,必须--headed --viewport 1920x1080弹窗手动扫码(见各 skill 前置条件)。
When the login page asks for a phone number and SMS verification code:
"[平台名称] 需要手机验证码登录,请告知您在该平台注册的手机号。"
"短信验证码已发送,请将收到的验证码回复给我。"
When only a username + password form is available:
"[平台名称] 需要账号密码登录,浏览器中未找到预存密码。请选择:① 您自行在浏览器中登录后告知我,② 告知用户名和密码由我代为登录。"
If login cannot be completed for any reason (timeout, user unavailable, repeated failures):
When a page shows a one-click verification challenge (e.g., a button labelled "去验证", "Verify", "I'm not a robot", or a simple checkbox):
camoufox-cli --session <s> --json click <ref 或 selector>).snapshot 检查正常内容是否已加载.If the simple click in Step 2 above fails — the page still shows a challenge, the challenge is a puzzle/slider/image-selection CAPTCHA, or an error occurs:
涉及登录的 session 必须是 有头模式,用户才能在浏览器里手动过验证。无头跑出来的 session 遇验证码先 teardown 再换有头重开。
When a page uses lazy loading (infinite scroll, "load more" sections, content that appears only after scrolling):
camoufox-cli --session <s> --json scroll down 增量滚动,pause briefly between scrolls to allow content to load, then snapshot capture new content.eval / act kind="evaluate")camoufox-cli 的 eval 在页面上下文跑一段 JS 并回结果。入参必须是一个单一表达式,不是语句块。const/let/var 声明、分号、for/if 语句、function 声明都会触发 Invalid evaluate function 错误。
Wrong(语句块 — 会失败):
const items = document.querySelectorAll('.msg');
let found = false;
for (const item of items) {
if (item.textContent.includes('target')) { found = true; break; }
}
found ? 'ok' : 'no';
Correct(IIFE 包裹):
(function() {
var items = document.querySelectorAll('.msg');
for (var i = 0; i < items.length; i++) {
if (items[i].textContent.indexOf('target') > -1) { return items[i].innerText; }
}
return 'not found';
})()
Correct(纯表达式,简单查询):
document.querySelector('.reply-btn') ? 'found' : 'not found'
Rules:
(function(){ ... })()click <ref> 而非 evalsnapshot 而非 evalconst/let/var declarations or ; at the top level of fnWhen a page indicates that content is behind a paywall or requires a specific subscription (e.g., "Subscribe to continue reading", "Continue reading with a WSJ subscription", premium-only banners):