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

@el4cteo/opencode-goal

v1.0.3

Published

Claude Code-style /goal for OpenCode v2: set a completion condition and the agent keeps working until it is met.

Readme

opencode-goal

Claude Code's /goal for OpenCode v2. Give the agent a finish line; it keeps working, turn after turn, until an evaluator confirms the condition is met.

/goal in the OpenCode CLI

Install

opencode plugin add @el4cteo/opencode-goal

Or from GitHub: opencode plugin add github:EL4CTEO/opencode-goal, or point plugins in opencode.json at a local clone:

{ "plugins": ["/path/to/opencode-goal"] }

Requires OpenCode 2.0.29 or newer.

Use

| Command | What it does | | --- | --- | | /goal <condition> | Sets the goal and starts working on it right away | | /goal | Shows status: condition, time, turns, spend, last evaluator reason | | /goal clear | Removes the goal (stop, off, reset, none, cancel also work) |

/goal bun test passes with 0 failures and no test file is modified

While a goal runs, the footer shows its state:

footer indicator

Write a good condition: one measurable end state, how to prove it (npm test exits 0), and anything that must not change. Add a limit for open-ended work, e.g. or stop after 20 turns.

How it works

  • After every turn, an evaluator reads the conversation and answers met, not met or impossible.
  • Not met: the agent gets the reason and starts the next turn on its own.
  • Met / impossible: the goal ends and a note is added to the transcript.
  • The evaluator only sees what's in the conversation, so the agent is told to show proof (test output, command results).
  • By default the evaluator reuses the session's cached context, so each check costs little more than a short answer.

Safety rails:

  • Pauses after 3 turns in a row without tool use, on rate limits, on interrupt (Esc), or at the 200-turn cap. Send any message to resume.
  • Retries dropped connections and overloads with backoff (up to 3 times).
  • Clears on errors you must fix: auth, credit, context overflow, missing model.
  • Waits while subagents or background shells run, with check-ins at 30 min, then 60, then 120.
  • Restores active goals after a restart or plugin reload.

Options

All optional, set in opencode.json:

{
  "plugins": [
    {
      "package": "@el4cteo/opencode-goal",
      "options": {
        "evaluator": { "model": "opencode-go/deepseek-v4.1-flash" },
        "maxTurns": 200,
        "stallTurns": 3,
        "checkinMinutes": 30,
        "maxRetries": 3,
        "systemReminder": false,
        "transcriptNotes": true
      }
    }
  ]
}

| Option | Default | Meaning | | --- | --- | --- | | evaluator.model | session model | Separate model that judges the goal (fresh eyes, uses a transcript digest) | | evaluator.mode | auto | session, independent, or auto (independent when a model is set) | | maxTurns | 200 | Hard turn cap, 0 = none | | stallTurns | 3 | Turns without tool use before pausing | | checkinMinutes | 30 | First background check-in; 0 disables check-ins and retries | | maxRetries | 3 | Automatic retries after transient errors | | systemReminder | false | Also put the goal in the system prompt (costs one cache miss) | | transcriptNotes | true | Record achieved/impossible verdicts in the transcript |

Environment overrides: OPENCODE_GOAL_MODEL, OPENCODE_GOAL_MAX_TURNS, OPENCODE_GOAL_CHECKIN_MINUTES.

Develop

bun install
bun run check                         # typecheck + unit tests
bun run e2e <empty-dir> [provider/model]  # real run against a private opencode server

License

MIT