browser-login
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBrowser Login
浏览器登录
Authenticate against a target site once, then vault the resulting session credentials so subsequent skills (, , ) can reuse them without re-driving the auth flow. Borrows the pattern from Browserbase's but stores the resulting context in AgentDB rather than on a hosted backend.
browser-extractbrowser-form-fillbrowser-testcookie-sync/SKILL.md只需针对目标站点执行一次认证,然后存储生成的会话凭证,这样后续技能(、、)无需重新执行认证流程即可复用这些凭证。该模式借鉴自Browserbase的,但将生成的上下文存储在AgentDB中,而非托管后端。
browser-extractbrowser-form-fillbrowser-testcookie-sync/SKILL.mdWhen 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.
- 为Agent需要重复访问的主机建立可复用的认证机制。
- 刷新已过期的存储Cookie集合。
- 捕获需要交互式完成的MFA保护会话。
Steps
步骤
- Open a recorded session via .
browser-record - Drive the auth flow — fill credentials with /
browser_fill. Credentials come from the user or environment; do not read them frombrowser_typeor paste them into the trajectory args..env - Handle MFA (when ): pause for user input or invoke the user's TOTP helper; capture only the resulting redirect, not the code itself.
--mfa - Capture cookies via :
browser_evalOr use the Playwright context API where exposed.javascriptdocument.cookie // returns the cookie string for the active document - AIDefence sanitize:
Tokens that look raw get vault-wrapped (an opaque handle) before AgentDB store; raw values never enter the namespace.bash
# Each cookie value passes aidefence_scan to flag raw secrets / high-entropy tokens. - Store in :
browser-cookiesbashnpx -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 so downstream skills can mount it via the planned MCP tool.
browser_cookie_use
- 通过打开录制会话。
browser-record - 执行认证流程——使用/
browser_fill填写凭证。凭证来自用户或环境;请勿从browser_type读取或粘贴到轨迹参数中。.env - 处理MFA(当使用参数时):暂停等待用户输入或调用用户的TOTP助手;仅捕获最终的重定向,而非验证码本身。
--mfa - 通过捕获Cookie:
browser_eval或使用已暴露的Playwright上下文API。javascriptdocument.cookie // 返回当前文档的Cookie字符串 - AIDefence清理:
看起来是原始值的令牌会先进行存储封装(一个不透明句柄),再存入AgentDB;原始值绝不会进入命名空间。bash
# 每个Cookie值都会经过aidefence_scan检查,标记原始密钥/高熵令牌。 - 存储到:
browser-cookiesbashnpx -y @claude-flow/cli@latest memory store --namespace browser-cookies \ --key "<host>" \ --value "{vault_handle:<opaque>, expiry:<iso>, aidefence_verdict:safe}" - 返回存储句柄,以便下游技能通过规划中的MCP工具加载它。
browser_cookie_use
Caveats
注意事项
- Never log raw cookie values, tokens, or passwords. The trajectory step for the auth POST records only the form field names and a placeholder for values.
<redacted> - The MCP tool is reserved (ADR-0001 §7) but not yet implemented. Until then, downstream skills mount the vaulted cookies via a helper bash function in
browser_cookie_use(TBD).scripts/ - Some sites bind cookies to a UA fingerprint; if a vaulted cookie fails on reuse, re-run . Do not attempt to fingerprint-match yourself.
browser-login - 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值、令牌或密码。认证POST的轨迹步骤仅记录表单字段名称,值则用占位符替代。
<redacted> - MCP工具已预留(ADR-0001 §7)但尚未实现。在此之前,下游技能通过
browser_cookie_use中的辅助bash函数加载存储的Cookie(待完成)。scripts/ - 部分站点会将Cookie与UA指纹绑定;如果存储的Cookie复用失败,请重新运行。请勿尝试自行匹配指纹。
browser-login - 本技能并非凭证存储解决方案。存储句柄模式可防止AgentDB泄露,但无法防范Agent环境被攻陷的风险。