Arbiter Skill
Push decisions to Arbiter Zebu for async human review. Use when you need human input on plans, architectural choices, or approval before proceeding.
Installation
Quick install via ClawHub:
CODEBLOCK0
Or via bun (makes CLI commands available globally):
CODEBLOCK1
Or manual:
CODEBLOCK2
Prerequisites
- - Arbiter Zebu bot running (or just
bunx arbiter-zebu) - INLINECODE1 directory (created automatically by the bot)
Environment Variables
Set these in your agent's environment for automatic agent/session detection:
| Variable | Description | Example |
|---|
| INLINECODE2 | Agent ID | INLINECODE3 , INLINECODE4 |
| INLINECODE5 |
Session key |
agent:ceo:main |
When to Use
- - Plan review before implementation
- Architectural decisions with tradeoffs
- Anything blocking that needs human judgment
- Multiple related decisions as a batch
Do NOT use for:
- - Simple yes/no that doesn't need explanation
- Urgent real-time decisions (use direct message instead)
- Technical questions you can research yourself
Tools
arbiter_push
Create a decision plan for human review.
CLI: arbiter-push '<json>' — takes a single JSON argument containing all fields.
CODEBLOCK3
JSON Fields:
| Field | Required | Description |
|---|
| INLINECODE8 | Yes | Plan title |
| INLINECODE9 |
No | Tag for filtering (e.g., project name) |
|
context | No | Background for reviewer |
|
priority | No |
low,
normal,
high,
urgent (default: normal) |
|
notify | No | Session to notify when complete |
|
agent | No | Agent ID (auto-detected from
CLAWDBOT_AGENT env) |
|
session | No | Session key (auto-detected from
CLAWDBOT_SESSION env) |
|
decisions | Yes | Array of decisions |
Decision object:
| Field | Required | Description |
|---|
| INLINECODE22 | Yes | Unique ID within plan |
| INLINECODE23 |
Yes | Decision title |
|
context | No | Explanation for reviewer |
|
options | Yes | Array of
{key, label, note?} |
|
allowCustom | No | Allow free-text answer (default: false) |
|
default | No | Suggested option key |
Returns:
CODEBLOCK4
arbiter_status
Check the status of a decision plan.
CLI: arbiter-status <plan-id> or INLINECODE30
CODEBLOCK5
Returns:
CODEBLOCK6
arbiter_get
Get answers from a completed plan.
CLI: arbiter-get <plan-id> or INLINECODE32
CODEBLOCK7
Returns:
CODEBLOCK8
Error if not complete:
CODEBLOCK9
arbiter_await
Block until plan is complete (with timeout).
CODEBLOCK10
Polls every 30 seconds until complete or timeout.
Returns: Same as arbiter_get on completion.
Usage Examples
Example 1: Plan Review
CODEBLOCK11
Example 2: Check and Proceed
CODEBLOCK12
Example 3: Blocking Wait
CODEBLOCK13
Best Practices
- 1. Batch related decisions — Don't push one at a time
- Provide context — Human needs to understand tradeoffs
- Use tags — Makes filtering easy (
--tag project-name) - Set notify — So blocked agents get woken up
- Use priority sparingly — Reserve
urgent for true blockers
File Locations
| Path | Purpose |
|---|
| INLINECODE36 | Plans awaiting review |
| INLINECODE37 |
Answered plans (archive) |
|
~/.arbiter/queue/notify/ | Agent notifications |
Checking Notifications (Agent Heartbeat)
In your HEARTBEAT.md, add:
CODEBLOCK14
Troubleshooting
| Issue | Solution |
|---|
| Plan not showing in Arbiter | Check file is valid YAML frontmatter |
| Answers not appearing |
Check
arbiter_status, may be incomplete |
| Notification not received | Ensure
--notify was set correctly |
See Also
Arbiter 技能
将决策推送给 Arbiter Zebu 进行异步人工审核。当你需要人工对计划、架构选择或审批提供意见时使用。
安装
通过 ClawHub 快速安装:
bash
clawhub install arbiter
或通过 bun(使 CLI 命令全局可用):
bash
bun add -g arbiter-skill
或手动安装:
bash
git clone https://github.com/5hanth/arbiter-skill.git
cd arbiter-skill && npm install && npm run build
ln -s $(pwd) ~/.clawdbot/skills/arbiter
前提条件
- - Arbiter Zebu 机器人正在运行(或直接运行 bunx arbiter-zebu)
- ~/.arbiter/queue/ 目录(由机器人自动创建)
环境变量
在代理环境中设置以下变量以实现自动代理/会话检测:
| 变量 | 描述 | 示例 |
|---|
| CLAWDBOTAGENT | 代理 ID | ceo, swe1 |
| CLAWDBOTSESSION |
会话密钥 | agent:ceo:main |
使用时机
- - 实施前的计划审查
- 需要权衡的架构决策
- 任何需要人工判断的阻塞事项
- 多个相关决策批量处理
不要用于:
- - 无需解释的简单是/否问题
- 紧急的实时决策(请使用直接消息)
- 可以自行研究的技术问题
工具
arbiter_push
创建供人工审核的决策计划。
CLI: arbiter-push — 接受包含所有字段的单个 JSON 参数。
bash
arbiter-push {
title: API 设计决策,
tag: nft-marketplace,
context: SWE2 需要在 API 工作开始前确定这些事项,
priority: normal,
notify: agent:swe2:main,
decisions: [
{
id: auth-strategy,
title: 认证策略,
context: 如何认证管理员用户,
options: [
{key: jwt, label: JWT 令牌, note: 无状态},
{key: session, label: 会话, note: 更多控制},
{key: oauth, label: OAuth, note: 外部提供商}
]
},
{
id: database,
title: 数据库选择,
context: 主数据存储,
options: [
{key: postgresql, label: PostgreSQL + JSONB},
{key: mongodb, label: MongoDB}
],
allowCustom: true
}
]
}
JSON 字段:
否 | 用于过滤的标签(例如项目名称) |
| context | 否 | 给审核者的背景信息 |
| priority | 否 | low、normal、high、urgent(默认:normal) |
| notify | 否 | 完成时通知的会话 |
| agent | 否 | 代理 ID(从 CLAWDBOT_AGENT 环境变量自动检测) |
| session | 否 | 会话密钥(从 CLAWDBOT_SESSION 环境变量自动检测) |
| decisions | 是 | 决策数组 |
决策对象:
是 | 决策标题 |
| context | 否 | 给审核者的解释 |
| options | 是 | {key, label, note?} 数组 |
| allowCustom | 否 | 允许自由文本回答(默认:false) |
| default | 否 | 建议的选项键 |
返回:
json
{
planId: abc123,
file: ~/.arbiter/queue/pending/ceo-api-design-abc123.md,
total: 2,
status: pending
}
arbiter_status
检查决策计划的状态。
CLI: arbiter-status 或 arbiter-status --tag
bash
arbiter-status abc12345
或
arbiter-status --tag nft-marketplace
返回:
json
{
planId: abc123,
title: API 设计决策,
status: in_progress,
total: 3,
answered: 1,
remaining: 2,
decisions: {
auth-strategy: {status: answered, answer: jwt},
database: {status: pending, answer: null},
caching: {status: pending, answer: null}
}
}
arbiter_get
从已完成的计划中获取答案。
CLI: arbiter-get 或 arbiter-get --tag
bash
arbiter-get abc12345
或
arbiter-get --tag nft-marketplace
返回:
json
{
planId: abc123,
status: completed,
completedAt: 2026-01-30T01:45:00Z,
answers: {
auth-strategy: jwt,
database: postgresql,
caching: redis
}
}
未完成时的错误:
json
{
error: 计划未完成,
status: in_progress,
remaining: 2
}
arbiter_await
阻塞直到计划完成(带超时)。
bash
arbiter-await abc12345 --timeout 3600
每 30 秒轮询一次,直到完成或超时。
返回: 完成时与 arbiter_get 相同。
使用示例
示例 1:计划审查
bash
推送计划决策(单个 JSON 参数)
RESULT=$(arbiter-push {title:Clean IT i18n 计划,tag:clean-it,priority:high,notify:agent:swe3:main,decisions:[{id:library,title:i18n 库,options:[{key:i18next,label:i18next},{key:formatjs,label:FormatJS}]},{id:keys,title:键结构,options:[{key:flat,label:扁平 (login.button)},{key:nested,label:嵌套 ({login:{button}})}]}]})
PLAN_ID=$(echo $RESULT | jq -r .planId)
echo 已推送计划 $PLAN_ID — 等待人工审核
示例 2:检查并继续
bash
检查决策是否就绪
STATUS=$(arbiter-status --tag nft-marketplace)
if [ $(echo $STATUS | jq -r .status) == completed ]; then
ANSWERS=$(arbiter-get --tag nft-marketplace)
AUTH=$(echo $ANSWERS | jq -r .answers[auth-strategy])
echo 使用认证策略:$AUTH
# 继续实施
else
echo 仍在等待 $(echo $STATUS | jq -r .remaining) 个决策
fi
示例 3:阻塞等待
bash
最多等待 1 小时获取决策
ANSWERS=$(arbiter-await abc12345 --timeout 3600)
if [ $? -eq 0 ]; then
# 获取到答案,继续
echo 决策已就绪:$ANSWERS
else
echo 等待决策超时
fi
最佳实践
- 1. 批量处理相关决策 — 不要一次只推送一个
- 提供背景信息 — 人工需要理解权衡因素
- 使用标签 — 便于过滤(--tag project-name)
- 设置通知 — 以便被阻塞的代理被唤醒
- 谨慎使用优先级 — 将 urgent 保留给真正的阻塞项
文件位置
| 路径 | 用途 |
|---|
| ~/.arbiter/queue/pending/ | 等待审核的计划 |
| ~/.arbiter/queue/completed/ |
已回答的计划(存档