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

@rynfar/meridian-plugin-opencode-scrub

v0.3.0

Published

Meridian plugin: strip opencode-identifying fingerprints from the system prompt before it reaches Claude.

Readme

@rynfar/meridian-plugin-opencode-scrub

A Meridian plugin that strips OpenCode's identifying fingerprints from the system prompt before it reaches Claude.

Why

Vanilla OpenCode's system prompt (loaded from packages/opencode/src/session/prompt/anthropic.txt when the model id matches claude) opens with "You are OpenCode, the best coding agent on the planet." and carries a feedback block pointing at github.com/anomalyco/opencode, a docs paragraph referencing opencode.ai/docs, and a "Professional objectivity" sentence that names OpenCode directly.

OpenCode's runtime environment() builder also prepends a line like "You are powered by the model named claude-opus-4-6. The exact model ID is anthropic/claude-opus-4-6" — a phrasing Claude Code never emits, which makes it a strong third-party tell.

When Meridian routes OpenCode → Claude Max, those identity sections are:

  1. Redundant — Claude Code's preset already owns identity, tone, safety, and tool-use guidance.
  2. A detection fingerprint — they give Anthropic's detection a clear "this isn't Claude Code" signal that can trigger third-party extra-usage errors or rate-limit flags.

This plugin surgically removes those lines and replaces the identity paragraph with a neutral, generic coding-assistant framing. It removes the duplicate environment preamble and redundant fields while keeping a bare <env> block with the client Working directory line. Tone rules, task management, tool usage policy, code references, and user CLAUDE.md content remain intact.

The scrub also handles OhMyOpenCode-style custom personas (Sisyphus et al.): the You are "Sisyphus" ... from OhMyOpenCode. identity line and the <omo-env>...</omo-env> block are stripped, while the persona's orchestration rules (Phase 0 intent gate, explore/librarian delegation, Oracle consultation, tone guidelines) are preserved.

The scrub is idempotent — running it twice on the same string is a no-op.

Modes

The default aggressive mode retains current scrubbing. Set MERIDIAN_OPENCODE_SCRUB_MODE=minimal for surgical removal without inserting a generic identity or replacing residual OpenCode/OhMyOpenCode words in preserved prose. Both modes remove known identity wrappers, feedback/docs fingerprints, powered-by lines and duplicate runtime environment blocks. Both retain the client working-directory field, project instructions and tool/persona policies, and normalize leftover blank lines. Minimal mode still removes the duplicate environment preamble; preserving it would defeat the metering fix.

MERIDIAN_OPENCODE_SCRUB_MODE=minimal meridian

Other or unset values select aggressive. Adapter and passthrough marker guards apply in both modes; genuine Claude Code prompts stay unchanged.

Install

Option 1: npm (recommended)

mkdir -p ~/.config/meridian && cd ~/.config/meridian
npm init -y >/dev/null
npm install @rynfar/meridian-plugin-opencode-scrub

Then point Meridian's plugin config at the installed file:

cat > ~/.config/meridian/plugins.json <<'JSON'
{
  "plugins": [
    {
      "path": "/Users/YOU/.config/meridian/node_modules/@rynfar/meridian-plugin-opencode-scrub/dist/index.js",
      "enabled": true
    }
  ]
}
JSON

Restart Meridian (or curl -X POST http://localhost:3456/plugins/reload).

Option 2: Local clone (for development)

git clone https://github.com/rynfar/meridian-plugin-opencode-scrub.git ~/repos/meridian-plugin-opencode-scrub
cd ~/repos/meridian-plugin-opencode-scrub
npm install
npm run build

Point ~/.config/meridian/plugins.json at dist/index.js in the clone.

Verify at http://localhost:3456/plugins — you should see opencode-scrub listed as active.

Behavior

| Input | Output | |---|---| | No system prompt | unchanged | | System prompt without OpenCode identity markers | unchanged (idempotent) | | Vanilla OpenCode (anthropic.txt) | identity line swapped for generic, feedback block removed, docs paragraph removed, "OpenCode honestly applies" neutralized | | OhMyOpenCode/Sisyphus prompt | OMO identity line removed, <omo-env> block removed, "You are powered by..." line removed; persona rules preserved | | OpenCode prompt + user CLAUDE.md additions | identity stripped, all user content preserved | | OpenCode environment preamble + <env> | duplicate preamble and redundant fields removed; bare Working directory retained for Meridian's cwd extraction |

The plugin runs for the opencode adapter and for passthrough requests that still carry an OpenCode-specific identity or runtime marker. This covers OpenCode routed through LiteLLM when its client headers are removed. Other passthrough prompts, including genuine Claude Code prompts with an <env> block, remain byte-for-byte unchanged.

Rules

The scrub applies 8 independent regex replacements, each idempotent and each a no-op when its pattern is absent:

  1. Vanilla identity line — You are OpenCode, the best coding agent on the planet. → generic
  2. Feedback block — If the user asks for help or wants to give feedback...github.com/anomalyco/opencode
  3. Docs paragraph — When the user directly asks about OpenCode...opencode.ai/docs
  4. Objectivity brand — It is best for the user if OpenCode honestly applies → ...the assistant honestly applies
  5. OMO identity line — You are "Sisyphus" ... from OhMyOpenCode.
  6. OMO env block — <omo-env>...</omo-env>
  7. Powered-by line — You are powered by the model named ...
  8. Residual brand tokens — bare OpenCode → the assistant

When scrubOpencodeFingerprints is called inside an OpenCode client hook, the bare working-directory line keeps the client's project path available to Meridian. Server-side use remains compatible: Meridian extracts the raw path before applying its plugin transform.

Development

npm install
npm run build

The built plugin is a single ES module at dist/index.js with dist/index.d.ts for types.

License

MIT

Manual live verification

Minimal/aggressive headless evidence and reproduction uses actual OpenCode, an independently installed tarball, Claude tool-result receipts and same-session continuation. This manual credentialed gate is separate from the ordinary unit/build CI and does not publish a package.