Agent skill

Swarm Predict

by bolivian-peru in bolivian-peru/os-moda

Multi-perspective risk analysis using structured persona debate before deploying changes

Apache-2.0Auto-check passedDevOps & Cloud

Install Swarm Predict

skills CLI
$ npx skills add bolivian-peru/os-moda --skill swarm-predict -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install bolivian-peru/os-moda swarm-predict --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/bolivian-peru/os-moda.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/swarm-predict .claude/skills/swarm-predict && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
swarm-predict
GitHub stars
119
Token cost
~2.5k tokens
SKILL.md length
785 words
Files
2
Skills in repo
17
Repo updated
First seen
Licence
Apache-2.0

At a glance

Multi-perspective risk analysis using structured persona debate before deploying changes

  • Works in 5 steps: Gather Context → Select Personas → Run Debate (3 rounds mandatory, 2… → …
  • DevOps & Cloud work in your project
  • SKILL.md covers When to Use, Workflow, Example: "Should we upgrade… and Integration with PageIndex MCP
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Swarm Predict is an agent skill from bolivian-peru/os-moda. Multi-perspective risk analysis using structured persona debate before deploying changes

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `EXAMPLE.md`).

It sits in DevOps & Cloud. The repository describes itself as: 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… The licence is Apache-2.0.

When your agent uses it

  • DevOps & Cloud work in your project

Example prompts

  • “/swarm-predict”

Requirements

  • Node.js

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Gather Context
  2. Select Personas
  3. Run Debate (3 rounds mandatory, 2 optional)
  4. Score and Report
  5. Execute (only if GO or GO WITH CONDITIONS, and user approves)

What it can do on your machine

Read from SKILL.md and the folder at commit b8e418f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are markdown).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Swarm Predict loads about 2.5k tokens when it runs. Until then it costs about 26 tokens; SKILL.md has 785 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~26
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from bolivian-peru/os-moda at commit b8e418f, republished under its Apache-2.0 licence (© bolivian-peru). 785 words, ~2,467 tokens.

Download SKILL.mdSave it as .claude/skills/swarm-predict/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
swarm-predict
description
Multi-perspective risk analysis using structured persona debate before deploying changes
activation
auto
tools
system_health, system_query, journal_logs, service_status, file_read, file_write, shell_exec, safe_switch_begin, safe_switch_status, safe_switch_commit…

Swarm Predict

Structured multi-perspective risk analysis before acting on infrastructure changes. Uses persona-based debate to surface risks from different viewpoints, then deploys via SafeSwitch with auto-rollback.

What this is: A structured prompting technique where you role-play 6-8 expert personas debating a proposed change. It forces consideration of multiple angles (security, reliability, cost, UX) before committing. Think of it as a pre-flight checklist, not a crystal ball.

What this is NOT: This is not true multi-agent simulation (like MiroFish/OASIS with independent agent processes). All personas share one context window and one model. The value comes from structured thinking and the checklist effect, not from emergent behavior.

When to Use

  • Before deploying infrastructure changes ("What if we switch to nginx?")
  • Before system upgrades ("Will upgrading PostgreSQL break anything?")
  • Incident response ("What's the safest recovery path?")
  • Any change where you want a second opinion but don't have a team to consult

Workflow

Phase 1: Gather Context

Collect real system state. The analysis is only as good as the data it's grounded in.

1. system_health() → CPU, RAM, disk, load, uptime
2. system_query({ query: "services" }) → running services
3. journal_logs({ unit: "relevant-service", lines: 50 }) → recent activity
4. file_read({ path: "/relevant/config/file" }) → current config

Minimum data checklist — do NOT proceed without:

  • system_health returned CPU/RAM/disk numbers
  • At least one service query succeeded
  • The proposed change is specific (not vague like "improve performance")

If data collection fails, tell the user: "Cannot run analysis without baseline system state. Please provide context manually or fix the service queries."

Build a situation briefing — a concise paragraph with:

  • Current system state (concrete numbers, not "healthy")
  • The exact proposed change
  • Known constraints or dependencies
Phase 2: Select Personas

Pick 6-8 from this table. Choose archetypes relevant to the change — don't use all 12.

ArchetypeOptimizes forBlind spot
Ops EngineerReliability, uptime, monitoringOver-conservative, blocks progress
Security AnalystAttack surface, CVEs, access controlParanoid, sees threats everywhere
Performance EngineerLatency, throughput, efficiencyOptimistic about gains, ignores stability
End UserResponse time, zero disruptionNo technical context, just wants it to work
Cost Analyst$/hour, resource wastePenny-wise, pound-foolish
Junior DevSimplicity, documentationAsks naive questions that reveal assumptions
Chaos EngineerFailure modes, blast radiusAdversarial by nature, can over-index on unlikely scenarios
Compliance OfficerAudit trails, regulationsBlocks anything undocumented
Database AdminData integrity, migrations, backupsExtremely cautious, can stall decisions
Network EngineerDNS, routing, firewall, latencyHyper-focused on connectivity edge cases
SRE LeadSLOs, error budgets, rollback plansBalanced but demands extensive rollback planning
Product ManagerTimelines, feature velocityUnderestimates risk, wants speed

For each selected persona, define:

Name: [Realistic name]
Role: [Title]
Optimizes for: [1 sentence]
Blind spot: [1 sentence]
Phase 3: Run Debate (3 rounds mandatory, 2 optional)

Each round is a single prompt containing the situation briefing, all persona definitions, full prior discussion, and the round instruction. Output each persona's response labeled by name.

Round 1 — Initial Reactions:

Given the situation and your role, state:
1. Your biggest concern about this change
2. One risk others might miss
3. Your initial position (support / oppose / conditional)
Each persona: 2-3 sentences. Be specific — cite actual services, configs, versions.

Round 2 — Challenge:

Read Round 1. Now:
1. Name one thing another persona said that you disagree with, and why
2. Name one thing another persona said that changed your thinking
3. Propose one concrete mitigation for the top risk
Each persona: 3-4 sentences. Reference others by name.

Round 3 — Final Position:

Read the full discussion. State:
1. Your final recommendation: GO / NO-GO / GO WITH CONDITIONS
2. The single most important condition (if GO WITH CONDITIONS)
3. One sentence: what breaks first if this goes wrong?
Each persona: 2-3 sentences. No hedging — commit to a position.

Optional Round 4 — Red Team (use for high-stakes changes):

The change IS deployed. Try to break it.
1. Most likely failure in the first hour
2. Sneaky failure that appears after a week
Each persona: 1-2 sentences. Be adversarial.

Optional Round 5 — Deployment Plan (use when proceeding):

Draft the deployment plan as a group:
1. Pre-flight checks (what to verify before starting)
2. Execution order (step by step)
3. Rollback trigger (what specific metric/event means abort)
4. Health checks during and after
Show full SKILL.md (324 more words)Show less
Phase 4: Score and Report

Count positions from Round 3 and apply these rules:

OutcomeThresholdConfidence
GOAll personas support or support-with-conditions85-95%
GO WITH CONDITIONS5+ of 8 support, dissenters' concerns addressable65-85%
NEEDS MORE DATA4/4 split or concerns based on unknown system state40-65%
NO-GO5+ of 8 opposeRecommend delay

Adjust confidence down for:

  • Vague risks ("something might break") → -10%
  • Missing system data (Phase 1 gaps) → -15%
  • All personas suspiciously agree (likely shallow analysis) → -10%

Produce this report:

markdown
## Risk Analysis Report

### Change
[What was evaluated — 1 sentence]

### System Context
[Key metrics from Phase 1]

### Consensus Risks
- [Risk everyone agrees on] — Severity: HIGH/MED/LOW
- [Another consensus risk] — Severity: HIGH/MED/LOW

### Contested Risks
- [Risk with disagreement]
  - Concerned: [Who and why]
  - Dismisses: [Who and why]

### Verdict: [GO / GO WITH CONDITIONS / NEEDS MORE DATA / NO-GO]
Confidence: [X%]

### Conditions (if applicable)
1. [Specific, actionable condition]
2. [Another condition]

### SafeSwitch Plan
- Pre-flight: [checks before starting]
- TTL: [seconds before auto-rollback]
- Health checks: [what to monitor]
- Rollback trigger: [what constitutes failure]
Phase 5: Execute (only if GO or GO WITH CONDITIONS, and user approves)
1. safe_switch_begin({
     plan: "[change description]",
     ttl_secs: [from report],
     health_checks: [from report]
   })

2. Execute the change using appropriate tools

3. watcher_add({
     name: "post-change-monitor",
     check: { type: [from report] },
     interval_secs: 30,
     actions: ["notify", "rollback"]
   })

4. Monitor for TTL duration:
   - If health checks pass → safe_switch_commit()
   - If any check fails → safe_switch_rollback()

5. Record outcome:
   teach_knowledge_create({
     title: "Risk analysis: [change]",
     category: "prediction",
     content: "[report + actual outcome + which risks materialized]",
     tags: ["swarm-predict", "[go/nogo]", "[success/rollback]"]
   })
If Something Goes Wrong
  • Phase 1 fails (can't read system state): STOP. Tell user. Don't guess.
  • All personas agree too easily: Re-run with a Chaos Engineer and Junior Dev persona forced in. Unanimous agreement on infrastructure changes is suspicious.
  • Confidence < 40%: Do NOT proceed. Ask user for more context or simplify the change.
  • SafeSwitch rollback triggers: Record what happened. The mismatch between prediction and reality is the most valuable data for future analyses.

Example: "Should we upgrade Node.js 18 → 22?"

Phase 1 — Context:

CPU: 45%, RAM: 62%, Disk: 60%. Uptime: 34 days.
Services: node (18.19, port 3000, 200 req/s, p99 45ms), postgresql-15, nginx.
Config: package.json engines field says ">=16", 47 dependencies.

Phase 2 — Personas: Sarah (Ops), Viktor (Security), Priya (Performance), Alex (User), James (Junior Dev), Mei (SRE Lead)

Phase 3 — 3 rounds produce:

  • James: "Do our 47 npm packages support Node 22? engines says >=16 but that's package.json, not every dep."
  • Viktor: "Node 18 EOL April 2025. We're already past it. Security risk of NOT upgrading."
  • Sarah: "Zero-downtime requires keeping 18 binary for instant rollback."
  • Mei: "SafeSwitch with 15-min TTL. Health check: HTTP 200 on /health + p99 < 100ms."

Phase 4 — Report:

Verdict: GO WITH CONDITIONS (Confidence: 78%)
Conditions:
1. Run npm ls --all and check for Node 22 incompatibilities first
2. Deploy during 2-4 AM low-traffic window
3. Keep Node 18 binary at /usr/local/bin/node18 for rollback
SafeSwitch: TTL 900s, check HTTP 200 on :3000/health every 30s

Phase 5 — Deploy via SafeSwitch. Auto-rollback if /health fails within 15 min.

Integration with PageIndex MCP

If PageIndex MCP is available, use it to index relevant documentation before Phase 1:

  • Upstream changelogs/migration guides for the software being changed
  • Internal runbooks or post-mortems from similar changes
  • Vendor documentation for affected services

This gives personas access to real documentation context instead of relying on training data alone.

© bolivian-peru, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in skills/swarm-predict of bolivian-peru/os-moda.

  • SKILL.md
  • EXAMPLE.md

Open the folder on GitHubat commit b8e418f

Compare with similar skills

Swarm Predict next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Swarm Predict compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Swarm Predict this skillbolivian-peru/os-moda119—~2.5kAutomated safety check: PassApache-2.0
Monitor CInrwl/nx29k6 repos~4.7kAutomated safety check: PassMIT
Terraform and OpenTofu Guideagentscope-ai/QwenPaw36k6 repos~4.2kAutomated safety check: PassApache-2.0
Vercel Optimize Auditvercel-labs/agent-skills32k8 repos~4.3kAutomated safety check: PassNone
Analyze GitHub Action Logswithastro/astro63k1 repos~1.3kAutomated safety check: PassCustom licence
Openclaw Live Updateropenclaw/openclaw392k—~3.7kAutomated safety check: PassMIT

Similar skills

  • Monitor CI

    nrwl/nx

    Monitor Nx Cloud CI pipeline and handle self-healing fixes. An agent skill from nrwl/nx.

    29k GitHub starsUsed in 6 repos~4.7k tokens
    DevOps & CloudAuto-check passed
  • Terraform and OpenTofu Guide

    agentscope-ai/QwenPaw

    Guidance for writing and testing Terraform and OpenTofu code: module structure, naming, test approaches, CI/CD workflows, state handling and security scanning.

    36k GitHub starsUsed in 6 repos~4.2k tokens
    DevOps & CloudAuto-check passed
  • Vercel Optimize Audit

    vercel-labs/agent-skills

    Official

    Runs a metrics-first audit of a deployed Vercel project, gating investigations on real signals to produce ranked, citation-backed cost and performance recommendations.

    32k GitHub starsUsed in 8 repos~4.3k tokens
    DevOps & CloudAuto-check passed
  • Official

    Analyze recent GitHub Actions workflow runs to identify patterns, mistakes, and improvements.

    63k GitHub starsUsed in 1 repo~1.3k tokens
    DevOps & CloudAuto-check passed
  • Openclaw Live Updater

    openclaw/openclaw

    Maintain the canonical live OpenClaw main checkout, macOS LaunchAgent-managed Gateway, local macOS app, exact-head main CI, and recurring full release validation.

    392k GitHub stars~3.7k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Docs Learn PR Preview

    netdata/netdata

    Use only when the user explicitly asks to build, run, preview, inspect, or validate learn.netdata.cloud locally using the contents of a PR or documentation branch before merge.

    81k GitHub stars~2k tokensUpdated today
    DevOps & CloudAuto-check passed

More from bolivian-peru/os-moda

All 17 skills in this repo
  • App Deployer

    bolivian-peru/os-moda

    Deploy and manage user applications as managed systemd services

    119 GitHub stars~774 tokensUpdated 3 mo ago
    Auto-check passed
  • Deploy AI Agent

    bolivian-peru/os-moda

    Deploy and manage AI agent workloads with GPU checks, API key management, and health monitoring

    119 GitHub stars~1.1k tokensUpdated 3 mo ago
    Auto-check passed
  • Drift Detection

    bolivian-peru/os-moda

    Detect configuration drift — manual changes that exist outside NixOS management.

    119 GitHub stars~584 tokensUpdated 3 mo ago
    Auto-check passed
  • Flight Recorder

    bolivian-peru/os-moda

    Black box flight recorder for the server. An agent skill from bolivian-peru/os-moda.

    119 GitHub stars~624 tokensUpdated 3 mo ago
    Auto-check passed
  • Generation Timeline

    bolivian-peru/os-moda

    NixOS generation-aware debugging and time-travel. An agent skill from bolivian-peru/os-moda.

    119 GitHub stars~777 tokensUpdated 3 mo ago
    Auto-check passed
  • Morning Briefing

    bolivian-peru/os-moda

    Generate a concise daily infrastructure briefing. An agent skill from bolivian-peru/os-moda.

    119 GitHub stars~897 tokensUpdated 3 mo ago
    Auto-check passed

Categories

Questions about Swarm Predict

What does Swarm Predict do?

Multi-perspective risk analysis using structured persona debate before deploying changes. Swarm Predict is an agent skill from bolivian-peru/os-moda.

When should I use Swarm Predict?

Swarm Predict fits situations like: devOps & Cloud work in your project.

How do I install Swarm Predict in Claude Code?

Run `npx skills add bolivian-peru/os-moda --skill swarm-predict -a claude-code`. Or copy the skill folder (skills/swarm-predict in bolivian-peru/os-moda) into .claude/skills/swarm-predict in your project. Claude Code loads it when a task matches its description.

How do I install Swarm Predict in Codex?

Run `npx skills add bolivian-peru/os-moda --skill swarm-predict -a codex`. Or copy the skill folder (skills/swarm-predict in bolivian-peru/os-moda) into .agents/skills/swarm-predict in your project. Codex loads it when a task matches its description.

Can I use Swarm Predict in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add bolivian-peru/os-moda --skill swarm-predict -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/swarm-predict, .gemini/skills/swarm-predict, .github/skills/swarm-predict and .opencode/skills/swarm-predict in your project.

What does Swarm Predict need to run?

SKILL.md names no scripts, command-line tools or credentials: Swarm Predict is instructions for the agent only. Our summary lists: Node.js.

Does Swarm Predict access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Swarm Predict safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Swarm Predict use?

Swarm Predict is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Swarm Predict use?

About 2.5k tokens (SKILL.md is roughly 9.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Swarm Predict?

Skills that share tags, products or a category with Swarm Predict: Monitor CI (nrwl/nx, 29k stars), Terraform and OpenTofu Guide (agentscope-ai/QwenPaw, 36k stars), Vercel Optimize Audit (vercel-labs/agent-skills, 32k stars) and Analyze GitHub Action Logs (withastro/astro, 63k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Swarm Predict?

bolivian-peru (a GitHub user) maintains it in bolivian-peru/os-moda, which has 119 GitHub stars. The repository holds 17 skills in this directory. The repository was last updated on June 24, 2026.

Source: bolivian-peru/os-moda on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.