Borrowing it
Nothing to install: this file belongs to bifrost-proxy/bifrost. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/bifrost-proxy/bifrost/main/.agents/skills/site-cookie-login/SKILL.mdgit clone --depth 1 https://github.com/bifrost-proxy/bifrostWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/bifrost-proxy/bifrost/site-cookie-login)<a href="https://agentmods.dev/skills/bifrost-proxy/bifrost/site-cookie-login"><img src="https://agentmods.dev/badge/skills/bifrost-proxy/bifrost/site-cookie-login.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00053 | $0.01037 |
| Opus 5 | $0.00026 | $0.00518 |
| Sonnet 5 | $0.00011 | $0.00207 |
| Haiku 4.5 | $0.00005 | $0.00104 |
Grade A, and why
site-cookie-login scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 99 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Site Cookie Login
通用的「浏览器登录 → 抓 Cookie → 校验登录态 → 持久化」能力,可接入任意需要浏览器登录的站点。
适用场景
- 目标站点不提供 API Token,只能通过浏览器登录获取 Cookie
- 需要把登录态 Cookie 落盘供后续自动化脚本使用
- 需要在 Cookie 失效时自动触发重新登录
核心流程
- 用可视浏览器(Puppeteer)打开目标站点登录页
- 等待用户在浏览器中完成登录(支持手动触发检测)
- 从浏览器抓取目标域的全部 Cookie
- 检查必需 Cookie 是否存在(
requiredCookies) - 用 HTTP 探针请求一个需要鉴权的接口,验证登录态真实可用(
verify) - 校验通过后将 Cookie 保存到指定文件
快速使用
1. 安装依赖
cd .trae/skills/site-cookie-login/scripts
npm install
2. 创建站点配置
复制模板并按目标站点修改参数:
cp .trae/skills/site-cookie-login/references/config.template.json .env/<your-site>-login.json
3. 执行登录
node .trae/skills/site-cookie-login/scripts/site-login.js --config .env/<your-site>-login.json
配置文件说明
配置模板位于 references/config.template.json,所有 <placeholder> 需替换为实际值。
基础字段
| 字段 | 说明 |
|---|---|
name |
站点显示名称,用于日志输出 |
url |
浏览器打开的登录页 URL |
domain |
目标 Cookie 的域名(用于从浏览器筛选 Cookie) |
outputFile |
Cookie 输出文件路径(建议使用相对路径,如 .env/.cookie.<site>) |
timeout |
等待登录的超时时间(毫秒),默认 300000(5 分钟) |
Cookie 相关
| 字段 | 说明 |
|---|---|
requiredCookies |
字符串数组,判定登录成功必须存在的 Cookie 名 |
mergeCookieFiles |
可选,额外的 Cookie 文件路径数组,会与浏览器抓取的 Cookie 合并(如 SSO 共享的 Cookie) |
验证探针(verify)
用于通过 HTTP 请求验证 Cookie 是否真正有效:
| 字段 | 说明 |
|---|---|
url |
需要鉴权的 API 端点 |
method |
HTTP 方法(GET / POST 等) |
headers |
请求头(Cookie 由脚本自动注入,无需手动填写) |
body |
请求体,留 null 表示无 body |
successStatuses |
视为成功的 HTTP 状态码数组,如 [200] |
rejectBodyIncludes |
响应体中包含任一字符串则判定失败(如 "not login") |
successBodyIncludes |
响应体中需包含任一字符串才判定成功,留空数组表示不检查 |
验证策略
建议同时启用两层校验以确保可靠性:
- Cookie 存在性检查:通过
requiredCookies确认关键 Cookie 已获取 - HTTP 探针验证:通过
verify发送真实 API 请求确认登录态有效
仅配置 requiredCookies 而不配置 verify 也可以工作,但无法保证 Cookie 未过期。
接入新站点的工作流
- 分析目标站点:在浏览器 DevTools 中登录目标站点,观察哪些 Cookie 是登录态的关键标识
- 找到鉴权接口:在 Network 面板找一个需要登录才能正常响应的 API,用于做登录态探针
- 创建配置文件:基于模板填写站点信息、必需 Cookie、验证接口
- 测试登录流程:运行
site-login.js,确认 Cookie 能正常落盘 - 集成到业务脚本:让业务脚本读取输出的 Cookie 文件,在鉴权失败时可复用此 skill 重新登录
What ships with it
5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 7d ago First seen · 99 lines · 53 tokens per session scan A 65a6ff9aa5dd
site-cookie-login is a skill published in the GitHub repository bifrost-proxy/bifrost (130 stars, last pushed yesterday), licensed MIT. It adds 53 tokens to every session and 1,037 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
omh-rust
This is a Hermes-native rust workflow skill.
omh-browser
This is a Hermes-native browser-operator workflow skill.
browser-cdp
Use this skill when you need to control a Chrome browser via CDP (Chrome DevTools Protocol) to reuse existing login sessions. Covers: launching Chrome in debug mode, opening URLs, waiting for page load, evaluating JavaScript, taking snapshots, and extracting auth tokens. Trigger phrases: browser automation, CDP…
playwright-pro
Production-grade Playwright testing skill for E2E suites, flaky test diagnosis, browser automation, migration from Cypress/Selenium, CI integration, visual checks, and regression validation.
agent-browser
Use when an agent needs real browser automation for semantic element targeting, form interaction, screenshots, recordings, script execution, session reuse, or end-to-end web workflow verification.
playwright
Use when the task requires automating a real browser from the terminal (navigation, form filling, snapshots, screenshots, data extraction, UI-flow debugging) via playwright-cli or the bundled wrapper script.