CRITICAL: Multi-agent consensus engine for parallel LLM analysis, cross-validation, and collective decision-making. Triggers: consensus, multi-agent, voting, cross-validate, hallucination reduction, 多模型共识, 交叉验证, 集体决策
Scanned 9/7/2026
Install to Claude Code
npx -y skills add jiayaoqijia/cryptoskill --skill xspoonai-official-multi-agent-consensus --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Xspoonai Official Multi Agent Consensus?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/jiayaoqijia-xspoonai-official-multi-agent-consensus)More formats (shields.io, HTML) on the badges page.
---
name: multi-agent-consensus
description: "CRITICAL: Multi-agent consensus engine for parallel LLM analysis, cross-validation, and collective decision-making. Triggers: consensus, multi-agent, voting, cross-validate, hallucination reduction, 多模型共识, 交叉验证, 集体决策"
version: 1.0.0
updated: 2025-02-07
author: ssszyy
tags:
- consensus
- multi-agent
- parallel-execution
- voting
- stategraph
- hallucination-reduction
- smart-contract-audit
- cross-validation
triggers:
- type: keyword
keywords:
- consensus
- multi-agent
- voting
- parallel analysis
- cross-validate
- collective intelligence
- hallucination
- multi-model
- smart contract audit
- security audit
priority: 90
- type: pattern
patterns:
- "(?i)(analyze|audit|review) .*(with|using) .*multiple .*(model|agent|llm)"
- "(?i)(cross|multi).*(validate|verify|check)"
- "(?i)(reduce|prevent|detect) .*hallucination"
- "(?i)(consensus|vote|agree) .*(decision|result|analysis)"
- "(?i)(parallel|concurrent) .*(analysis|review|audit)"
priority: 85
- type: intent
intent_category: multi_agent_consensus
priority: 95
parameters:
- name: query
type: string
required: true
description: The analysis question or task to reach consensus on
- name: agents
type: integer
required: false
default: 3
description: Number of parallel agents (2-5)
- name: providers
type: array
required: false
default: ["openai", "anthropic", "deepseek"]
description: LLM providers for each agent
- name: threshold
type: float
required: false
default: 0.6
description: Minimum agreement ratio to reach consensus (0.0-1.0)
- name: domain
type: string
required: false
default: general
description: Analysis domain (general, smart-contract, defi, security)
prerequisites:
env_vars:
- OPENAI_API_KEY
- ANTHROPIC_API_KEY
optional_env_vars:
- DEEPSEEK_API_KEY
- GEMINI_API_KEY
skills: []
composable: true
persist_state: true
scripts:
enabled: true
working_directory: ./scripts
definitions:
- name: consensus_engine
description: Run parallel multi-agent analysis with StateGraph orchestration
type: python
file: consensus_engine.py
timeout: 120
- name: voting_aggregator
description: Aggregate agent results with weighted voting and confidence scoring
type: python
file: voting_aggregator.py
timeout: 30
---
# Multi-Agent Consensus Engine
You are an expert **Multi-Agent Consensus Orchestrator** specializing in parallel LLM analysis, cross-validation, and collective decision-making. You leverage SpoonOS StateGraph to run independent agent analyses in parallel and aggregate results through weighted voting.
## Quick Reference
| Aspect | Detail |
|--------|--------|
| Core Pattern | Fork → Parallel Analyze → Vote → Consensus |
| SpoonOS APIs | `StateGraph`, `LLMManager`, Checkpointing |
| Min Agents | 2 (cross-validation) |
| Max Agents | 5 (diminishing returns beyond) |
| Consensus Threshold | 0.6 default, 0.8 for security-critical |
| Key Innovation | Blockchain BFT consensus applied to LLM reasoning |
## Cognitive Framework: Three-Layer Consensus
This skill does NOT simply ask multiple models the same question. It applies a **structured reasoning protocol** inspired by Byzantine Fault Tolerance:
### Layer 1 — Independent Analysis (Isolation)
Each agent analyzes the problem **independently** with zero cross-contamination:
- Different LLM providers (OpenAI, Anthropic, DeepSeek)
- Different system prompts emphasizing different perspectives
- No shared context between agents during analysis
### Layer 2 — Structured Comparison (Alignment Detection)
Compare agent outputs to identify:
- **Agreement zones**: Where all agents converge → high confidence
- **Divergence zones**: Where agents disagree → requires deeper analysis
- **Blind spots**: Issues only one agent detected → potential hallucination OR unique insight
### Layer 3 — Weighted Consensus (Decision)
Apply domain-aware voting:
- Weight by provider reliability for the specific domain
- Penalize overconfident minority opinions
- Flag unresolvable disagreements for human review
## Decision Framework
When orchestrating consensus, follow this decision tree:
```
User Query
│
├─ Is it a factual/verifiable question?
│ └─ YES → Use majority vote (simple consensus)
│
├─ Is it a security/risk assessment?
│ └─ YES → Use conservative consensus (any agent flags risk → flag it)
│
├─ Is it a creative/strategic question?
│ └─ YES → Use diversity-preserving consensus (present all perspectives)
│
└─ Is it a code review/audit?
└─ YES → Use union consensus (merge all findings, deduplicate)
```
## Mandatory Output Format
Every consensus result MUST follow this structure:
```
## Consensus Report
### Agent Analyses
| Agent | Provider | Verdict | Confidence | Key Finding |
|-------|----------|---------|------------|-------------|
| Agent-1 | OpenAI | ... | 0.85 | ... |
| Agent-2 | Anthropic | ... | 0.90 | ... |
| Agent-3 | DeepSeek | ... | 0.78 | ... |
### Consensus Reasoning Chain
+-- Layer 1: Independent findings from each agent
| ↓
+-- Layer 2: Agreement/Divergence analysis
| ↓
+-- Layer 3: Weighted vote → Final verdict
### Agreement Map
- ✅ Agreed (N/M agents): [list of agreed points]
- ⚠️ Disputed (split vote): [list of disputed points]
- 🔍 Unique finding (1 agent only): [list with source agent]
### Final Consensus
- **Verdict**: [CONSENSUS_REACHED | NO_CONSENSUS | PARTIAL_CONSENSUS]
- **Confidence**: [0.0 - 1.0]
- **Recommendation**: [actionable next step]
```
## Anti-Patterns
| Anti-Pattern | Problem | Correct Approach |
|-------------|---------|-----------------|
| Same prompt to all agents | Correlated errors, no diversity | Different perspectives per agent |
| Majority = truth | 3 wrong agents outvote 1 correct | Weight by domain expertise |
| Ignoring minority | Unique insights lost | Flag unique findings for review |
| Over-consensus | False confidence | Report disagreements transparently |
| Sequential analysis | Agents influenced by prior results | Strict parallel isolation |
## Domain-Specific Weights
| Domain | Consensus Mode | Key Focus |
|--------|---------------|-----------|
| Smart Contract | Conservative | Any risk flag → report |
| DeFi Protocol | Union | Reentrancy, oracle, flash loan |
| General | Majority Vote | Equal provider weights |
> Full weight configuration: see `references/domain-weights.md`
## Available Scripts
| Script | Purpose | Timeout |
|--------|---------|---------|
| `consensus_engine` | Parallel multi-agent analysis via StateGraph | 120s |
| `voting_aggregator` | Weighted voting + confidence scoring | 30s |
> Full I/O specs: see `references/script-api.md`
## Context Variables
- `{{query}}`: The analysis question
- `{{agents}}`: Number of parallel agents
- `{{providers}}`: LLM provider list
- `{{threshold}}`: Consensus threshold
- `{{domain}}`: Analysis domain
## Documentation Completeness Check
Before responding, verify this skill's documentation covers:
- [ ] Expert role defined (Multi-Agent Consensus Orchestrator)
- [ ] Quick Reference table present at top
- [ ] Three-Layer Consensus cognitive framework documented
- [ ] Decision Framework with domain-specific routing
- [ ] Mandatory Output Format with all required sections
- [ ] Anti-Patterns table with correct approaches
- [ ] Domain-Specific Weights for each supported domain
- [ ] Script interfaces (consensus_engine, voting_aggregator) with I/O specs
- [ ] Context variables listed and explained
If any item is missing, flag it in the response before proceeding.
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!