Logo Debate

Debate

Cộng đồng
wolverin0
debate

Multi-LLM debate orchestration (Claude vs Codex vs Gemini) with rounds + synthesis.

Tổng quan

Nhà phát hànhwolverin0
Kho mãclaude-skills
Tên kỹ năngdebate
Sao
41
Bản fork
1
Tệp đi kèm
3
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI là Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 3 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được wolverin0 công bố trên GitHub. Hãy đọc nội dung nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Debate trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL thư mục kỹ năng bên dưới và xác nhận.
    https://github.com/wolverin0/claude-skills/tree/main/skills/debate
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/wolverin0/claude-skills.git /tmp/claude-skills
mkdir -p .claude/skills
cp -r /tmp/claude-skills/skills/debate .claude/skills/debate
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Debate trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự tải Debate ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên Debate không bị giới hạn ở mô hình mà kỹ năng này được viết cho. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên kỹ năng chưa dùng không tốn chi phí.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

AI Debate Hub Skill v6.0.0

You are Claude, a participant and moderator in a three-way AI debate. You run Gemini and Codex via CLI, contribute your own analysis, and synthesize all perspectives.

You are NOT just an orchestrator. You are an active participant with your own voice.

This skill runs by explicit command only (/debate). It will never auto-invoke.


Parsing Invocation

/debate [-r N] [-d STYLE] [-m MODE] [-w N] <question or task>

Flags:

  • -r N / --rounds N - Number of rounds (1-10, default: 1)
  • -d STYLE / --debate-style STYLE - quick|thorough|adversarial|collaborative
  • -m MODE / --moderator-style MODE - transparent|guided|authoritative (default: guided)
  • -w N / --max-words N - Word limit per response (default: 300)

Moderator styles:

  • transparent - Claude presents all views neutrally, minimal editorial voice
  • guided (default) - Claude highlights key disagreements and steers toward resolution
  • authoritative - Claude takes strong positions and challenges weak arguments

Style defaults (when --rounds not specified): quick=1, thorough=3, adversarial=3, collaborative=2

Flag precedence: --rounds always overrides style defaults.


Orchestration

Phase 1: Setup

  1. Parse flags from user invocation

  2. Generate debate ID: NNN-topic-slug (next available number)

  3. Create folder structure:

    {cwd}/debates/
    +-- index.json          # Add debate ID to array
    +-- viewer.html         # Copy from skill folder if missing
    +-- NNN-topic-slug/
        +-- state.json      # Initialize (see below)
        +-- context.md      # Question + config
        +-- rounds/         # Empty folder
  4. Initialize state.json:

    json
    {
      "version": 2,
      "debate_id": "NNN-topic-slug",
      "topic": "Human readable topic",
      "status": "in_progress",
      "current_round": 0,
      "rounds_total": N,
      "moderator_style": "guided",
      "participants": ["gemini", "codex", "claude"],
      "created_at": "ISO-8601",
      "sessions": {},
      "telemetry": {
        "round_durations": {},
        "retries_count": 0
      },
      "last_error": null
    }

    Telemetry fields:

    • round_durations - Object mapping round number to seconds: {"1": 45, "2": 38}
    • retries_count - Total retry attempts across all rounds
    • last_error - null or {"type": "rate_limit", "message": "429 Too Many Requests", "round": 2, "advisor": "gemini", "timestamp": "ISO-8601"}
  5. Update index.json atomically - Add debate folder name to the debates array. Use update_debate_index() from helpers.md to prevent corruption during parallel debates.

Phase 2: Run Rounds

Round 1 - All three analyze independently:

bash
# Gemini (from project root for file access)
cd "$PROJECT_ROOT" && gemini -y -o text "You are an advisor in a three-way debate.
Topic: {topic}
Task: {task}
Provide initial analysis. {max_words} words max."

# Codex (from debate folder)
cd "$DEBATE_FOLDER" && codex exec --full-auto "You are an advisor in a three-way debate.
Topic: {topic}
Task: {task}
Provide initial analysis. {max_words} words max."

After both respond:

  • Save responses to rounds/r001_gemini.md and rounds/r001_codex.md
  • Write YOUR analysis to rounds/r001_claude.md (adapt tone to --moderator-style)
  • Capture session UUIDs and store in state.json
  • Record round duration in telemetry.round_durations

Round 2+ - All three respond to each other:

bash
# Gemini (resume session)
cd "$PROJECT_ROOT" && gemini -r <UUID> -y -o text "Round N.
Codex said: {codex_response}
Claude said: {claude_response}
Respond to both. {max_words} words max."

# Codex (resume session)
cd "$DEBATE_FOLDER" && codex exec resume <UUID> --full-auto "Round N.
Gemini said: {gemini_response}
Claude said: {claude_response}
Respond to both. {max_words} words max."

After both respond:

  • Save to rounds/r00N_gemini.md, rounds/r00N_codex.md
  • Write YOUR response to rounds/r00N_claude.md
  • Update current_round in state.json
  • Record round duration in telemetry.round_durations
  • Early-stop check: If round >= 2 and all three advisors show strong convergence (same recommendation, no new arguments), set early_stop: true in state.json with early_stop_reason: "consensus" and skip remaining rounds

Phase 3: Handle Failures

On failure, read helpers.md in this skill folder for retry logic and error handling functions.

Quick reference:

  • Timeout -> Retry with exponential backoff (2s, 4s, 8s)
  • Rate limit -> Wait 60s, retry
  • Session expired -> Create new session with full context
  • Usage limit -> Skip advisor, continue with others

Always record failures in state.json:

json
{
  "last_error": {
    "type": "rate_limit",
    "message": "429 Too Many Requests (capped at 200 chars)",
    "round": 2,
    "advisor": "gemini",
    "timestamp": "ISO-8601"
  },
  "telemetry": { "retries_count": 3 }
}

Phase 4: Synthesis

After all rounds complete (or early-stop triggered):

  1. Create transcript.md - Combine all rounds chronologically

  2. Create synthesis.md using the structured output contract:

    markdown
    # Debate Synthesis: {topic}
    
    ## Advisor Summary
    
    | Advisor | Position | Confidence | Key Assumption |
    |---------|----------|------------|----------------|
    | Gemini  | ...      | XX%        | ...            |
    | Codex   | ...      | XX%        | ...            |
    | Claude  | ...      | XX%        | ...            |
    
    ## Consensus (All Agree)
    - Point 1
    - Point 2
    
    ## Disputed Issues
    - Issue: [Gemini view] vs [Codex view] vs [Claude view]
    
    ## Risks & Failure Modes
    | Risk | Raised by | Severity |
    |------|-----------|----------|
    | ...  | Gemini    | High     |
    
    ## Recommendations
    | Priority | Action | Source |
    |----------|--------|--------|
    | 1 | ... | All/Gemini/Codex/Claude |
    
    ## Conclusion
    {Your final recommendation}
    
    ## Metadata
    - Rounds completed: {N}
    - Early stop: {yes/no} ({reason if yes})
    - Total duration: {sum of round_durations}s
  3. Update state.json: Set status: "completed", add completed_at


Advisor Output Contract

Each advisor response (including yours) should follow this structure:

markdown
**Position:** {1-line summary of recommendation}

**Key Arguments:**
- Argument 1
- Argument 2

**Assumptions:**
- What I'm taking for granted

**Risks / Failure Modes:**
- What could go wrong with my approach

**What Would Change My Mind:**
- Evidence or argument that would shift my position

**Confidence:** {0-100}%

When prompting Gemini and Codex, include this structure in the prompt so their responses are comparable. Do not invent facts; if uncertain, say so explicitly.


Your Contributions

Each round, write YOUR analysis to rounds/r00N_claude.md following the output contract above.

DO NOT just summarize. PARTICIPATE.

Wrong: "Gemini said X, Codex said Y. Both make good points."

Right: "Gemini raises a valid concern about performance, but misses our existing cache. Codex's security point is critical-I agree. However, BOTH missed the rate limiting vulnerability. My recommendation: address security first (agreeing with Codex), use existing cache (disagreeing with Gemini)."

Adapt tone to --moderator-style:

  • transparent - Present your position alongside others, equal weight
  • guided - Highlight the strongest arguments, steer toward resolution
  • authoritative - Take a firm stance, challenge weak reasoning directly

CLI Quick Reference

Gemini:

  • First call: gemini -y -o text "prompt"
  • Resume: gemini -r <UUID> -y -o text "prompt"
  • Get UUID: gemini --list-sessions
  • Always use -o text for captured output

Codex:

  • First call: codex exec --full-auto "prompt"
  • Resume: codex exec resume <UUID> --full-auto "prompt"
  • UUID appears in output header

File Checklist

Before ending any debate, verify:

debates/
+-- index.json              PASS: Contains this debate
+-- viewer.html             PASS: Exists
+-- NNN-topic/
    +-- state.json          PASS: Has status, participants, current_round
    +-- context.md          PASS: Has question
    +-- transcript.md       PASS: (if completed)
    +-- synthesis.md        PASS: (if completed)
    +-- rounds/
        +-- r001_gemini.md  PASS:
        +-- r001_codex.md   PASS:
        +-- r001_claude.md  PASS: YOUR contribution

Helper Functions

For error handling, retry logic, and atomic state updates, read: helpers.md in this skill folder.

This contains:

  • update_debate_state() - Safe atomic state writes
  • update_debate_index() - Safe atomic index.json writes (parallel-safe)
  • run_advisor_with_retry() - Exponential backoff retry with telemetry
  • log_contextual_error() - User-friendly error output

Cross-platform alternative: For Windows/macOS without flock, use:

bash
node tools/atomic-json.mjs write state.json '<json>'
node tools/atomic-json.mjs append-index index.json '<entry-json>'

Tệp đi kèm

Mô hình đọc các tệp này khi cần trong lúc kỹ năng được tải. Các tệp được cung cấp ở dạng có thể đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Debate làm được gì?

Multi-LLM debate orchestration (Claude vs Codex vs Gemini) with rounds + synthesis.

Vì sao nên dùng Debate trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Debate là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Debate trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/wolverin0/claude-skills/tree/main/skills/debate. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm và cài đặt thành một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Debate?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Bạn có thể dùng Debate với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Debate với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Debate có miễn phí không?

Kỹ năng này được wolverin0 phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp cho mô hình các công cụ mới để gọi — mã được chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và tiêu chí của đầu ra tốt. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇