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-plugin-goal

v0.1.0

Published

Persistent /goal workflows for OpenCode.

Readme

opencode-plugin-goal

Persistent /goal workflows for OpenCode.

opencode-plugin-goal emulates Codex-style persistent goals in OpenCode. It registers a /goal slash command through OpenCode's plugin config hook, persists per-session goal state, exposes goal tools to the model, and queues conservative continuation turns while a goal remains active.

Install

After publishing to npm, add the package to your OpenCode config:

{
  "plugin": ["opencode-plugin-goal"]
}

For local development from this repository, use:

{
  "plugin": ["./src/index.ts"]
}

Restart OpenCode after changing plugin config.

Usage

/goal fix the failing tests and keep working until they pass
/goal --budget 100k migrate auth to JWT and update tests
/goal status
/goal pause
/goal resume
/goal clear

Behavior

  • /goal <objective> creates or replaces the session goal and starts work.
  • /goal --budget 100k <objective> creates a goal with an approximate token budget.
  • /goal status shows the current goal.
  • /goal pause stops automatic continuation.
  • /goal resume reactivates a paused or blocked goal.
  • /goal clear clears the session goal.
  • get_goal lets the model inspect the goal.
  • update_goal lets the model mark the goal completed or blocked.

Goal state is stored under .opencode/goals/state.json in the active project directory.

How it works

  • The plugin adds command.goal during OpenCode startup, before the command registry is initialized.
  • The command.execute.before hook rewrites /goal invocations into goal-management prompts.
  • The experimental.chat.system.transform hook injects active-goal instructions into model turns.
  • The experimental.session.compacting hook preserves active goal context through compaction.
  • The event hook watches session idle/status and message events to account usage and queue continuation turns.

Continuation is intentionally conservative. If a continuation turn produces no tool calls, the plugin does not keep auto-continuing, which avoids runaway self-chat loops.

Development

bun run check
npm pack --dry-run

Manual npm release

npm login
npm pack --dry-run
npm publish

Limitations

  • This is a plugin-level emulation, not native OpenCode runtime support.
  • Token accounting is approximate and based on OpenCode message events.
  • Management commands still produce a concise assistant acknowledgement turn.