stochastic-multi-agent-consensus
Skill0 starsChanged 55 days agoMITView on GitHub
Spawn N agents with the same prompt (slight framing variations) to independently analyze a problem, then aggregate results by consensus. Use for decision-making, ranking options, strategic analysis, or any problem where you want to filter hallucinations and surface high-variance ideas. Triggers on "consensus", "poll agents", "stochastic consensus", "spawn N agents to analyze", "multi-agent vote", or /stochastic-multi-agent-consensus. Also triggers on phrases like "what do 10 agents think", "get multiple opinions", or "poll on [topic]".
2 other projects use a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- alicommit-malp/claude-skillsedited, first seen Jul 2, 2026
- jeffxberry/claude_skillstheir own version, first seen Apr 7, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 1
- alicommit-malp/claude-skills★ 017% same
Wrote their own version · 1
- jeffxberry/claude_skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository7 other files it gives its agents.
- agent-chatroomsSkill
- model-chatSkill
- multi-agent-chromeSkill
- prompt-contractsSkill
- reverse-promptingSkill
- subagent-verification-loopsSkill
- video-to-actionSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 7 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 24
If the problem is vague, ask the user to sharpen it.
- Distinctive: line 28
Before spawning, define what each agent must return.
- Distinctive: line 39
Create N slightly different prompts.
- Distinctive: line 57
Use the Task tool to spawn all N agents simultaneously.
- Distinctive: line 158
Default to sonnet unless told otherwise
- Distinctive: line 164
Ambiguous problem: Ask user to clarify before spawning.
- Very specific: line 167
Existing report: Check active/consensus/ for existing files.
- Distinctive: line 168
Agent failure: If an agent returns garbage or fails, exclude it from aggregation and note the effective N.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Stochastic Multi-Agent Consensus
Spawn N agents (default 10) with identical context and near-identical prompts. Each independently analyzes and produces a structured response. Aggregate by finding consensus (mode), divergences (splits), and outliers (unique ideas).
Why this works: Exploits stochastic variation in LLM outputs. Like polling 10 experts instead of asking one. The mode filters out hallucinations and individual biases. Divergences reveal genuine judgment calls. Outliers surface creative ideas a single run would miss.
Execution
1. Parse the request
Extract from the user's message:
- Problem/question to analyze
- Agent count N — default 10. User can override ("spawn 5 agents", "poll 20 agents")
- Output format — what each agent should produce (rankings, recommendations, yes/no decisions, scores, etc.)
- Options list (if applicable) — predefined options to rank/evaluate, or let agents generate their own
If the problem is vague, ask the user to sharpen it. N agents on a fuzzy prompt wastes tokens.
2. Design the structured output schema
Before spawning, define what each agent must return. This MUST be structured enough to aggregate. Examples:
- Ranking task: "Rank these 5 options from best to worst. Output as a numbered list 1-5."
- Open recommendation: "Propose your top 3 recommendations. For each: name, one-sentence rationale, confidence score 1-10."
- Binary decision: "Should we do X? Answer YES or NO, then give your top 3 reasons."
- Scoring task: "Score each option 1-10 on [criteria]. Output as
Option: Score."
The schema must produce outputs that can be mechanically compared across agents.
3. Generate framing variations
Create N slightly different prompts. The core problem and output schema stay identical — only the framing/priming varies. This ensures stochastic diversity without changing the actual task.
Variation strategies (cycle through these):
- Neutral baseline: "Analyze the following problem objectively."
- Risk-averse: "You are a conservative analyst who weighs downside risks heavily."
- Growth-oriented: "You are an aggressive strategist who optimizes for upside potential."
- Contrarian: "Challenge conventional wisdom. What does everyone else get wrong here?"
- First-principles: "Reason from first principles. Ignore what's conventional or popular."
- User-empathy: "Think from the end-user/customer perspective. What matters most to them?"
- Resource-constrained: "Assume limited time and budget. What's the highest-leverage move?"
- Long-term: "Optimize for the 5-year outcome, not the 90-day outcome."
- Data-driven: "Focus only on what's measurable and provable. Ignore intuition."
- Systems thinker: "Map the second and third-order effects. What cascades from each choice?"
For N > 10, cycle back through. For N < 10, pick the first N.
4. Spawn all N agents in parallel
Use the Task tool to spawn all N agents simultaneously.
Config for each:
subagent_type: "general-purpose"model: "sonnet"(cost-efficient — each agent does focused analysis, not deep research)mode: "bypassPermissions"
Agent prompt template
{framing_variation}
PROBLEM:
{problem}
{context — any relevant background, data, constraints the user provided}
{output_schema}
Be specific and concrete. Give real recommendations, not vague advice. If you're uncertain about something, say so explicitly with a confidence level.
Write your response directly — do not write to any files.Important: Agents return their output directly (not to files). This keeps aggregation simple.
5. Aggregate results
Once all N agents have returned, perform mechanical aggregation:
For ranking tasks:
- Assign points: 1st place = N points, 2nd = N-1, etc.
- Sum points across all agents for each option
- Report final ranking by total points
For recommendation tasks:
- Group similar recommendations (fuzzy match on name/concept)
- Count how many agents proposed each recommendation
- Categorize:
- Consensus (7+/N agree): High-confidence recommendations
- Divergence (4-6/N): Genuine judgment calls — flag for user decision
- Outlier (1-3/N): High-variance ideas — potentially creative, potentially noise
For scoring tasks:
- Calculate mean, median, and standard deviation per option
- Flag options with high variance (std dev > 2) — agents disagree here
For binary decisions:
- Count YES vs NO
- Report the split and summarize the strongest arguments from each side
6. Write the aggregation report
Write to active/consensus/consensus_report.md:
# Stochastic Multi-Agent Consensus Report
**Problem**: {problem}
**Agents**: {N}
**Date**: {date}
## Consensus (agreed by {X}+/{N} agents)
{Items most agents converged on — these are your safe bets}
## Divergences (split {X}/{Y})
{Items where agents disagreed roughly evenly — these are genuine judgment calls that need human decision}
## Outliers (proposed by 1-{Z} agents)
{Unique ideas from individual agents — high variance, potentially high value. Flag which framing produced them.}
## Raw Rankings / Scores
{Full aggregation table}
## Individual Agent Responses
{Summary of each agent's response with their framing variation noted}7. Deliver results
Present to the user:
- One-paragraph summary of the consensus finding
- Top 3 consensus items (what most agents agreed on)
- Top divergence (the most interesting split — where human judgment is needed)
- Most interesting outlier (the creative idea worth considering)
- File path to full report
Configuration
| Parameter | Default | Description |
| N | 10 | Number of agents to spawn |
| model | sonnet | Model for each agent (sonnet for cost, opus for depth) |
| output | ranking | Output type: ranking, recommendation, score, binary |
User can override any of these: "poll 5 opus agents on..." or "score these options with 15 agents".
Cost considerations
- 10 sonnet agents is cheap (~$0.30-0.50 total for a focused analysis)
- 10 opus agents is expensive (~$3-5 total) — only use when the user explicitly requests opus or the problem requires deep reasoning
- Default to sonnet unless told otherwise
- For binary yes/no decisions, 5 agents is usually sufficient
Edge cases
- N < 3: Warn the user that consensus requires at least 3 agents. Minimum 3.
- Ambiguous problem: Ask user to clarify before spawning. Don't burn N * tokens on vagueness.
- All agents agree: Great — high confidence. Report consensus and note the unanimity.
- No consensus (even split): Report the split honestly. This IS the finding — the problem genuinely has no dominant answer. Surface the strongest arguments from each side.
- Existing report: Check
active/consensus/for existing files. Overwrite without asking (these are ephemeral analysis artifacts, not persistent data). - Agent failure: If an agent returns garbage or fails, exclude it from aggregation and note the effective N.
Output files
| File | Description |
active/consensus/consensus_report.md | Full aggregation report |
Previous reports are overwritten — these are ephemeral analysis tools, not archives.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

