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

v1.1.0

Published

Session-scoped /goal command for OpenCode with autonomous execution loop, configurable judge model, and state persistence

Readme

opencode-goal-worker

Session-scoped /goal command for OpenCode with an autonomous execution loop and configurable judge model.

npm install -g opencode-goal-worker
opencode-goal
/goal "All tests pass with npm test"
◎ Goal set · "All tests pass with npm test"
○ Turn 1 · 3 tests still failing
○ Turn 2 · 1 test still failing
✓ Goal achieved · 3 turns · 22s

Built to match Claude Code's /goal primitive — set a verifiable completion condition and let the agent iterate autonomously until it's met.

Architecture

/goal "condition"
    │
    ▼
┌─────────────┐     ┌──────────────┐
│ goal-worker  │────▶│  goal-judge  │
│  (primary)   │◀────│  (subagent)  │
└─────────────┘     └──────────────┘
    │                      │
    │  work → checkpoint   │  evaluate
    │  ← judge verdict     │  return {met, reason}
    │                      │
    ▼                      ▼
┌─────────────────────────────────┐
│  .opencode/goal.md (state file) │
│  YAML frontmatter persistence   │
└─────────────────────────────────┘

| Component | Type | Description | |---|---|---| | goal.md | Command | Entry point, delegates to goal-worker | | goal-worker | Primary agent | Autonomous work loop: plan → act → checkpoint → evaluate | | goal-judge | Subagent | Independent evaluator using a fast/cheap model | | goal-loop | Skill | Reusable iterative pattern documentation |

Commands

| Command | Action | |---|---| | /goal "condition" | Set a new goal and start autonomous work | | /goal | Display current goal status, turns, last verdict | | /goal clear | Abandon current goal | | /goal pause | Suspend goal without clearing | | /goal resume | Resume a paused goal |

Installation

From npm

npm install -g opencode-goal-worker
opencode-goal

From source

git clone https://github.com/lindoelio/opencode-goal-worker
npm install
npm test

Manual

cp -r {commands,agents,skills} ~/.config/opencode/
node install.js            # auto-configures opencode.json agents

Configuration

The installer adds goal-worker and goal-judge agents to your ~/.config/opencode/opencode.json. Customize the judge model to use your cheapest/fastest available model:

{
  "agent": {
    "goal-judge": {
      "mode": "subagent",
      "model": "openai/gpt-4o-mini",
      "description": "Evaluates whether a goal condition has been met"
    }
  }
}

The judge model is entirely configurable — use whatever fast/cheap model you have access to.

The installer also sets safe defaults for agent permissions:

| Tool | Setting | Reason | |---|---|---| | question | deny | Prevents mid-loop "should I continue?" prompts | | doom_loop | deny | Prevents the system from interrupting iterative work as stuck |

You can override these in your config if you need interactive clarification during the work loop.

State File

Goals persist in .opencode/goal.md:

---
condition: All tests pass with npm test
status: active
iterations: 3
started_at: '2026-06-06T14:30:00Z'
last_verdict: 2 tests fail in src/auth.test.ts
max_iterations: 0
---
  • max_iterations: 0 = unlimited (stops only when met or user clears)
  • max_iterations: N = stops after N iterations, falls back to user

Judge Contract

The goal-judge subagent returns structured JSON:

{"met": false, "reason": "3 of 5 tests still fail in auth.test.ts"}
{"met": true, "reason": "npm test exits 0, all tests pass"}

The worker uses the reason field of met: false verdicts to guide the next iteration.