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-model-profile

v0.1.0

Published

opencode plugin: inject per-model profile markdown into system prompt

Readme

opencode-model-profile

opencode 插件:根据会话当前使用的模型,自动读取 ~/.config/opencode/profile/ 下的 Markdown 文档,把内容追加到该次请求的系统提示词中。

安装

在 opencode.json 中声明插件:

{
  "plugin": ["opencode-model-profile"]
}

opencode 启动时会用 Bun 自动安装。

使用

  1. 创建目录 ~/.config/opencode/profile/

  2. 以模型名为文件名放入 Markdown 文档。例如使用 opencode-go/deepseek-v4-flash 时,创建 deepseek-v4-flash.md:

    你是一位专注于后端开发的工程师。回答请使用中文。
  3. 重新发起对话(文件实时读取,无需重启 opencode),该文档内容会追加到 deepseek-v4-flash 每次请求的系统提示词末尾。

匹配规则

  • 文件名匹配模型 ID 斜杠后的部分(不论提供商)
  • 不区分大小写
  • 文件名支持通配符:*(任意字符)与 ?(单个字符)
  • 精确匹配优先:存在与模型名完全一致(去 .md)的文件时,只注入该文件
  • 无精确匹配时,所有通配匹配的文件按文件名字典序拼接注入
  • 目录不存在或无匹配文件时静默跳过;文件读取失败时记入 opencode 日志(warn)

示例目录:

~/.config/opencode/profile/
├── deepseek-v4-flash.md     # 精确匹配 deepseek-v4-flash
├── deepseek-*.md            # 通配,匹配所有 deepseek- 开头的模型
└── *vision*.md              # 通配,匹配所有含 vision 的模型

兼容性

  • 依赖 opencode 插件的 experimental.chat.system.transform 钩子(实验性 API)。 如 opencode 升级导致该钩子签名变化,请升级本插件。

许可证

本项目基于 SFR 许可证开源:http://www.shared-future.ren/licenses/