app-deployer
Deploy and manage user applications as managed systemd services
Large-scale social simulation with 50-200 demographically diverse AI personas debating on a simulated Twitter/Reddit board to predict outcomes
$ npx -y skills add bolivian-peru/os-moda --skill scaled-swarm-predict --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/scaled-swarm-predictContext 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
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
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.
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.
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.
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.
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.
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
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.
Deploy and manage user applications as managed systemd services
Deploy and manage AI agent workloads with GPU checks, API key management, and health monitoring
Detect configuration drift — manual changes that exist outside NixOS management. Offer to bring imperative changes into…
Manage files and directories. List, find, search contents, read, write, move, copy, delete, permissions. Present directory…
Black box flight recorder for the server. Capture system state snapshots for forensic analysis after incidents. Continuous…
NixOS generation-aware debugging and time-travel. Correlate system state changes with application failures. Query "what changed…