Skip to content
Agent Orchestration
Skill

/scaled-swarm-predict

Large-scale social simulation with 50-200 demographically diverse AI personas debating on a simulated Twitter/Reddit board to predict outcomes

BOOST
From plugin
os-moda
11920 skills1 agent
Install
$ npx -y skills add bolivian-peru/os-moda --skill scaled-swarm-predict --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/scaled-swarm-predict

Context preview

The summary Claude sees to decide when to auto-load this skill.

Large-scale social simulation with 50-200 demographically diverse AI personas debating on a simulated Twitter/Reddit board to predict outcomes

SKILL.md

scaled-swarm-predict.SKILL.md
name: scaled-swarm-predict
description: Large-scale social simulation with 50-200 demographically diverse AI personas debating on a simulated Twitter/Reddit board to predict outcomes
activation: manual
tools:
  - system_health
  - system_query
  - shell_exec
  - file_read
  - file_write
  - teach_knowledge_create
  - teach_observe_action
  - safe_switch_begin
  - safe_switch_status
  - safe_switch_commit
  - safe_switch_rollback

Scaled Swarm Predict

Large-scale social simulation engine. Generates 50-200 demographically diverse AI personas, runs them through a simulated Twitter or Reddit board debating a topic, then analyzes emergent consensus, fault lines, and predictions.

**What this is:** A structured simulation where you generate a population of diverse personas matching real-world demographics, run 4-6 rounds of simulated social media discussion in a local SQLite database, then analyze position shifts and emergent consensus to make predictions.

**What this is NOT:** This is not MiroFish/OASIS (which runs independent agent processes). All personas are generated and role-played by a single model. The value comes from forcing diverse demographic perspectives through structured rounds of interaction — not from emergent multi-agent behavior. Think of it as a sophisticated polling simulation, not swarm intelligence.

**Cost per run:** ~$5-15 with Claude Sonnet (100 agents × 5 rounds = 500 generations). ~$25-60 with Opus. Each round is one large prompt, not 100 separate API calls.

When to Use

  • **Predict public reaction:** "How will Twitter react to this product launch?"
  • **Election/poll modeling:** "What does a demographically representative sample think about X policy?"
  • **Content testing:** "Will this announcement go viral or get ratio'd?"
  • **Market sentiment:** "How will crypto twitter react to this protocol change?"
  • **Risk assessment:** "What will the Reddit comments look like when we announce this pricing change?"
  • **Brainstorming at scale:** "What arguments exist for/against X across different demographics?"

Phase 1: Define the Simulation

1.1 — Get the Topic

Ask the user for: 1. **Topic/scenario** — What are we simulating discussion about? 2. **Platform** — Twitter (short-form, viral dynamics) or Reddit (long-form, threaded) 3. **Population size** — 50 (fast, cheap), 100 (balanced), 200 (thorough) 4. **Seed data** — Any documents, articles, data to ground the simulation

If seed data is provided, read it with `file_read()` and summarize key facts that personas will reference.

1.2 — Create the Board Database

Use `shell_exec()` to create a SQLite database for the simulation:

sqlite3 /var/lib/osmoda/swarm/sim_$(date +%s).db "
CREATE TABLE personas (
  id INTEGER PRIMARY KEY,
  name TEXT NOT NULL,
  age INTEGER,
  gender TEXT,
  location TEXT,
  occupation TEXT,
  political_lean TEXT,
  income_bracket TEXT,
  education TEXT,
  interests TEXT,
  personality TEXT,
  initial_position TEXT,
  bio TEXT
);

CREATE TABLE posts (
  id INTEGER PRIMARY KEY AUTOINCREMENT,
  round INTEGER NOT NULL,
  persona_id INTEGER NOT NULL,
  reply_to INTEGER,
  content TEXT NOT NULL,
  position TEXT,
  sentiment REAL,
  likes INTEGER DEFAULT 0,
  retweets INTEGER DEFAULT 0,
  FOREIGN KEY (persona_id) REFERENCES personas(id),
  FOREIGN KEY (reply_to) REFERENCES posts(id)
);

CREATE TABLE position_shifts (
  persona_id INTEGER NOT NULL,
  round INTEGER NOT NULL,
  position_before TEXT,
  position_after TEXT,
  reason TEXT,
  PRIMARY KEY (persona_id, round),
  FOREIGN KEY (persona_id) REFERENCES personas(id)
);

CREATE TABLE analysis (
  round INTEGER PRIMARY KEY,
  summary TEXT,
  top_arguments_for TEXT,
  top_arguments_against TEXT,
  consensus_pct REAL,
  viral_posts TEXT
);
"

Store the database path for all subsequent phases.

Phase 2: Generate Population

2.1 — Define Demographics

Match the population to the scenario. For US topics, use approximate census distributions:

Age:        18-24 (15%), 25-34 (20%), 35-44 (18%), 45-54 (16%), 55-64 (15%), 65+ (16%)
Gender:     Male (49%), Female (50%), Non-binary (1%)
Education:  High school (27%), Some college (20%), Bachelor's (22%), Graduate (13%), Trade/other (18%)
Political:  Liberal (25%), Moderate-left (15%), Center (20%), Moderate-right (15%), Conservative (25%)
Income:     <$30k (20%), $30-60k (25%), $60-100k (25%), $100-150k (18%), $150k+ (12%)

For tech/crypto topics, skew younger, more male, higher education. For local issues, adjust by region. Always tell the user what distribution you're using and why.

2.2 — Generate Personas in Batches

Generate personas in batches of 20-25 to stay within context limits. Each batch prompt:

Generate [N] realistic social media personas for a [Twitter/Reddit] simulation about "[topic]".

Demographics for this batch: [specify age/gender/political/income distribution for this batch]

For each persona, output JSON:
{
  "name": "realistic full name matching demographics",
  "age": N,
  "gender": "...",
  "location": "city, state",
  "occupation": "specific job title",
  "political_lean": "liberal|moderate-left|center|moderate-right|conservative",
  "income_bracket": "$X-Y",
  "education": "specific degree or level",
  "interests": "3-5 specific interests",
  "personality": "one sentence: how they argue online (aggressive, thoughtful, sarcastic, lurker-who-snaps, etc.)",
  "initial_position": "support|oppose|undecided|unaware",
  "bio": "their Twitter/Reddit bio, 1-2 sentences, authentic voice"
}

Make them feel REAL — not stereotypes. A conservative plumber can care about climate.
A liberal professor can oppose regulation. Surprise me with 20% of them.

Insert each batch into the `personas` table via `shell_exec()` with sqlite3.

2.3 — Validate Distribution

After all batches, verify the demographics match targets:

sqlite3 $DB_PATH "
SELECT political_lean, COUNT(*), ROUND(COUNT(*)*100.0/(SELECT COUNT(*) FROM personas),1) as pct
F
Read more
Ships withos-moda

An operating system built for AI agents — talk to your NixOS server instead of SSH-ing in. Typed, audited tool access with atomic rollback on every change. Research-grade; run it on a disposable box, not production.

Get the whole plugin

Other skills on os-moda.