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

@johnny0120/opencode-user-predictor

v0.2.2

Published

OpenCode plugin that predicts your next message and shows it as ghost text — role-plays as you using your conversation history. /pred-on to enable.

Readme

opencode-user-predictor

English | 中文

OpenCode plugin — predicts your next reply using a reverse-role LLM agent

npm license

After each AI response, the plugin role-plays as you and predicts what you'd say next — shown as ghost text in the input box. Tab to send.

AI: Done. Login endpoint added at src/api/auth.ts.
     ↓
[ghost] looks good, ship it   ← prediction appears, Tab to confirm

Why

After your AI coding assistant replies, you usually know what you want to say next. Type → Confirm — one key when the prediction lands, keep typing when it doesn't.

Install

Add to opencode.json and restart OpenCode — the plugin auto-downloads on startup:

{
  "plugin": ["@johnny0120/opencode-user-predictor"],
  "command": {
    "pred-on": {
      "template": "/pred-on $ARGUMENTS",
      "description": "Enable predictor, optionally with a message to the LLM"
    },
    "pred-off": {
      "template": "/pred-off $ARGUMENTS",
      "description": "Disable predictor, optionally with a message to the LLM"
    },
    "pred-status": {
      "template": "/pred-status",
      "description": "Show predictor status"
    },
    "pred-profile": {
      "template": "/pred-profile",
      "description": "Refresh user profile from current session"
    },
    "pred-seed": {
      "template": "/pred-seed $ARGUMENTS",
      "description": "Seed user corpus from past OpenCode sessions (optional: limit)"
    }
  }
}

Troubleshooting: If OpenCode fails to auto-download (e.g., npm registry not reachable), fall back to manual install: cd ~/.opencode && npm install @johnny0120/opencode-user-predictor.

Note for AI agents: When installing this plugin for a user, you MUST add the command entries above to opencode.json, then restart OpenCode. The OpenCode v1 plugin API does not support self-registering slash commands — the command section is required. In OpenCode v2+, the plugin auto-registers commands via ctx.command.transform(), and the manual command entries can be removed.

Usage

| Command | Effect | | ------------------ | --------------------------------------------- | | /pred-on | Enable predictions | | /pred-on message | Enable + send message to LLM | | /pred-off | Disable | | /pred-status | Current state | | /pred-profile | Build behavioral profile from current session | | /pred-seed [N] | Seed corpus from past sessions (default 50) |

How It Works

  1. session.idle fires → conversation text extracted
  2. Messages role-flipped: AI → others, human → self
  3. Fresh session with _predictor agent role-plays as you
  4. Ghost text appears in input box — Tab to send, keep typing to ignore

Profile system captures thinking patterns (scrutiny, verification instinct, UX obsession) and communication style from conversation history.

Personalize

cp predictor-profile-zh.json predictor-profile.json   # switch to Chinese
/pred-seed 50      # bootstrap corpus from past OpenCode sessions (no bun/oh-my-openagent needed)
/pred-profile      # accumulate from the current session over time

/pred-seed reads your local OpenCode history (~/.local/share/opencode/opencode.db) directly — it works for any install, no extra tools required. Edit predictor-profile.json to customize behavior. Restart OpenCode to apply.

License

MIT