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

@wgx-plugins/core

v0.1.1

Published

Shared runtime for @wgx-plugins OpenCode plugins (V1 + V2)

Readme

@wgx-plugins/core

@wgx-plugins 插件的共享运行时。提供内容解析、注入器与模式状态机,同时适配 OpenCode V1(1.x)与 V2(2.x)。

安装

npm i @wgx-plugins/core

能力

| 导出 | 作用 | |---|---| | readSkills(dir) / readCommands(dir) | 读取包内内容,BOM/CRLF 安全,支持 > 与 \| 折叠块 | | injectSkills / injectCommands | V2 skill.transform / command.transform 注册 | | injectRules | 同时挂 context 与 compaction 两个 hook | | v1ConfigHook / v1SystemHook | V1 config 与 experimental.chat.system.transform | | createModeRuntime | 模式状态(读写/fail-off/off/persist) | | filterRulesForMode | 按模式过滤规则表格与示例行 | | createPlugin | 输出 { id, setup, server } 三合一插件对象 |

最小用法

import { createPlugin } from "@wgx-plugins/core";

export default createPlugin({
  id: "my-plugin",
  skillsDir: new URL("../skills", import.meta.url).pathname,
  commandsDir: new URL("../commands", import.meta.url).pathname
});

约束

  1. 一个模块只导出一个插件形状,工具函数放独立模块。
  2. .md 允许带 UTF-8 BOM,解析前统一 strip。
  3. context 与 compaction 必须同时注入。
  4. 状态读取失败按关闭处理(fail-off)。