npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

opencode-swarm

v2.3.2

Published

Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review

Readme

OpenCode Swarm

License OpenCode Plugin Architecture Version

Architect-driven, multi-agent development for OpenCode.

Design-first orchestration with codebase discovery, domain-aware SMEs, heterogeneous model perspectives, and layered QA review.

┌──────────────────────────────────────────────────────────────────────────┐
│  "Review this PowerShell application for security issues"                │
└──────────────────────────────────────────────────────────────────────────┘
                                    │
                                    ▼
┌──────────────────────────────────────────────────────────────────────────┐
│  ARCHITECT: Delegating to @explorer for codebase analysis...             │
└──────────────────────────────────────────────────────────────────────────┘
                                    │
                                    ▼
┌──────────────────────────────────────────────────────────────────────────┐
│  EXPLORER: PowerShell module, 12 files, domains: powershell, security    │
│  → Flagged: auth.ps1, invoke-command.ps1 for SME review                  │
└──────────────────────────────────────────────────────────────────────────┘
                                    │
                                    ▼
┌──────────────────────────────────────────────────────────────────────────┐
│  SME_POWERSHELL: Remoting patterns detected, needs constrained endpoints │
│  SME_SECURITY: Credential handling issues in auth.ps1:42-58              │
└──────────────────────────────────────────────────────────────────────────┘
                                    │
                                    ▼
┌──────────────────────────────────────────────────────────────────────────┐
│  ARCHITECT: Collated review with 3 HIGH findings, 2 recommendations      │
└──────────────────────────────────────────────────────────────────────────┘

Why OpenCode Swarm?

Most agent frameworks parallelize everything and hope coherence emerges. OpenCode Swarm enforces discipline:

| Problem | Our Solution | |---------|--------------| | Agents read the same files repeatedly | Explorer scans once, shares context | | All 11 SMEs consulted for every task | Only relevant domains (1-3) based on Explorer findings | | Single model = correlated failures | Different models per role = diverse perspectives | | No visibility into agent decisions | Serial execution with clear delegation traces | | Code ships without review | Mandatory Security → Audit → Test pipeline |


Architecture

User Request
     │
     ▼
┌─────────────┐
│  ARCHITECT  │ ◄── Orchestrates everything, owns all decisions
└─────────────┘
     │
     ▼
┌─────────────┐
│  EXPLORER   │ ◄── Fast codebase discovery (read-only)
└─────────────┘     Returns: structure, languages, domains, flagged files
     │
     ▼
┌─────────────┐
│    SMEs     │ ◄── Domain experts consulted serially (read-only)
└─────────────┘     Only domains identified by Explorer
     │
     ▼
┌─────────────┐
│   CODER     │ ◄── Implements unified specification
└─────────────┘
     │
     ▼
┌─────────────┐     ┌─────────────┐
│  SECURITY   │ ──► │   AUDITOR   │ ◄── QA review (read-only)
└─────────────┘     └─────────────┘
     │
     ▼
┌─────────────┐
│    TEST     │ ◄── Generates tests for approved code
└─────────────┘

Agent Permissions

| Agent | Read | Write | Role | |-------|:----:|:-----:|------| | Architect | ✅ | ✅ | Orchestrator - can fall back if delegation fails | | Explorer | ✅ | ❌ | Discovery - scans, summarizes, identifies domains | | SMEs (×15) | ✅ | ❌ | Advisory - domain expertise, never implements | | Coder | ✅ | ✅ | Implementation - writes production code | | Security Reviewer | ✅ | ❌ | Audit - vulnerability assessment | | Auditor | ✅ | ❌ | Audit - correctness verification | | Test Engineer | ✅ | ✅ | Testing - generates test cases |


Heterogeneous Model Perspectives

OpenCode Swarm allows different models per role, reducing correlated failures:

{
  "agents": {
    "architect": { "model": "anthropic/claude-sonnet-4-5" },
    "explorer": { "model": "google/gemini-2.0-flash" },
    "coder": { "model": "anthropic/claude-sonnet-4-5" },
    "_sme": { "model": "google/gemini-2.0-flash" },
    "_qa": { "model": "openai/gpt-4o" },
    "test_engineer": { "model": "google/gemini-2.0-flash" }
  }
}

Why this matters:

  • Reasoning-heavy model for Architect decisions
  • Fast/cheap model for Explorer and SME consultation
  • Different model family for QA catches errors the others miss
  • Mix local (Ollama) and cloud models based on cost/capability

Installation

Add to your opencode.json:

{
  "plugin": ["opencode-swarm"]
}

Or install via CLI:

bunx opencode-swarm install

Configuration

Create ~/.config/opencode/opencode-swarm.json:

{
  "agents": {
    "architect": { "model": "anthropic/claude-sonnet-4-5" },
    "explorer": { "model": "google/gemini-2.0-flash" },
    "coder": { "model": "anthropic/claude-sonnet-4-5" },
    "_sme": { "model": "google/gemini-2.0-flash" },
    "_qa": { "model": "google/gemini-2.0-flash" },
    "test_engineer": { "model": "google/gemini-2.0-flash" }
  }
}

Category Defaults

_sme and _qa set defaults for all agents in that category:

{
  "agents": {
    "_sme": { "model": "google/gemini-2.0-flash" },
    "sme_oracle": { "model": "anthropic/claude-sonnet-4-5" }
  }
}

Disable Unused Domains

{
  "agents": {
    "sme_vmware": { "disabled": true },
    "sme_azure": { "disabled": true }
  }
}

Custom Prompts

Place in ~/.config/opencode/opencode-swarm/:

  • {agent}.md - Replace default prompt
  • {agent}_append.md - Append to default prompt

Agents

Orchestrator

| Agent | Description | |-------|-------------| | architect | Central orchestrator. Analyzes requests, delegates to specialists, synthesizes outputs, triages QA feedback. |

Discovery

| Agent | Description | |-------|-------------| | explorer | Fast codebase scanner. Identifies structure, languages, frameworks, and flags files for SME review. |

Domain Experts (SMEs)

| Agent | Domain | |-------|--------| | sme_windows | Windows internals, registry, services, WMI/CIM | | sme_powershell | PowerShell scripting, cmdlets, modules, remoting | | sme_python | Python ecosystem, libraries, packaging | | sme_oracle | Oracle Database, SQL/PLSQL, administration | | sme_network | TCP/IP, firewalls, DNS, TLS, load balancing | | sme_security | STIG compliance, hardening, CVEs, PKI | | sme_linux | Linux administration, systemd, package management | | sme_vmware | vSphere, ESXi, PowerCLI, virtualization | | sme_azure | Azure services, Entra ID, ARM/Bicep | | sme_active_directory | AD, LDAP, Group Policy, Kerberos | | sme_ui_ux | UI/UX design, accessibility, interaction patterns | | sme_web | Flutter, React, Vue, Angular, JS/TS, HTML/CSS | | sme_database | SQL Server, PostgreSQL, MySQL, MongoDB, Redis | | sme_devops | Docker, Kubernetes, CI/CD, Terraform, GitHub Actions | | sme_api | REST, GraphQL, OAuth, JWT, webhooks |

Implementation

| Agent | Description | |-------|-------------| | coder | Writes production code from unified specifications | | test_engineer | Generates test cases and validation scripts |

Quality Assurance

| Agent | Description | |-------|-------------| | security_reviewer | Vulnerability assessment, injection risks, data exposure | | auditor | Correctness verification, logic errors, edge cases |


Tools

| Tool | Description | |------|-------------| | gitingest | Fetch GitHub repository contents for analysis | | detect_domains | Auto-detect relevant SME domains from text | | extract_code_blocks | Extract code blocks to files |

gitingest Example

"Analyze the architecture of https://github.com/user/repo"
"Use gitingest to fetch https://github.com/user/repo with pattern *.py include"

Workflow Examples

Code Review

User: "Review this codebase for issues"
  → Explorer scans, identifies: TypeScript, React, needs sme_security
  → SME_Security reviews flagged files
  → Architect collates findings into review report

Implementation

User: "Add authentication to this API"
  → Explorer scans existing code
  → SME_Security + SME_Network consulted
  → Coder implements spec
  → Security_Reviewer → Auditor validates
  → Test_Engineer generates tests

Bug Fix

User: "Fix the null reference in user.ts:42"
  → Explorer locates context
  → Relevant SME consulted
  → Coder implements fix
  → QA validates

Design Philosophy

  1. Single point of control - Architect owns all decisions
  2. Discovery before action - Explorer maps the terrain first
  3. Selective expertise - Only relevant SMEs consulted
  4. Serial execution - Traceable, debuggable, predictable
  5. Mandatory QA - No code ships without security + audit review
  6. Fail-safe orchestration - Architect can handle tasks itself if agents fail

Documentation


License

MIT