Reuse Before Generate

io.github.aradar46由 GitHub 帳號 aradar46 發布v0.2.3更新於 Oct 24, 2026

Checks whether your idea already exists before your agent builds it. Searches GitHub, npm, Python.

概覽

AI 產生的概覽

在寫程式之前先查這個想法是否已存在:搜尋公開程式碼庫與套件索引,讓助理優先建議沿用現成專案。

可以做什麼
  • 搜尋 GitHub、GitLab、Show HN、Flathub、F-Droid、GNOME Extensions 等公開儲存庫與專案
  • 搜尋 npm、PyPI、Conda、CRAN、crates.io、NuGet、Maven Central、RubyGems、Packagist、Homebrew、AUR 等套件庫
  • 搜尋 Hugging Face 上的 AI 模型與 Docker Hub 上的容器映像
  • 以結構化 Markdown 回傳結果,並提示助理接著用網頁搜尋尋找商業產品或自架方案
  • 也可在終端機以命令列方式直接執行相同的搜尋
適用情境
適合在助理準備從零打造新應用程式、模組或工具之前使用,先確認是否已有可維護的開源函式庫、套件或現成產品能直接沿用或擴充。
執行需求
以 stdio 方式在本機執行,通常透過 npx 啟動,需要安裝 Node.js。不需 API 金鑰,所有來源皆使用公開端點。選用環境變數 GITHUB_TOKEN 可將 GitHub 搜尋速率上限從每分鐘 10 次提高到 30 次。搜尋需要網路連線。
安裝前請注意
搜尋關鍵字會送往多個第三方公開端點,因此會離開本機。各來源為盡力查詢,某個來源無法使用或被限流時結果可能不完整。若設定 GITHUB_TOKEN,該權杖會存放在用戶端設定中,建議使用權限最小的權杖。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Reuse Before Generate,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

reuse-before-generate

[npm] [license] [reuse-before-generate MCP server]

Your idea probably already exists. Find out before you build it, not after.

When you ask an AI coding assistant to build an app or module, it overenthusiastically starts scaffolding thousands of lines of code from scratch—even when battle-tested open-source libraries or maintained tools already exist.

reuse-before-generate is a zero-dependency MCP server (and CLI tool) that intercepts the AI workflow before code generation begins. It searches public code and package indexes across multiple angles, formats results as structured Markdown, and directs the AI to search the web for existing SaaS products and community discussions.

Sources checked

The server checks these sources in parallel:

SourceWhat it searches
GitHubPublic repositories
GitLabPublic projects
Show HNHacker News product & project launches
FlathubLinux desktop GUI applications
F-DroidAndroid open-source apps & utilities
GNOME ExtensionsDesktop shell extensions
HomebrewCurated CLI utilities & formulas
AURArch Linux tools, daemons, & scripts
PyPIPython packages & utilities
Conda / BiocondaConda-forge & Bioconda packages
CRAN / BioconductorR packages & bioinformatics libraries
npmJavaScript & TypeScript packages
crates.ioRust crates
NuGet.NET packages
Hugging FaceAI models & pipelines
Docker HubPublic container images
Maven CentralJava artifacts
RubyGemsRuby gems
PackagistPHP packages

All added sources use public endpoints and do not require API keys. They are queried on a best-effort basis: if one source is unavailable or rate-limited, results from the other sources are still returned. A GitHub token is optional and only raises GitHub's search rate limit.


Quick Start & Installation

No API keys required to start.

1. Claude Code CLI

bash
claude mcp add -s user reuse-before-generate -- npx -y reuse-before-generate

2. Cursor, Claude Desktop, Antigravity, Windsurf, or VS Code

Add this to your mcpServers configuration (e.g. ~/.claude/mcp.json, ~/.gemini/antigravity-ide/mcp_config.json, or Cursor settings):

json
{  "mcpServers": {    "reuse-before-generate": {      "command": "npx",      "args": ["-y", "reuse-before-generate@latest"]    }  }}
Optional: Higher GitHub API Limits

You can optionally pass a GitHub token to raise GitHub's rate limits:

json
{  "mcpServers": {    "reuse-before-generate": {      "command": "npx",      "args": ["-y", "reuse-before-generate@latest"],      "env": {        "GITHUB_TOKEN": "ghp_your_token_here"      }    }  }}

3. Run Directly in Terminal (CLI Mode)

You can run searches directly from your shell without an MCP client:

bash
npx reuse-before-generate "terminal markdown viewer"# or if cloned locally:node index.js "gnome speech to text offline"

4. Slash Command / Agent Skill

In supported AI coding assistants (Antigravity, Claude Code), you can invoke it directly via slash command:

text
/reuse-before-generate <project description or keywords>

🤖 Make It Automatic for AI Agents

To ensure your AI assistant checks for existing solutions before writing code, add this instruction to your CLAUDE.md, .cursorrules, GEMINI.md, or AGENTS.md:

markdown
Before scaffolding a new project or substantial new module from scratch:1. Call `check_before_building` (or `reuse_before_generate`) from the `reuse-before-generate` MCP server.2. Follow up with web search for existing commercial products or self-hosted tools as directed by the tool.3. Present existing alternatives in a concise table and ask the user whether to reuse or extend an existing project instead of building from scratch.

🤖 AI Disclosure

For details on how AI is used in this project, see What I delegate to AI and what I don't.


License

MIT

來源:README.md,提交 f9141bf

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.2.3最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分