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

big-little

v2.0.0

Published

OpenCode plugin that routes large reads to cheap worker subagents

Readme

npm version License: MIT Node OpenCode

OpenCode plugin. Big model keeps orchestration. Little worker subagents do bulk reads and boilerplate.

Contents

Requires OpenCode 2.x (tested on 2.0.16).

Install

{
  "$schema": "https://opencode.ai/config.json",
  "plugins": ["big-little"]
}

Restart OpenCode after install. Restart picks up config changes.

Local plugin directories need a top-level index.js/index.ts entrypoint for OpenCode discovery; this package ships one that re-exports dist/index.js, so both "plugins": ["/absolute/path/big-little"] and the npm package work.

Verify your install

Project plugins load when their location boots (for example on session start), not for debug commands. With a session open in a project that enables this plugin, run:

opencode api agent.list --param 'location[directory]=/path/to/project'

Check that bulk-reader and code-writer appear with mode: "subagent" and a permissions array (no temperature, no prompt, no bash/task actions). This uses no model. (opencode debug config only lists config sources, and debug agents does not reflect plugin-registered agents.)

Configuration

Every option is optional. Env vars apply only when the matching option is absent.

With options (object form):

{
  "plugins": [
    { "package": "big-little", "options": { "minLines": 500 } }
  ]
}

| Option | Env fallback | Default | Rule | | --- | --- | --- | --- | | minLines | BIGLITTLE_MIN_LINES, then deprecated SHUNT_MIN_LINES | 350 | Positive integer. Zero, negative, or garbage means 350. | | bulkReaderModel | BIGLITTLE_BULK_READER_MODEL | unset (inherit caller model) | Example opencode/nemotron-3.5-lightning-free. | | codeWriterModel | BIGLITTLE_CODE_WRITER_MODEL | unset (inherit caller model) | Same semantics. |

Model picks below are OpenCode Zen free-tier models (opencode/nemotron-3.5-lightning-free reads, opencode/mimo-v2.5-free writes), so most users already have them. Free-tier availability is limited-time — run /models in the TUI to confirm before pinning.

Examples

  1. Defaults only (350-line threshold, workers inherit your model):
{
  "plugins": ["big-little"]
}
  1. Custom threshold only:
{
  "plugins": [{ "package": "big-little", "options": { "minLines": 500 } }]
}
  1. Cheap bulk-reader only (the main cost saver; threshold stays 350):
{
  "plugins": [{ "package": "big-little", "options": { "bulkReaderModel": "opencode/nemotron-3.5-lightning-free" } }]
}
  1. Code-writer model only:
{
  "plugins": [{ "package": "big-little", "options": { "codeWriterModel": "opencode/mimo-v2.5-free" } }]
}
  1. Both workers pinned, default threshold:
{
  "plugins": [
    {
      "package": "big-little",
      "options": {
        "bulkReaderModel": "opencode/nemotron-3.5-lightning-free",
        "codeWriterModel": "opencode/mimo-v2.5-free"
      }
    }
  ]
}
  1. Everything set:
{
  "plugins": [
    {
      "package": "big-little",
      "options": {
        "minLines": 500,
        "bulkReaderModel": "opencode/nemotron-3.5-lightning-free",
        "codeWriterModel": "opencode/mimo-v2.5-free"
      }
    }
  ]
}

Any option left out falls back to its env var, then the default (see table above). Env-only setup with zero options:

export BIGLITTLE_MIN_LINES=500
export BIGLITTLE_BULK_READER_MODEL=opencode/nemotron-3.5-lightning-free
export BIGLITTLE_CODE_WRITER_MODEL=opencode/mimo-v2.5-free

How it works

bulk-reader flow

flowchart LR
    primary["Primary agent"]
    hook["execute.before hook"]
    br["bulk-reader subagent"]
    code[("Codebase")]

    primary -- "full read, file over minLines" --> hook
    hook -- "block: delegate to bulk-reader" --> br
    br -- "grep / glob / narrow reads" --> code
    br -- "summary + paths + line numbers" --> primary
    primary -- "offset/limit re-read of edit target" --> code
    primary -- "edit" --> code

Targeted reads (offset/limit set) and piped shell commands skip the hook entirely.

code-writer flow

flowchart LR
    primary2["Primary agent"]
    cw["code-writer subagent"]
    code2[("Codebase")]

    primary2 -- "spec + reference file + target path" --> cw
    cw -- "read reference, match patterns" --> code2
    cw -- "write finished file via edit" --> code2
    primary2 -- "run tests + lint (writer has no shell)" --> code2

What it does

  • Registers bulk-reader (read-only explorer) and code-writer (boilerplate writer via edit) through ctx.agent.transform (upsert via editor.update).
  • Blocks full-file read over threshold via ctx.tool.hook("execute.before"). Message names bulk-reader and offers offset/limit retry. The guard reads the V2 path key and resolves relative paths against the calling session's directory (cached lookup, fail open).
  • Blocks cat|head|tail|less|more over threshold on the shell tool. Piped commands pass.
  • Targeted reads (offset or limit set) always pass.

Limits

  • Set a cheap worker model or you get discipline without cost saving.
  • Re-read target sections with offset/limit before edit. Worker line numbers can drift.
  • Keep debugging and architecture on the main model.
  • code-writer cannot run shell or network. Caller runs tests and lint.
  • Relative paths are resolved against the calling session's directory; if that lookup fails the guard fails open to raw-path behavior.

Benchmark selection

  • https://hub.harborframework.com/tasks/terminal-bench/data-anonymization
  • https://hub.harborframework.com/tasks/terminal-bench/multi-source-data-merger
  • https://hub.harborframework.com/tasks/swe-bench/scikit-learn__scikit-learn-14053
  • https://hub.harborframework.com/tasks/swe-bench/scikit-learn__scikit-learn-14710