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-debug-agent

v0.1.7

Published

OpenCode plugin for runtime debugging - capture and analyze execution data

Downloads

27

Readme

opencode-debug-agent

OpenCode plugin for runtime debugging - capture and analyze execution data via HTTP instrumentation.

Features

  • Debug Agent - Primary agent specialized for debugging workflows
  • Debug Skill - Use debugging tools from any agent via skill({ name: "debug" })
  • HTTP Server - Hono-based server with CORS support for browser/Node instrumentation
  • Port Persistence - Server remembers its port across sessions
  • 5 Tools - debug_start, debug_stop, debug_read, debug_clear, debug_status

Installation

Add to your opencode.json:

{
  "plugin": ["opencode-debug-agent"]
}

Or for local development, copy to .opencode/plugin/.

Usage

Using the Debug Agent

Switch to the debug agent (Tab key) and describe your issue. The agent will:

  1. Start the debug server
  2. Instrument your code with fetch() calls
  3. Ask you to reproduce the issue
  4. Analyze captured logs
  5. Help identify the problem
  6. Clean up instrumentation

Using the Debug Skill (from any agent)

Load the debug skill and help me debug this API timeout issue.

The build agent can then use all debug tools.

Manual Tool Usage

debug_start          # Start server, get instrumentation snippet
debug_status         # Check if server running, get port
debug_read           # Read captured logs
debug_read(tail: 10) # Read last 10 entries
debug_clear          # Clear log file
debug_stop           # Stop server

How It Works

  1. Start server: debug_start launches an HTTP server and returns a ready-to-use fetch() snippet
  2. Instrument code: Insert the snippet at strategic locations to capture runtime data
  3. Reproduce issue: User runs their code normally
  4. Analyze logs: debug_read returns captured data as structured JSON
  5. Clean up: debug_stop and remove instrumentation

Instrumentation Example

// Snippet returned by debug_start:
fetch("http://localhost:54321/log", {
  method: "POST",
  headers: {"Content-Type": "application/json"},
  body: JSON.stringify({label: "LABEL_HERE", data: {YOUR_DATA}})
})

// Used in code:
fetch("http://localhost:54321/log", {
  method: "POST", 
  headers: {"Content-Type": "application/json"},
  body: JSON.stringify({label: "before-api", data: {userId, params}})
})

Files

  • .opencode/debug.log - NDJSON log file
  • .opencode/debug.port - Persisted port number

Development

bun install
mise run build
mise run test
mise run lint

License

MIT