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-magi

v0.10.0

Published

Multi-agent PR review and merge orchestration plugin for OpenCode.

Readme

OpenCode Magi

Multi-agent GitHub pull request review and merge orchestration for OpenCode.

Why Magi?

Magi is inspired by the three wise men: independent perspectives that reach a decision together.

One AI model is still not enough to trust blindly. OpenCode Magi improves confidence by asking multiple models to inspect the same pull request from different perspectives, then requiring an odd-number majority before approving, requesting changes, or closing.

The goal is not to treat a single AI answer as final, but to make AI review behave more like a real team: diverse viewpoints, explicit disagreement, and a final decision backed by consensus.

Features

OpenCode Magi recreates the review cycle humans already run on GitHub: multiple reviewers inspect a pull request, request changes, verify fixes, resolve threads, and approve when the work is ready.

  • Multi-agent reviews with an odd-number majority of 3 or more reviewers.
  • Optional unanimous approval policy for merge automation when every reviewer must approve before a PR is merged.
  • Finding-level voting before posting change requests, so only findings accepted by reviewer majority are submitted.
  • Single-account identity mode by default, where one GitHub account posts consensus-backed review and triage results for multiple logical agents, plus multi-account mode for setups that need separate GitHub identities.
  • Re-review support for edited PRs: fixed threads are resolved, satisfied reviewers approve, and remaining issues are posted as additional comments.
  • Optional merge and close automation where an editor agent responds on behalf of the author, fixes changes it agrees with, pushes commits when needed, and repeats the reviewer/editor cycle until the PR can be approved, queued, merged, or closed.
  • Per-agent OpenCode permissions for reviewer, CI classifier, and editor child sessions.
  • Prompt customization that adds repository-specific guidance without replacing the fixed output contracts.

Quick Start

Install

Add the plugin to opencode.json.

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["opencode-magi"]
}

Restart OpenCode. Done.

Configure

Configure global defaults in ~/.config/opencode/magi.json and project overrides in <project>/.opencode/magi.json.

Magi config files are merged by OpenCode Magi, not by OpenCode. Priority, lowest to highest.

  1. ~/.config/opencode/magi.json
  2. <project>/.opencode/magi.json

Set global config

You do not need to set global config values if the settings exist in your project config. However, using the global config is useful when you want to apply shared values across multiple projects.

mkdir -p ~/.config/opencode
touch ~/.config/opencode/magi.json

Add the following content to the configuration file.

{
  "$schema": "https://raw.githubusercontent.com/magi-ai/opencode-magi/main/schema.json",
  "account": "your-account",
  "agents": {
    "refs": {
      "account-1": {
        "model": "openai/gpt-5.5"
      },
      "account-2": {
        "model": "anthropic/claude-opus-4-7"
      },
      "account-3": {
        "model": "opencode/kimi-k2-6"
      }
    }
  },
  "review": {
    "reviewers": [
      { "ref": "account-1" },
      { "ref": "account-2" },
      { "ref": "account-3" }
    ]
  }
}

By default, mode is "single". Magi uses one top-level account to post reviewer- and triage-originated GitHub mutations while still running multiple logical agents and preserving majority voting, finding validation, and close reconsideration. The account must be authenticated with gh auth token --user <account>.

For advanced team setups that need GitHub to see separate review or triage identities, set top-level mode: "multi" and configure unique accounts for each reviewer or triage voter.

{
  "mode": "multi",
  "review": {
    "reviewers": [
      { "id": "general", "model": "openai/gpt-5.5", "account": "account-1" },
      {
        "id": "security",
        "model": "anthropic/claude-opus-4-7",
        "account": "account-2"
      },
      { "id": "compat", "model": "opencode/kimi-k2-6", "account": "account-3" }
    ]
  }
}

Set project config

Global config is optional, but project config is required.

cd <project>
mkdir -p .opencode
touch .opencode/magi.json

Add the following content to the configuration file.

{
  "$schema": "https://raw.githubusercontent.com/magi-ai/opencode-magi/main/schema.json",
  "account": "your-account",
  "github": {
    "owner": "your-owner",
    "repo": "your-repo"
  },
  "agents": {
    "refs": {
      "account-1": {
        "model": "openai/gpt-5.5"
      },
      "account-2": {
        "model": "anthropic/claude-opus-4-7"
      },
      "account-3": {
        "model": "opencode/kimi-k2-6"
      },
      "account-4": {
        "model": "openai/gpt-5.5",
        "account": "account-4",
        "author": {
          "name": "account-4",
          "email": "[email protected]"
        }
      }
    }
  },
  "review": {
    "reviewers": [
      { "ref": "account-1" },
      { "ref": "account-2" },
      { "ref": "account-3" }
    ]
  },
  "merge": {
    "editor": { "ref": "account-4" }
  },
  "triage": {
    "voters": [
      { "ref": "account-1" },
      { "ref": "account-2" },
      { "ref": "account-3" }
    ]
  }
}

Entries with ref are expanded from agents.refs. Fields set alongside ref override fields from the preset.

model can be a single provider/model string, a single object with id and options, or an ordered candidate array. Candidate arrays are resolved during validation against OpenCode's model catalog; the first available model is selected. Put provider-specific options on model objects, not on the agent role.

{
  "model": {
    "id": "openai/gpt-5.1",
    "options": { "reasoningEffort": "high" }
  }
}

After refs are expanded, top-level account is the GitHub account used for reviewer- and triage-originated posts and mutations in single mode. In multi mode, review.reviewers[].account and triage.voters[].account are used instead and must be unique within their agent lists. merge.editor.account is still used by /magi:merge to push fixes, close PRs, and merge PRs.

Validate config

After creating or updating your global or project configuration, validate it.

/magi:validate

Commands

Run commands from OpenCode.

/magi:review 123 124
/magi:review --dry-run 123
/magi:merge 123
/magi:merge --dry-run 123
/magi:triage 47 48
/magi:triage --dry-run 47
/magi:clear

Docs

Contributing

Wouldn't you like to contribute? That's amazing! We have prepared a contribution guide to assist you.