bifrost: Skill for Claude Code

.agents/skills/site-cookie-login/SKILL.md

site-cookie-login is a skill for Claude Code, Codex from bifrost-proxy/bifrost. It costs 53 tokens per session (1,037 once invoked), scanned A, original, MIT.

A browser-assisted login workflow that opens a website, waits for the user to sign in, collects that site’s cookies, checks required cookies and an authenticated HTTP request, and saves the result for later automation.

In plain words
What is it for?
Use it to configure and save login sessions for automated website access, including required-cookie checks, login timeouts, cookie merging, and authenticated probes.
Why use it?
It helps automate sites that do not provide an access token by preserving a verified browser login session and detecting when authentication did not really succeed.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is bifrost-proxy/bifrost's own configuration. It tells Claude Code and Codex how to work on bifrost itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything bifrost configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/bifrost-proxy/bifrost/main/.agents/skills/site-cookie-login/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/bifrost-proxy/bifrost

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for site-cookie-login

README.md
[![agentmods](https://agentmods.dev/badge/skills/bifrost-proxy/bifrost/site-cookie-login.svg)](https://agentmods.dev/skills/bifrost-proxy/bifrost/site-cookie-login)
Your own site
<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>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,037 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 7d ago against content hash 65a6ff9aa5dd, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

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.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/site-login.js), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

.agents/skills/site-cookie-login/SKILL.md · 99 lines

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.

通用的「浏览器登录 → 抓 Cookie → 校验登录态 → 持久化」能力,可接入任意需要浏览器登录的站点。

适用场景

  • 目标站点不提供 API Token,只能通过浏览器登录获取 Cookie
  • 需要把登录态 Cookie 落盘供后续自动化脚本使用
  • 需要在 Cookie 失效时自动触发重新登录

核心流程

  1. 用可视浏览器(Puppeteer)打开目标站点登录页
  2. 等待用户在浏览器中完成登录(支持手动触发检测)
  3. 从浏览器抓取目标域的全部 Cookie
  4. 检查必需 Cookie 是否存在(requiredCookies
  5. 用 HTTP 探针请求一个需要鉴权的接口,验证登录态真实可用(verify
  6. 校验通过后将 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 响应体中需包含任一字符串才判定成功,留空数组表示不检查

验证策略

建议同时启用两层校验以确保可靠性:

  1. Cookie 存在性检查:通过 requiredCookies 确认关键 Cookie 已获取
  2. HTTP 探针验证:通过 verify 发送真实 API 请求确认登录态有效

仅配置 requiredCookies 而不配置 verify 也可以工作,但无法保证 Cookie 未过期。

接入新站点的工作流

  1. 分析目标站点:在浏览器 DevTools 中登录目标站点,观察哪些 Cookie 是登录态的关键标识
  2. 找到鉴权接口:在 Network 面板找一个需要登录才能正常响应的 API,用于做登录态探针
  3. 创建配置文件:基于模板填写站点信息、必需 Cookie、验证接口
  4. 测试登录流程:运行 site-login.js,确认 Cookie 能正常落盘
  5. 集成到业务脚本:让业务脚本读取输出的 Cookie 文件,在鉴权失败时可复用此 skill 重新登录

Read the full file on GitHub · 99 lines

Files

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.

Changes

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.

  1. 7d ago First seen · 99 lines · 53 tokens per session scan A 65a6ff9aa5dd

Subscribe to this mod's changes

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.