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

@superq/search-before-build

v0.2.2

Published

Install the Search Before Build Codex plugin from its official marketplace.

Readme

Search Before Build

在开始 vibe coding 之前,先确认这东西真的值得做。

一个对新手友好的 Codex / Claude Code 的轻量插件:帮你说清问题、判断开发必要性,并认真寻找已经存在的产品、开源项目和可复用组件。

npm Codex Claude Code License

English | 简体中文


为什么做这个?

Vibe coding 让“有个想法”到“开始写代码”的距离变得非常短。这很爽,但也容易:为一次性问题搭一整套系统、写到一半才发现已有成熟产品、重复造轮子,最后花掉大量 token 得到一个自己也不会用的项目。

search-before-build 不打击想法,只是让你开工前多停几分钟,回答三个问题:

  1. 你真正想解决的是什么?
  2. 这件事真的需要开发吗?
  3. 有没有现成方案可以直接用或拿来改?

它怎么工作?

一个模糊的想法
      │
      ▼
说清真实问题 ──→ 判断是否值得开发 ──→ 检索并验证现有方案
                                              │
                                              ▼
                         Build / Adapt / Use existing / Stop

最终给出一个明确但可由你覆盖的建议:

| 建议 | 含义 | | --- | --- | | Build | 需求真实,现有方案确实没覆盖关键缺口 | | Adapt | 已有接近的方案,改造比从头开发更合适 | | Use existing | 成熟方案已能解决主要问题,直接用更划算 | | Stop | 需求证据不足,或开发成本明显高于收益 |

两个技能

| 技能 | 适用场景 | 用法 | | --- | --- | --- | | search-before-build-assess | 只有想法、尚未开始 | 先读已有信息,仅在关键内容缺失时追问(每次一问,最多五个),再检索并给出建议 | | search-before-build-compare | 已有计划书、原型或仓库 | 从现有材料提取能力,直接寻找相似竞品和可复用方案 |

/search-before-build:search-before-build-assess 我想做一个自动整理收藏内容的工具
/search-before-build:search-before-build-compare ./docs/plan.md

不只是搜索 GitHub

先看要找什么,再决定去哪里找。插件从需求中提取功能指纹,只选真正相关的来源,不会每次扫遍所有平台。

| 要找的东西 | 优先来源 | | --- | --- | | 开源仓库、源码或可复用实现 | GitHub | | JS / Node.js 依赖、CLI 或插件 | npm | | 跨生态软件包信息与维护信号 | Ecosyste.ms Packages | | Agent 可用的 MCP 工具或连接器 | Official MCP Registry | | JVM(Java / Kotlin / Android)依赖 | Maven Central | | Rust crate | crates.io | | 模型、数据集或可复用 AI 应用 | Hugging Face Hub | | 算法、论文或学术先例 | arXiv |

SaaS、商业产品、应用商店等不在目录中的方案,用网络搜索和官方页面补充。目标市场不明确时中英文同时检索。Stars、下载量只辅助判断成熟度,不代替功能匹配,也不会仅因名称相似就认定为竞品。

可选的 GitHub 深度检索

有 GitHub MCP、Connector 或等价工具时直接复用;没有也能通过公开 API 和网页搜索正常运行。经用户同意可自动安装 GitHub 官方 MCP:

启用 GitHub 深度检索

安装器会下载并校验官方二进制,以 repos 工具集和 --read-only 模式运行,首次连接用浏览器 OAuth(无需 PAT、Docker 或额外包)。需要本机 Node.js 18+,Windows / macOS / Linux 通用;基础检索本身不依赖 Node。拒绝或授权失败会自动回退。

临时研究简报与可选保存

研究完成后,插件会生成一份精心排版的本地 HTML 简报,集中展示最终建议、检索覆盖、能力矩阵、重点竞品、可复用经验和未知项。页面使用单文件离线渲染,不依赖 CDN,并覆盖写入系统临时目录,因此不会因为一次随手询问就在当前项目中留下报告文件。

三步读懂一份研究简报

体验完整报告样例

1. 先看结论

把真实需求、主要证据和剩余未知项汇总为一个明确建议,让你在投入开发之前先看清最值得复用的方向。

Search Before Build 中文研究简报的首页结论,展示 Use existing 建议、最值得复用方案和最大未知项

2. 再看能力矩阵

只比较会影响选择的关键能力,用统一的支持标签呈现候选差异;证据不足时保留“尚未验证”,而不是猜测为不支持。

Search Before Build 中文研究简报的能力矩阵,对比当前想法与多个候选方案的关键能力

3. 最后深挖候选

逐个查看采用成本、关键限制、值得关注的设计和可复用经验,并保留可追溯的官方来源。

Search Before Build 中文研究简报的单个竞品分析模块,展示项目对比、可复用经验和总结

每个竞品都提供“保存 Markdown”和“复制 Markdown”操作。只有你在看完结果后主动选择导出,或者明确要求插件持久化某个竞品时,才会形成长期报告:

docs/search-before-build/<当前项目>/<竞品>.md

持久化报告继续保持一竞品一文件,只包含竞品简介、与当前项目的对比表、值得关注的设计、可复用启发、一句话总结和资料来源,不包含必要性判断或最终裁决。

安装与使用

Codex(一条命令)

npx @superq/search-before-build install

完成后新开一个 Codex 任务:

$search-before-build-assess <你的想法、计划或文件路径>
$search-before-build-compare <计划书、原型或仓库路径>

Codex(开发安装,跟随 main

codex plugin marketplace add user-w-ui/search-before-build --ref main
codex plugin add search-before-build@search-before-build

Claude Code(marketplace)

/plugin marketplace add user-w-ui/search-before-build
/plugin install search-before-build@search-before-build

安装后即可调用 /search-before-build:search-before-build-assess...-compare;用 /plugin marketplace update search-before-build 更新。

Claude Code(本地加载)

claude --plugin-dir /path/to/search-before-build

验证插件

claude plugin validate --strict .
python tests/validate_plugin.py

参与贡献

欢迎提交 Issue 或 Pull Request,尤其欢迎:常被漏掉的检索平台、名称相似但功能不同的误匹配案例、能明显省时或省 token 的复用案例,以及对非专业用户仍太难理解的表达。


三思而后行。