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-context-dropper-plugin

v0.2.0

Published

A Context Dropper plugin for OpenCode that automates file iteration context management.

Readme

OpenCode Context Dropper Plugin

A Context Dropper plugin for OpenCode, built with Bun and TypeScript. It leverages the internal context-dropper APIs to efficiently process a large set of files one-by-one entirely within your OpenCode sessions. It automatically tracks context and handles token pruning to allow continuous agent iteration.

Prerequisites

Installation

You can install the context-dropper plugin using one of the following methods.

1. Configure OpenCode (Recommended)

You do not need to manually install the package. OpenCode will automatically resolve and install it from the NPM registry when you add it to your configuration.

You can configure the plugin either globally for all projects, or locally for a single project:

Option A: Project-Level (Local)

  1. Create or edit the opencode.json file in the root of your project.
  2. Add the package name to the plugin array:
{
  "plugin": ["opencode-context-dropper-plugin"]
}

Option B: Global-Level

  1. Create or edit your global OpenCode config file at ~/.config/opencode/opencode.json.
  2. Add the package name to the plugin array:
{
  "plugin": ["opencode-context-dropper-plugin"]
}

(Optional) If you prefer to manage the installation yourself, you can install the plugin globally using Bun (bun install -g opencode-context-dropper-plugin) or NPM (npm install -g opencode-context-dropper-plugin).

Usage

Once installed, start OpenCode:

opencode

You can invoke the context dropper loop inside chat simply by using the /drop slash command:

/drop <filesetName> <instructions>
  • <filesetName> is the name of a pre-existing fileset in your project.
  • <instructions> is the prompt you want the AI to perform on each file sequentially.

Example:

/drop backend-routes Please add try/catch blocks and proper logging to all async functions in this file.

The Automation Loop

Once invoked, the plugin completely takes over the context management:

  1. It automatically fetches the first file in the fileset and provides it to the agent along with your instructions.
  2. The agent performs the instructions and automatically calls the context-dropper.next tool.
  3. Context Pruning: When the tool is called, the file is tagged as processed. The plugin drops the previous file's context from the chat history (saving tokens), and feeds the next file to the agent.
  4. This loop continues until all files are processed.

To forcefully stop the loop before it finishes, type "stop context-dropper".

Logging

Plugin activity is written to OpenCode's native log system via the context-dropper service. To view logs, run OpenCode with debug-level output enabled:

opencode --log-level debug

Unexpected errors are logged at error level and are visible at any log level. Operational events (dropper lifecycle, context pruning) are logged at info level.