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-tamer-judge

v1.1.0

Published

LLM-powered judge for opencode - blocks file modifications without explicit user permission

Readme

opencode-tamer-judge

LLM-powered guard for opencode — configurable approval system for file modifications and bash commands. The AI assistant asks your LLM before making changes. You stay in control.

How it works

A lightweight plugin intercepts tool calls (write, edit, bash) and forwards them to your configured LLM. The judge receives:

  • The tool name and arguments being attempted
  • The last messages from the conversation, in chronological order
  • The active rules from rules.json

The LLM decides:

  • ALLOW — permits the action
  • BLOCK — rejects the action if it wasn't requested, is ambiguous, or is dangerous

The decision is based on the judge prompt, active rules, tool arguments, and conversation context.

This prevents the AI assistant from:

  • Modifying files without being asked
  • Running destructive commands
  • Making changes that weren't requested

Configuration

All configuration lives in a single rules.json file.

Full example

{
  "version": "0.1.0",
  "rules": [
    {
      "id": "rule_001",
      "name": "Confirm before editing files",
      "trigger": {
        "tool": ["write", "edit", "bash"],
        "condition": "cross_file_or_delete"
      },
      "instruction": "Before modifying or deleting files, tell the user which files and changes are planned, then wait for explicit confirmation.",
      "intercept_level": "L2",
      "status": "active"
    }
  ],
  "judges": [
    {
      "id": "judge_001",
      "name": "Main Judge",
      "trigger": {
        "tool": ["edit", "bash", "write"],
        "condition": "always"
      },
      "status": "active",
      "promptFile": "judge_prompt.md",
      "judge": {
        "maxMessages": 10,
        "api": {
          "endpoint": "http://localhost:8080/v1/chat/completions",
          "model": "your-model-name",
          "apiKey": null,
          "temperature": 0.1,
          "maxTokens": 200
        },
        "bashModifyPatterns": [
          "rm.*-rf",
          "git.*reset.*--hard",
          "git.*push.*--force",
          "drop.*table",
          "dd.*if=",
          "mkfs"
        ]
      }
    }
  ]
}

Judges

| Field | Description | |---|---| | trigger.tool | Tools this judge applies to (write, edit, bash, * for all) | | promptFile | Path to the judge prompt (markdown file) | | judge.api.endpoint | OpenAI-compatible API URL | | judge.api.model | Model name | | judge.api.apiKey | API key (optional) | | judge.api.temperature | Sampling temperature | | judge.bashModifyPatterns | Regex patterns for bash commands that modify files | | judge.maxMessages | Max conversation context messages sent to LLM |

Intercept levels

| Level | Behavior | |---|---| | L1 | Hard block — instant rejection, no LLM call | | L2 | Logs the match and records a hit — does not block or confirm | | L3 | Logs a warning and suggests alternatives, does not block |

Trigger conditions

| Condition | When it activates | |---|---| | always | Every matching tool call | | cross_file_or_delete | Triggers on all write operations (v0.0 simplification) | | dangerous_command | Only for high-risk bash commands | | sudo | Bash commands requiring elevated privileges | | uncertainty_signal | Agent expresses uncertainty | | unread_file | Disabled in v0.0 — always false (needs session-level read tracking) |

Prompt file

The judge's reasoning logic lives in a separate markdown file (judge_prompt.md). Edit it without touching code to change judge behavior — personality, examples, permission categories, response format.

The prompt instructs the LLM to respond with pure JSON: {"allow": true, "reason": "..."} or {"allow": false, "reason": "..."}.

Built-in tools

The plugin registers two additional tools that the assistant can call on your behalf:

  • tamer_remember — persists a correction as a personal rule. Requires explicit user confirmation before saving.
  • tamer_rules — lists, enables, disables, or archives rules by ID. Useful for troubleshooting which rules are active.

Hits log

Every tool call evaluation is logged to ~/.tamer/hits.jsonl. This file can be used to audit which rules fired, how often, and what decisions the judge made.

Installation

npm install opencode-tamer-judge

Add the plugin to your opencode configuration. Configure rules.json (typically at ~/.tamer/rules.json) and the judge starts intercepting tool calls.

License

MIT