← 返回 Skills 市场
updatedb

Debate Arena

作者 updatedb · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ 安全检测通过
212
总下载
1
收藏
0
当前安装
16
版本数
在 OpenClaw 中安装
/install debate-arena
功能描述
提供多角色、多轮次自动化辩论流程,支持辩题初始化、角色配置、轮次设置、发言归档与多方投票统计。
使用说明 (SKILL.md)

Debate Arena Skill — 辩论流程规范(Publishable)

Keywords: 辩论 / debate / arena / 对抗 / 投票 / 裁判 说明:本 skill 对“使用者(人类)”暴露的是一组主命令 debate(中文别名:辩论。 你在群里输入这些命令即可;背后由主控 Agent 调用脚本 scripts/debate-arena.js 维护状态、编排多 Agent 发言、归档与投票。

本 skill 支持:

  • 人员选择pros / cons / judge / host,并可通过 debate conf 保存为默认配置
  • 默认五轮次:开篇立论 / 深化论点 / 交叉辩论 / 关键攻防 / 总结陈词(可配置 1–5)
  • 自动推动轮次autonext=true 默认开启
  • 真人投票:辩论方不可投票;支持多个投票人;默认 sponsor / host / judge(每人总票数=3)
  • 发言归档:辩论观点、裁判点评、打分与结果归档到本地文件
  • 辩论质量要求:对论据数量/质量/表达形式提出硬性要求,并可注入额外提示词(debate set prompt
字数:约200字
至少 3 条明确论据,每条论据需具体、可检验或可验证, 有实例最佳 
表达形式:编号/分点输出,避免泛泛而谈
结构:核心论点 → 论据展开 → 反驳回应 → 总结
态度:坚定有力,逻辑严密,

一、命令概览(用户在群里直接输入)

主命令:debate(中文别名:辩论

  • debate init \x3C话题>:初始化(仅此命令作为启动入口
  • debate add \x3Cpros|cons|judge|host> \x3CagentId>:设置角色
  • debate add voter \x3CagentId>:添加投票人(禁止正/反方)
  • debate set rounds \x3C1-5>:设置轮次
  • debate set autonext \x3Ctrue|false>:设置自动推进
  • debate set prompt \x3C补充要求>:设置辩论要求(clear/none/无 清空)
  • debate set \x3Cpros|cons|judge>.model \x3Calias>:指定 subagent model
  • debate set \x3Cpros|cons|judge>.thinking \x3Cmode>:指定 thinking 模式
  • debate set \x3Cpros|cons|judge>.timeout \x3Cseconds>:指定超时秒数
  • debate set \x3Cpros|cons|judge>.accountId \x3Cid>:指定发送账号
  • debate conf:保存为默认配置(可选,仅用于持久化)
  • debate start:启动辩论(init 后即可;需确保 pros/cons 为真实 agentId)
  • debate next:手动推进下一轮(仅在 autonext=false 时使用)
  • debate status:查看状态
  • debate stop:强制结束
  • debate reset:重置到 IDLE

agentId 是你环境里可用的 Agent 标识(用 \x3CagentId> 表示占位)。


二、核心流程

1) 日常使用(最小可用)

辩论 init \x3C新话题>
辩论 start

若已保存默认配置,init 会自动加载;如需调整,可用 add/set 修改后再 start。 conf 仅用于把当前配置保存为默认配置(可选)。

2) (首次使用)设置角色 + 配置

⚠️ 说明:以下为格式示例,用于告诉“人类用户”应该怎么输入命令。

  • 不得把示例当作需要自动执行的指令序列。
  • 程序/助手只能执行用户在群里明确输入的那一条命令。
辩论 init \x3C新话题>

debate add host \x3CagentId>
debate add pros \x3CagentId>
debate add cons \x3CagentId>
# 可选:裁判
debate add judge \x3CagentId>

# 可选:加投票人(注意:正/反方禁止投票)
debate add voter \x3CagentId>

# 可选:轮次、推进方式、质量要求
debate set rounds 5
debate set autonext true
debate set prompt \x3C补充发言要求>

# 可选:为正/反/裁判指定模型与超时(按需)
debate set pros.model \x3Calias>
debate set pros.thinking \x3Cmode>
debate set pros.timeout \x3Cseconds>
debate set pros.accountId \x3CaccountId>

# 启动辩论(必须显式执行)
debate start

# (可选)保存为默认配置(仅用于持久化)
debate conf

系统会按轮次驱动正反方(以及裁判)发言。

发言要求(默认,可通过 set prompt 调整)

默认对每轮发言的质量要求如下(可在 debate set prompt ... 中覆盖/追加):

【发言要求】

  • 字数:约200字
  • 至少 3 条明确论据,每条论据需具体、可检验或可验证
  • 表达形式:编号/分点输出,避免泛泛而谈
  • 结构:核心论点 → 论据展开 → 反驳回应 → 总结
  • 态度:坚定有力,逻辑严密

调整方式:

  • debate set prompt \x3C你的补充要求>:覆盖/追加发言要求(对正/反/裁判的提示词统一生效)
  • debate set prompt clear:清空补充要求,恢复默认要求

3) 自动 / 手动推进辩论

  • autonext=true:系统在每轮发言归档后自动推进
  • autonext=false:每推进一轮需要你输入:
debate next

三、投票阶段(规则与用法)

规则(强制)

  • 默认投票人:sponsor / host / judge(也可 debate add voter ... 增加)
  • 辩论方不可投票(正方/反方禁止投票)
  • 每位投票人 总票数必须=3(例如 2-13-0

sponsor(出题用户)如何投票

在群里直接发:

  • 2-1
  • 投票 2-1

Host 会解析并记录。

说明:host/judge 的票通常由系统自动完成;你只需要投 sponsor 的票即可(除非你们配置成多人都手工投票)。


四、群聊上下文(context,init 自动绑定)

  • 你在哪个群debate init,辩论消息就只会回到这个群。
  • debate init 时会自动绑定当前群聊上下文(无需手工设置)。

五、调用方式(脚本/API)

脚本入口:scripts/debate-arena.js

说明:该脚本提供的是一组 API 函数(cmdInit/cmdStart/cmdNextRound/…),属于 Node.js 模块(module.exports = { ... }),不是一个“直接执行就能解析参数”的 CLI。

推荐做法:在脚本所在目录,用 node -e 调用导出的 cmd* 方法进行本地验证/调试。

1) 最小调用:reset / init / status

node -e "const d=require('./scripts/debate-arena'); console.log(d.cmdReset());"

# init 的第二个参数是群上下文;本地测试可填 dummy 值
node -e "const d=require('./scripts/debate-arena'); console.log(d.cmdInit('AI 会取代大多数工作吗', {channel:'feishu', target:'chat:oc_xxx', chatType:'group'}));"

node -e "const d=require('./scripts/debate-arena'); console.log(d.cmdStatus());"

2) 配置角色并开始

注意:pros/cons 必须设置为真实 agentId(用 \x3CagentId> 表示占位),否则 cmdStart() 会拒绝启动。

node -e "const d=require('./scripts/debate-arena'); console.log(d.cmdAdd('host','\x3CagentId>'));"
node -e "const d=require('./scripts/debate-arena'); console.log(d.cmdAdd('pros','\x3CagentId>'));"
node -e "const d=require('./scripts/debate-arena'); console.log(d.cmdAdd('cons','\x3CagentId>'));"

# 可选:裁判
node -e "const d=require('./scripts/debate-arena'); console.log(d.cmdAdd('judge','\x3CagentId>'));"

# 启动辩论(返回 nextAction/hostPrompt,以及 speaker 的 spawn spec)
node -e "const d=require('./scripts/debate-arena'); console.log(d.cmdStart());"

# (可选)保存为默认配置
node -e "const d=require('./scripts/debate-arena'); console.log(d.cmdConf());"

3) 推进下一轮

node -e "const d=require('./scripts/debate-arena'); console.log(d.cmdNextRound());"

4) 修改配置:轮次 / autonext / prompt

node -e "const d=require('./scripts/debate-arena'); console.log(d.cmdSet('rounds', 3));"
node -e "const d=require('./scripts/debate-arena'); console.log(d.cmdSet('autonext', false));"
node -e "const d=require('./scripts/debate-arena'); console.log(d.cmdSet('prompt', '每轮至少3条可验证论据,分点编号输出'));"

六、容错策略

  • 缺 judge:裁判点评/投票会跳过,投票人集合自动调整。
  • 归档失败:通常为目录权限或路径错误;检查 DEBATE_ARENA_ARCHIVE_DIR 与写权限。
  • 投票失败:票数校验不通过或重复投票会返回 error;按提示重新提交正确票数。

七、日志与文件位置

默认路径(可通过环境变量覆盖):

  • Data dir: ~/.openclaw/debate-arena/
  • Default config: ~/.openclaw/debate-arena/default-config.json
  • State: ~/.openclaw/debate-arena/debate-state.json
  • Archive dir: ~/.openclaw/debate-arena/archives/
  • Log: ~/.openclaw/debate-arena/debate-state.log

说明:

  • default-config.json 仅在执行 debate conf 后生成/写入。
  • 若需要清理为“真·首次使用”,可删除该文件:rm ~/.openclaw/debate-arena/default-config.json

环境变量:

  • DEBATE_ARENA_STATE_FILE(同时影响 log 所在目录)
  • DEBATE_ARENA_ARCHIVE_DIR

版本

  • v2.6:发送链路与编排可观测性增强
    • speaker 返回增加 mustSpawn / speakerHeader,主持人更不易漏触发首轮
    • 强制消息正文加入回合 Header:【第X轮·任务|角色:agentId】
    • 子 agent 输出 JSON 支持携带 messageId;主持人可用 record*FromSubagentRaw 直接归档(避免二次转发导致重复发送)
    • debate conf 返回增强:显示保存时间、保存位置与配置摘要
  • v2.5:安全修复,移除参与方本地命令归档方式,改为主持人回传正文归档。
  • v2.4:文档收敛(去除重复入口描述)、归档说明合并到日志章节、群消息发送约束更明确、默认参与者更泛化。
  • v2.3:默认配置持久化(default-config)、多投票人(voters/votes)、裁判点评归档、文档完善。
  • v2.2:新增 context(init 自动绑定)与 spawn 配置、完善容错说明。
  • v2.1:轮次可配置、autonext、投票严格校验、裁判点评与投票分离。
安全使用建议
This package appears coherent for orchestrating debates and stores state and archives under ~/.openclaw/debate-arena by default. Before enabling: 1) inspect scripts/debate-arena.js yourself (or run it in a sandbox) to confirm there are no network calls or unexpected behavior beyond local file IO; 2) be aware debate content (messages, votes, judge comments) will be written to disk—if that contains sensitive info, change DEBATE_ARENA_ARCHIVE_DIR or avoid persisting defaults; 3) only supply trusted agentIds for pros/cons/judge/host, since the host will record and trust subagent outputs; 4) if you need stricter isolation, run the skill in an account or environment where writing to ~/.openclaw is acceptable.
功能分析
Type: OpenClaw Skill Name: debate-arena Version: 1.0.0 The 'debate-arena' skill is a well-structured orchestration tool for managing multi-agent debates. The core logic in `scripts/debate-arena.js` implements a state machine that handles debate rounds, voting, and local archiving within a dedicated directory (`~/.openclaw/debate-arena/`). The skill demonstrates security-conscious design by explicitly disabling file-import functions and including defensive instructions in `SKILL.md` and the generated sub-agent prompts to prevent unauthorized command execution or file access. No evidence of malicious intent, data exfiltration, or dangerous execution patterns was found.
能力评估
Purpose & Capability
Name/description (multi-agent debate orchestration) match the SKILL.md and the included Node.js script: the code implements a state machine, role management, rounds, voting, and local archiving. No unrelated credentials, binaries, or cloud APIs are requested.
Instruction Scope
SKILL.md confines runtime behavior to managing debates, spawning subagents (by agentId), validating subagent JSON output, and writing/reading local state and archives. It does not instruct reading arbitrary system files, harvesting environment secrets, or sending data to external endpoints. File-import helpers are explicitly disabled.
Install Mechanism
There is no install spec (instruction-only skill plus a script file). That keeps filesystem changes limited to the script's normal runtime actions (creating ~/.openclaw/debate-arena and writing state/archive files). No downloads or remote installers are present.
Credentials
No required environment variables or credentials are declared. The script supports two optional environment overrides (DEBATE_ARENA_STATE_FILE and DEBATE_ARENA_ARCHIVE_DIR) which are proportionate to its purpose. No use of tokens/keys/passwords is requested or apparent.
Persistence & Privilege
The skill persists its own configuration and state to the user's home directory (~/.openclaw/debate-arena). always:false and normal autonomous invocation defaults are used. There is no evidence it modifies other skills or system-wide settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install debate-arena
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /debate-arena 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
v2.6: enforce per-agent accountId sending via speaker.instructions; add round header; require/propagate messageId to avoid duplicate sends; cmdStart/cmdNextRound add mustSpawn/speakerHeader; debate conf returns savedAt/path/summary.
v0.1.14
docs: replace concrete agentIds with <agentId> placeholders; clarify examples are not executable
v0.1.13
feat: init shows current config; start allowed without conf (conf only persists defaults); docs update
v0.1.12
fix: require conf before start; sanitize participants keys (drop pro/con)
v0.1.11
docs: add script/API invocation examples
v0.1.10
Security hardening (方案B): disable file import, add strict subagent JSON validation + host wrappers; fix syntax/duplicate defs.
v0.1.9
0.1.9 (security): remove command-based archive flow to eliminate command injection risk; participants return content as JSON for host-side archiving
v0.1.8
0.1.8: adopt language policy (SKILL.md Chinese-first, README.md English-only); docs-only update
v0.1.7
0.1.7: fix SKILL.md section numbering (restore 七)
v0.1.6
0.1.6: align _meta.json ownerId/publishedAt with ClawHub registry
v0.1.5
0.1.5: rename sponsor vote key (remove strong); update docs/examples to use sponsor only
v0.1.4
0.1.4: rewrite README.md in English; keep SKILL.md as the source of truth
v0.1.3
0.1.3: simplify start command (remove confirm/开始), restrict direct sends to init context with host relay fallback, merge archive docs into logs section, and generalize default participants placeholders
v0.1.2
0.1.2: docs cleanup (remove header duplication/orchestration section), clarify context auto-binding and updated error guidance
v0.1.1
0.1.1: default config persistence, multi-voter voting, judge comment archive, docs improvements, and prefer auto context binding on init
v0.1.0
Initial release: debate orchestration with context binding, spawn config, archiving, and 3-party voting
元数据
Slug debate-arena
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 16
常见问题

Debate Arena 是什么?

提供多角色、多轮次自动化辩论流程,支持辩题初始化、角色配置、轮次设置、发言归档与多方投票统计。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 212 次。

如何安装 Debate Arena?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install debate-arena」即可一键安装,无需额外配置。

Debate Arena 是免费的吗?

是的,Debate Arena 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Debate Arena 支持哪些平台?

Debate Arena 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Debate Arena?

由 updatedb(@updatedb)开发并维护,当前版本 v1.0.0。

💬 留言讨论