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/e2e-test/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/e2e-test)<a href="https://agentmods.dev/skills/bifrost-proxy/bifrost/e2e-test"><img src="https://agentmods.dev/badge/skills/bifrost-proxy/bifrost/e2e-test/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/bifrost-proxy/bifrost/e2e-test"><img src="https://agentmods.dev/badge/skills/bifrost-proxy/bifrost/e2e-test.svg" alt="Reviewed on agentmods" width="80" 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.00043 | $0.01722 |
| Opus 5.5 | $0.00017 | $0.00689 |
| Sonnet 5.5 | $0.00009 | $0.00344 |
| Haiku 4.5 | $0.00004 | $0.00172 |
Grade C, and why
e2e-test scanned grade C with 2 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 1mo 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.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
trap 'rm -rf "$TEST_DIR"' EXIT Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- 管理端 API 是否 ready,例如 `curl -sS http://127.0.0.1:8800/_bifrost/api/proxy/address` How it starts
The opening of the file, as written. The whole thing — 100 lines — stays where its author put it; the contents beside it link to each section on GitHub.
E2E 测试创建与执行
该技能用于创建和执行 Bifrost 的端到端测试,优先覆盖本次变更涉及的能力。
何时调用
- 添加新功能后需要验证
- 修复 bug 后需要回归测试
- 需要创建新的测试用例
- 需要运行现有的 E2E 测试
参考文档
在执行任务前,必须先阅读 E2E 测试框架的详细文档:
- e2e-tests README - 测试架构、目录结构、断言库、现有用例
- 测试覆盖率 - 当前覆盖范围与缺口
- 项目规则 - 仓库级开发与验证要求
使用说明
- 启动代理服务时,必须显式设置临时数据目录,避免覆盖本机已有数据;目录前缀统一使用
./.bifrost-e2e - 若需要手动启动服务,优先使用“先编译、再启动”的方式,而不是直接假设
cargo run或旧进程已生效 - 新增或修改“规则行为”相关测试时,规则定义必须存放在
e2e-tests/rules/下,不能散落到根目录、临时文件或其他测试目录 e2e-tests/rules/下的规则文件必须按“模块功能 + 测试目标”组织:- 先按模块功能拆分子目录,例如
forwarding/、request_modify/、response_modify/ - 再按单一测试目标拆分
.txt文件;一个文件只表达一组紧密相关的规则语义,避免把多个无关目标塞进同一个文件
- 先按模块功能拆分子目录,例如
- 规则文件命名要直接表达测试目标,使用小写下划线风格,例如
headers.txt、wildcard_level.txt、tls_intercept_rule.txt - 每个规则文件顶部必须先写清楚测试目标,再写测试规则本体;顶部说明至少应回答“这个文件验证什么语义/行为”
- 与规则文件配套的测试脚本必须存放在
e2e-tests/tests/,不能继续放在scripts/、根目录或其他位置;脚本命名建议与测试目标对应,例如test_header_replace.sh - 如果某个测试需要额外样例数据、模板或 mock 文件,分别放到现有的
e2e-tests/test_data/、e2e-tests/mock_servers/等目录,不要和规则文件混放 - 对涉及前端静态资源或管理端推送逻辑的改动,优先执行:
CARGO_TARGET_DIR=./.bifrost-ui-target cargo build --bin bifrost
BIFROST_DATA_DIR=./.bifrost-e2e-test ./.bifrost-ui-target/debug/bifrost start -p 8800 --unsafe-ssl
- 启动后,必须同时检查:
- 目标端口是否真的由最新
bifrost进程监听,例如lsof -nP -iTCP:8800 -sTCP:LISTEN - 管理端 API 是否 ready,例如
curl -sS http://127.0.0.1:8800/_bifrost/api/proxy/address
- 目标端口是否真的由最新
- 如果启动过程中出现证书安装交互,先显式处理掉,再继续测试,避免把“服务未启动完成”误判为功能问题
- 不同场景的步骤已拆分为独立文档;按需打开对应文件执行即可
- 当 UI 现象和 API 现象不一致时,优先做“进程级 + API + WebSocket frame”三层交叉验证:
- 先确认当前测试页面连到的是哪一个
bifrost进程 - 再确认
/_bifrost/api/traffic、/_bifrost/api/traffic/{id}返回的真实状态 - 最后抓浏览器
/api/push的framesent/framereceived,判断是“服务端没推”还是“页面没订阅/没消费”
- 先确认当前测试页面连到的是哪一个
- 新建规则测试后,顺手检查对应的规则文件与脚本是否一一对应;若无法建立清晰对应关系,应继续拆分目录或文件
- 测试结束后清理临时目录和残留进程
CLI 测试方法
当本次变更涉及 bifrost CLI 子命令(例如 bifrost value ...、bifrost rule ...、bifrost script ...)时,推荐使用“黑盒 + 独立数据目录”的方式编写与执行测试:
- 使用独立
BIFROST_DATA_DIR:用mktemp -d创建测试目录并导出,避免污染本机~/.bifrost - 优先复用已编译二进制:默认使用
target/release/bifrost,不存在时再cargo build --release --bin bifrost - 断言策略:
- 基于 CLI 输出:用
grep/jq(如有)做关键字段断言 - 基于落盘结果:检查
BIFROST_DATA_DIR下对应文件/目录是否按预期创建与更新
- 基于 CLI 输出:用
- 清理策略:用
trap cleanup EXIT确保结束后停止残留进程并删除临时目录
What ships with it
7 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.
- 1mo ago First seen · 100 lines · 43 tokens per session scan C cd7c6fa00020
e2e-test is a skill published in the GitHub repository bifrost-proxy/bifrost (165 stars, last pushed 2d ago), licensed MIT. It adds 43 tokens to every session and 1,722 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it C with 2 findings (recursive force delete, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
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.
develop-web-game
Build or iterate on HTML/JS web games with Playwright input bursts, gameplay screenshots, state inspection, and console checks.
browser-testing-with-devtools
Inspect browser DOM, network, console, screenshots, and performance with Chrome DevTools MCP when validating or debugging web behavior.
web-test
A browser-testing tool for 1C:Enterprise, an enterprise business software platform, using Playwright to automate the web client.
eval-dataset-design
A guide to creating reliable test sets for AI agents. Each evaluation task includes the request, the simulated user's behaviour, a reset starting state, and a success check that can be independently verified.
verify
Exercise the real app/API/CLI and collect observable evidence; tests alone do not count as end-to-end verification.