browser-login
它能做什么
这项技能指导智能体完成登录流程,并以安全的形式保存会话以便复用。适合反复使用需要登录的网站的人。
适用场景
- ✓当你将多次访问同一网站,并需要保持登录状态时。
- ✓当已过期的会话需要刷新时。
- ✓当登录过程包含需要你输入的多重验证步骤时。
技能链接
https://github.com/ruvnet/ruflo/blob/main/plugins/ruflo-browser/skills/browser-login/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我登录供应商门户一次,并保留会话,让我接下来的任务可以直接使用。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体使用你提供的凭据完成登录,遇到多重验证步骤时暂停,并只保存 Cookie 的名称和元数据(不保存值)作为可复用的引用。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Browser Login
Authenticate against a target site once, then vault the resulting session credentials so subsequent skills (browser-extract, browser-form-fill, browser-test) can reuse them without re-driving the auth flow. Borrows the pattern from Browserbase's cookie-sync/SKILL.md but stores the resulting context in AgentDB rather than on a hosted backend.
When to use
- Establishing reusable auth for a host the agent will visit repeatedly.
- Refreshing a vaulted cookie set whose expiry has passed.
- Capturing an MFA-protected session that requires interactive completion.
Steps
- Open a recorded session via
browser-record. - Drive the auth flow — fill credentials with
browser_fill/browser_type. Credentials come from the user or environment; do not read them from.envor paste them into the trajectory args. - Handle MFA (when
--mfa): pause for user input or invoke the user's TOTP helper; capture only the resulting redirect, not the code itself. - Capture cookie metadata, not values. Run
browser_evalwith an expression that returns only each cookie's name, value length and a Shannon-entropy estimate, for exampledocument.cookie.split('; ').map(c => { const [n, ...v] = c.split('='); return { name: n, length: v.join('=').length } }). Never returndocument.cookieitself: tool output goes straight into the model's context, so the raw values would be exposed before any gate runs.document.cookiealso cannot seeHttpOnlycookies, which are usually the session cookie; if the session isHttpOnly, record that fact and rely on the browser profile staying alive rather than on a captured value. - Classify each cookie from the metadata in step 4 (name pattern, length, entropy). Anything that looks like a session or auth token is vault-wrapped (an opaque handle) before AgentDB store; raw values never enter the namespace or the model's context.
- Store in
browser-cookies:npx -y @claude-flow/cli@latest memory store --namespace browser-cookies \ --key "<host>" \ --value "{vault_handle:<opaque>, expiry:<iso>, aidefence_verdict:safe}" - Return the vault handle. Downstream skills look it up with
browser_cookie_use(host in, handle record out).
Caveats
- Never log raw cookie values, tokens, or passwords. The trajectory step for the auth POST records only the form field names and a
<redacted>placeholder for values. browser_cookie_useis implemented, but it only returns the handle record (handle, expiry, AIDefence verdict) for a host. No tool injects a vaulted cookie into a live page, so a re-used login still needs a browser profile that already holds the session, or a freshbrowser-login.- Some sites bind cookies to a UA fingerprint; if a vaulted cookie fails on reuse, re-run
browser-login. Do not attempt to fingerprint-match yourself. - This skill is not a credential storage solution. The vault-handle pattern protects against AgentDB leaks, not against compromise of the agent's environment.
常见问题
我的密码会被保存吗?
这项技能说明,凭据由你提供或来自环境变量,不会被粘贴到操作轨迹中。
Cookie 的值会被保存吗?
这项技能说明,它不返回 Cookie 的值,只返回名称和元数据。
两步验证怎么办?
当需要多重验证步骤时,这项技能会暂停并等待你的输入。
详情
作者的原始描述
Drive an authentication flow once, sanitize cookies through AIDefence, and vault a reusable cookie handle in browser-cookies for future sessions
repo: ruvnet/ruflo
热度
- GitHub 星标
- 81k
- 排名
- #1579
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agent-adaptive-coordinator
81k帮你的智能体在工作量变化时拆分和重新平衡一组 AI 智能体,并选择适合任务的分工方式。
agent-agent
81k教你的智能体把一个大目标拆成有顺序的行动计划,并在情况变化时重新规划。
agent-agentic-payments
81k帮你的智能体管理 AI 购物的消费授权,包括消费上限、时间窗口、商户规则和签名审批。
agent-analyze-code-quality
81k帮你的智能体检查代码质量,找出代码异味、技术债务和重构建议,且不改动文件。