Scan your whole stack
From OX Research Newsroom
Are you using batonflow?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.4.0
batonflow was last scanned on 27 Nov 2026 at version 0.4.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.4.0 LATEST | 27 Nov 2026 | No rules fired |
| 0.3.0 | 26 Nov 2026 | No rules fired |
| 0.2.0 | 26 Nov 2026 | No rules fired |
| 0.1.1 | 26 Nov 2026 | Not shown |
| 0.1.0 | 26 Nov 2026 | Not shown |
Findings for v0.4.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.4.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Pass the coding baton across any AI CLI—with automatic failover and zero lost context.
English | 简体中文
batonflow 是一个轻量级、零外部依赖、与客户端完全解耦的本地多智能体(Planner + Executor)接力调度框架。你可以将任意支持命令行/终端调用的 AI 编码工具(如 Antigravity / Gemini、Claude Code、Codex CLI 或自定义脚本)自由组合为 规划验收者(Planner) 与 代码执行者(Executor),实现:
high / low)动态路由模型:屏蔽各家 CLI 模型命名差异,统一按档位调度。short_limit) 与 周限额/硬配额耗尽(weekly_limit),按 executor_chain 顺位交接。planner_takeover(由 Planner 接手)、manual_pause(等待后手动继续)、auto_wait(时间到达自动重试继续) 三种策略。batonflow init):进入任意项目目录直接执行 batonflow init,零冲突初始化配置、工作流、任务板与全客户端通用 Agent Skill(自动写入 .agents/skills/ 与 .claude/skills/,同时支持 batonflow init --global-skill 一键全局安装到 Antigravity、Claude Code、Codex、Gemini CLI、Cursor 与 OpenCode)。PLAN.md 的跨客户端断点续传:随时切换不同 AI 客户端无缝接着干,零上下文丢失。AGENTS.md / CLAUDE.md 安全共存:三层防串台保护(幂等锚点追加、[BATONFLOW_EXECUTOR_MODE] 身份前缀、硬递归环境变量锁),保留原有编码规范且杜绝死循环。flowchart TD
P["Planner (Antigravity / Claude Code / 任意客户端)"] -->|"读取 PLAN.md 与 WORKFLOW.md"| B["动态分批与档位决策 (high / low)"]
B -->|"batonflow --tier high --task ..."| C["batonflow 调度器 (零依赖 Node.js)"]
C -->|"首选 Executor"| E1["Codex CLI"]
E1 -->|"退出码 0"| V["Planner 审查 git diff 并运行测试/构建"]
E1 -->|"429 / 5小时限流 / 周限额"| E2["备用 Executor: Claude Code"]
E2 -->|"退出码 0"| V
E2 -->|"限流 / 周限额"| E3["备用 Executor: Gemini CLI"]
E3 -->|"退出码 0"| V
E1 & E2 & E3 -->|"普通代码报错 / 超时"| ERR["退出码 1: 查看日志并重试 (最多 2 次)"]
E3 -->|"全链路耗尽"| POL{"识别限额类型并执行 exhaustion_policy"}
POL -->|"short_limit + auto_wait"| WAIT["解析恢复时间 / 轮询等待并自动重试"]
WAIT --> C
POL -->|"manual_pause (5小时限额默认)"| PAUSE["退出码 2/3: 清理脏状态、标记 [!] 并暂停等待"]
POL -->|"planner_takeover (周限额默认)"| TAKE["退出码 2/3: Planner 直接接管 PLAN.md 剩余任务"]
V -->|"验收通过"| GIT["PLAN.md 标记 [x] + git commit 存档"]
V -->|"验收失败"| ERR
dependencies: {})gitcodex、claude、gemini)# 方式 A:通过 npm 全局安装(推荐)
npm install -g batonflow
# 方式 B:免安装直接用 npx 初始化
npx batonflow init
# 方式 C:从源码直接链接(无需 npm install)
git clone https://github.com/wenzhang1/batonflow.git
cd batonflow && npm link
cd /path/to/your-project
batonflow init
# 可选适配器:batonflow init --adapter antigravity | claude-code | codex | all | none
# 可选:一次性将通用 Agent Skill 安装到全局(默认覆盖 Antigravity / Claude Code / Codex 等全部客户端)
batonflow init --global-skill
# 或仅安装到单个客户端:batonflow init --global-skill antigravity | claude-code | codex
batonflow init 会安全完成以下操作:
batonflow.config.json(已有文件默认跳过,不覆盖).batonflow/WORKFLOW.md(标准化 Planner 工作流规范)PLAN.md(任务板与断点恢复日志模板).agents/skills/batonflow/SKILL.md(Antigravity / Codex / Gemini CLI / Cursor / OpenCode 通用)与 .agent/rules/batonflow.md.claude/skills/batonflow/SKILL.md(Claude Code 原生 Skill,支持 /batonflow)<!-- batonflow:start --> ... <!-- batonflow:end -->)追加到 CLAUDE.md,100% 保留原有规则,并按需写入 .claude/settings.json 权限白名单.batonflow/logs/ 和 .batonflow/*.json 追加到 .gitignore初始化后怎么使用? 直接在 Antigravity、Claude Code、Codex 或 Cursor 中打开项目并对话即可,例如说:「请用 batonflow 按
.batonflow/WORKFLOW.md把 XXX 拆解进PLAN.md并分批派发验收」。平时普通提问不会触发 Skill。完整端到端对话示例、通用 Skill 安装、限流交接与跨客户端续传演示,请参阅 examples/USAGE_GUIDE.zh-CN.md(English Guide)。
# 模拟 Codex 触发 5 小时 429 限流 -> 自动接力给 Claude 执行成功(退出码 0)
batonflow --mock failover --tier high --task "实现 JWT 刷新中间件"
# 模拟全链路触发周限额 -> 退出码 3 + next_action=planner_takeover
batonflow --mock weekly-limit --tier high --task "执行数据库 Schema 迁移"
# 模拟 auto_wait 自动等待 1 秒后重试恢复 -> 退出码 0
batonflow --mock auto-wait --tier low --task "补充单元测试"
cd /path/to/your-project
batonflow --dry-run --tier high --task "验证执行链路与模型路由"
batonflow.config.json)完整示例见 batonflow.config.example.json。
{
"executor_chain": ["codex", "claude", "gemini"],
"tiers": {
"high": {
"codex": "gpt-6.2-astra",
"claude": "claude-opus-5-5",
"gemini": "gemini-4-neon"
},
"low": {
"codex": "gpt-6.2-sol",
"claude": "claude-sonnet-5-5",
"gemini": "gemini-4-hydrogen"
}
},
"default_effort": {
"high": "high",
"low": "medium"
},
"effort_map": {
"gemini": {
"max": "xhigh"
}
},
"commands": {
"codex": ["codex", "exec", "--sandbox", "workspace-write", "-m", "{{model}}", "-c", "model_reasoning_effort={{effort}}", "{{task}}"],
"claude": ["claude", "-p", "--permission-mode", "acceptEdits", "--model", "{{model}}", "--effort", "{{effort}}", "{{task}}"],
"gemini": ["agy", "--mode=auto", "-p", "{{task}}", "--model", "{{model}}", "--effort", "{{effort}}"]
}
}
非交互模式权限预设(
safevsyolo): 由于batonflow以无头非交互方式调用 Executor(关闭stdin),子进程无法停下来等你按y/n。batonflow内置了两套权限预设,支持一行命令随时切换:
Executor safe模式(默认 — 本地开发推荐)权限范围 yolo模式(仅限隔离容器/虚拟机)Codex CLI --sandbox workspace-write仅允许读写当前工作区,保护系统文件与 .git--yoloClaude Code --permission-mode acceptEdits自动允许工作区读写/改文件;如需顺便跑测试可追加 --allowedTools "Read,Edit,Bash(npm test:*)"--dangerously-skip-permissionsGemini 4 ( agy)--mode=auto自动执行常规工作区编辑,同时拦截高危破坏操作 --dangerously-skip-permissions一行命令自由切换(自动保留你自定义的模型、限额策略与其他第三方 Executor):
# 初始化时直接启用隔离容器全放开模式: batonflow init --permission-mode yolo # 对已有项目随时切换: batonflow mode yolo # 警告:仅建议在 Docker 容器、临时虚拟机或隔离 CI 环境使用! batonflow mode safe # 一键切回安全的工作区受限写入模式思维/推理强度控制(
--effort):原生支持low/medium/high/xhigh/max5 档。不传--effort时自动采用default_effort[tier](默认high档用high,low档用medium);effort_map可在接力时自动把目标 CLI 不支持的档位做平滑降级(例如把max自动映射为agy/Gemini 4 支持的xhigh,防止接力报错)。命令模板双格式安全兼容:推荐使用参数数组格式(
shell: false直接传递参数,任务中包含多行代码块、引号、反引号、$VAR也不会产生转义错误);同时也兼容单行字符串模板(如"codex exec -m {{model}} -c model_reasoning_effort={{effort}} \"{{task}}\""),内部会自动安全分词或 POSIX 转义。
batonflow 会优先匹配 weekly_limit_patterns(周/月/余额硬配额),再匹配 rate_limit_patterns(5 小时滚动窗口/429/速率限制)。全链路耗尽时,按 exhaustion_policy 执行:
"exhaustion_policy": {
"short_limit": "manual_pause",
"weekly_limit": "planner_takeover",
"auto_wait": {
"poll_interval_seconds": 900,
"max_wait_seconds": 21600,
"buffer_seconds": 30,
"on_timeout": "manual_pause"
}
}
short_limit(5 小时限额)和 weekly_limit(周限额)均支持以下 3 个配置项:
| 配置值 | 行为说明 | 适用场景 |
|---|---|---|
"planner_takeover" |
输出 next_action=planner_takeover,通知当前 Planner 直接用原生能力接管剩余 PLAN.md 任务。 |
周限额默认推荐(外部额度多日后才恢复,直接接管不中断交付) |
"manual_pause" |
输出 next_action=manual_pause 与 reset_hint,Planner 清理半成品脏 diff、标记 [!] 并暂停,等额度恢复后由你手动恢复。 |
5 小时限额默认推荐;也适合希望保护 Planner 自身额度的用户配给周限额 |
"auto_wait" |
调度器自动从报错文本解析恢复时间(解析不到则按 poll_interval_seconds 轮询),在 max_wait_seconds 预算内自动休眠等待并重新执行;超时后按 on_timeout 兜底。 |
无人值守/过夜任务,希望 5 小时窗口一恢复就自动继续 |
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.