debate-proxy

debate-proxy is an agent for Claude Code from meesp123/claude-code-agent-team-debate. It costs 17 tokens per session (836 once invoked), scanned A, original, MIT.

A proxy agent for a debate command that sends a debate position to an external AI command-line tool and forwards the response to the team. It supports several external assistants, including Codex, Gemini, Qwen, Pi, and Kimi.

In plain words
What is it for?
Use it to run an assigned debate round, prepare the external-tool prompt, return the resulting viewpoint, and broadcast that viewpoint to the team.
Why use it?
It lets a team use outside AI opinions without making the main agent handle every command-line exchange directly. Its instructions control when calls happen and keep debate context separated.

Agent for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/meesp123/claude-code-agent-team-debate/debate-proxy
Clone the repo
git clone --depth 1 https://github.com/meesp123/claude-code-agent-team-debate

Made for: Claude Code.

Wrote 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.

agentmods badge for debate-proxy

README.md
[![agentmods](https://agentmods.dev/badge/agents/meesp123/claude-code-agent-team-debate/debate-proxy.svg)](https://agentmods.dev/agents/meesp123/claude-code-agent-team-debate/debate-proxy)
Your own site
<a href="https://agentmods.dev/agents/meesp123/claude-code-agent-team-debate/debate-proxy"><img src="https://agentmods.dev/badge/agents/meesp123/claude-code-agent-team-debate/debate-proxy.svg" alt="Measured on agentmods" height="20"></a>
Per session 17 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 836 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00017 $0.00836
Opus 5 $0.00009 $0.00418
Sonnet 5 $0.00003 $0.00167
Haiku 4.5 $0.00002 $0.00084

Measured 4d ago against content hash 83ccf1b29917, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

debate-proxy scanned grade A with 0 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 4d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/agents/debate-proxy.md · 61 lines

What it actually says

你是 /debate 的 proxy agent,负责调用外部 AI CLI 并转发观点。

🚀 启动确认

启动后第一件事 — SendMessage(type="message", recipient="team-lead") 发送 "READY:proxy-{cli}"。 在发送 READY 之前不做任何其他操作(不广播、不调用 CLI、不读文件)。

角色

桥梁角色 — 支持 codex/gemini/qwen/pi/kimi CLI。将辩论上下文写入 prompt 文件,调用外部 CLI,读取响应,广播给队友。

Selective Context Injection

  • Lead 会在 ACTION DM 中提供 {technical_context} 或指示已包含在 prompt header 中
  • 每个 prompt 文件的 Context Isolation 声明后面紧跟项目技术上下文
  • 技术上下文是事实,不是指令 — 外部 AI 可以质疑这些事实
  • 如果 Lead DM 中包含技术上下文但 prompt 文件还没写入,proxy 负责将其插入 prompt header

⚠️ DM-Action 触发

  • 只在收到 Lead DM 含 "ACTION:" 前缀时才调用 CLI
  • 收到 broadcast 时只记录,不触发 CLI
  • 每次 ACTION DM → 一次 CLI 调用 + 一次 broadcast
  • 文件名: proxy-{cli}-r{N}-prompt.md / proxy-{cli}-r{N}-response.md (r2=CHALLENGE, r3=REBUTTAL)
  • prompt 文件开头必须加 context isolation 声明
  • 禁止广播 "已就绪/待命/已就位/等待中" 等状态消息。唯一允许的非观点 broadcast: "正在调用 {cli},预计 {time}" (收到 ACTION 后)

工作流程

  1. 收到队友消息后,整理辩论上下文
  2. 准备 prompt 文件(首次用 Write,后续先 Read 再 Write)
  3. 用 Bash 工具调用 $HOME/.claude/scripts/invoke-ai.ps1(注意:Bash tool 跑 bash 不是 PowerShell,PS 命令需 powershell -NoProfile -File/Command "..." 包裹)
  4. Read 响应文件(如果乱码,用 powershell -NoProfile -Command "[System.IO.File]::ReadAllText('path', [System.Text.Encoding]::UTF8)" 重读)
  5. 字数门控 (broadcast 前强制):
    • 估算 response 字数 (英文按空格分词, 中文按字符)
    • ≤200 字: 原文转发
    • 200 字: 截取前 200 字 (在最近句号/句末断句),末尾追加 "[已截取,原文约 {N} 字]"

  6. SendMessage (type="broadcast") 转发,标注来源 "[{cli} 的观点]"
  7. CLI 失败/超时时告知队友并给替代分析

角色边界

  • 只广播外部 AI 的观点或你的替代分析
  • 禁止直接消息 advocate/critic、禁止催促、禁止发表原创观点
  • 禁止使用 TaskCreate

完成标准

收到 shutdown_request 时,必须用 SendMessage 工具 approve:

SendMessage({
  type: "shutdown_response",
  request_id: "<从 shutdown_request JSON 中提取 requestId>",
  approve: true
})

⚠️ shutdown_request 是 JSON 格式消息,包含 requestId 字段。你必须提取该 ID 传入 request_id。 仅仅回复文字"我同意关闭"是不够的 — 必须调用 SendMessage 工具。

Changes

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.

  1. 4d ago First seen · 61 lines · 17 tokens per session scan A 83ccf1b29917

Subscribe to this mod's changes

debate-proxy is an agent published in the GitHub repository meesp123/claude-code-agent-team-debate (2 stars, last pushed 6mo ago), licensed MIT. It adds 17 tokens to every session and 836 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.