一键导入
rust-project-validate
运行 cargo fmt/clippy/build/e2e/test 验证项目规范;在每次任务结束前必须调用,重要的是必须在端到端测试之后执行,为提交代码做最后准备
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
运行 cargo fmt/clippy/build/e2e/test 验证项目规范;在每次任务结束前必须调用,重要的是必须在端到端测试之后执行,为提交代码做最后准备
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
使用 bifrost 命令行工具管理代理生命周期、规则、Group 规则、证书、脚本、系统代理、运行时配置与流量查询(含 JSONPath/header 等值/时间窗高级过滤、search --include 直接挂 body/headers、traffic 批量 get、auth-status JWT/Cookie 诊断、export curl/fetch/HAR、replay + JSON Patch、capture wait 等下一条请求、status --format json),以及远程调用(remote shell 执行、授权管理、远程流量排查)。当用户提到以下任意场景时触发:1) 启动/停止/检查 bifrost 代理;2) 配置 TLS 拦截(域名白名单、应用白名单);3) 调试或管理规则/Group 规则/脚本;4) 查看流量记录、搜索请求;5) 通过一个少于 6 位的数字 ID 获取请求详情(如「获取 57544 的详情」「获取 47544 请求的内容」「查看 12345」等);6) 修改 values/config/CA 证书/系统代理;7) 远程调用:连接/断开远端 Bifrost、远程执行命令(shell exec)、管理 Shell Access 策略与 Profile、管理远程授权(grant);8) 诊断 JWT/Cookie 过期/重放请求/导出 curl/fetch/HAR/等待下一条匹配请求/批量取多条 traffic。常见触发表述:'使用 bifrost 获取 xxxxx 的详情''获取 xxxxx 的请求内容''查看 xxxxx 的内容''bifrost traffic get xxxxx''导出 xxxxx 为 curl''重放 xxxxx 这条请求''看下 xxxxx 的 JWT 还有效吗''等下一条 POST xxxxx 的请求''远程执行命令''管理远程授权' 等、远程文件操作(file.read/list/stat/glob/search/hash/upload/download)。
创建和执行 Bifrost 代理的端到端测试;在添加新功能或修复 bug 后用于验证。必须优先于 rust-project-validate 技能执行。
Use when changing Bifrost WebUI, desktop shell UI, public site, docs visual style, interaction patterns, layout, copy density, colors, typography, spacing, or component styling. Reads DESIGN.md as the product design contract and validates it with @google/design.md.
面向 Bifrost 管理端的端到端 UI 与 API 验证工具。 适用于浏览器测试、场景回归、管理端接口验证与页面快照排查。 Use when: 端到端验证、功能验证、E2E 测试、UI 测试、浏览器测试、API 测试、接口验证
Open a target website, wait for user login, verify login with required cookies plus an HTTP probe, and save cookies into .env for later automation. Use this when a site needs controlled browser login, cookie persistence, and automatic login-state checks.
Inspect Codex async task progress from the correct data directory. Use when the user asks to check Codex status, inspect async task progress, summarize task state, or determine whether local Codex workers are still running. Always detect the active Codex data dir first: prefer CODEX_HOME when set, otherwise fall back to $HOME/.codex; only use repo .codex-tasks when the user explicitly targets it.
| name | rust-project-validate |
| description | 运行 cargo fmt/clippy/build/e2e/test 验证项目规范;在每次任务结束前必须调用,重要的是必须在端到端测试之后执行,为提交代码做最后准备 |
必须:该技能在任务结束前执行一键规范校验,确保代码风格、静态检查、构建与测试均通过。 避免:还没进行 api和交互测试的情况下,就开始执行规范校验,因为这时候代码可能还不是最终版本,还不能确保通过所有测试用例。
cargo fmt --all -- --checkcargo fmt --manifest-path desktop/src-tauri/Cargo.toml --all -- --checkcargo clippy --all-targets --all-features -- -D warningscargo test,避免无差别跑完整套耗时用例cargo build --all-targets --all-features(避免无差别构建,应该按改动范围构建)cargo test --workspace --all-features,避免提交后才在 CI 中暴露失败如果任一步失败,立即停止并返回失败报告。
fmt/clippy/buildclippy/build/test 前,先确认没有遗留的 cargo、rustc、旧 bifrost 进程,避免互相抢锁造成假卡死cargo test 或 cargo clippy,进入本技能前先清理残留任务,再顺序执行校验fmt --check 失败时提示可使用以下命令自动修复:
cargo fmt --allcargo fmt --manifest-path desktop/src-tauri/Cargo.toml --allcargo test --workspace --all-features 失败时,必须在报告里明确指出这是 CI 风险,不能默默跳过运行本技能将顺序执行:
cargo fmt --all -- --check # 检查工作区 Rust 代码格式
cargo fmt --manifest-path desktop/src-tauri/Cargo.toml --all -- --check # 检查 desktop Tauri Rust 代码格式
cargo clippy --all-targets --all-features -- -D warnings # 检查代码是否符合 Rust 编码规范
cargo test -p bifrost-e2e -- --list # 先确认本次需要覆盖的 E2E 范围
cargo test -p <changed-crate> --all-features # 按修改范围执行测试
cargo build --all-targets --all-features # 最终构建项目
desktop/src-tauri,必须确保本地执行过独立 fmt 检查,不能只依赖工作区根 cargo fmt --all -- --check