Reuse Before Generate

io.github.aradar46Published by GitHub account aradar46v0.2.3Updated Oct 24, 2026

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

VerifiedSTDIODesktop onlyWeb Search & ScrapingDeveloper Tools

Overview

AI-generated overview

Checks whether an idea already exists by searching public code and package indexes, so an assistant can suggest reusing existing projects before writing new…

What you can do
  • Search public repositories and projects across GitHub, GitLab, Show HN, Flathub, F-Droid and GNOME Extensions
  • Search package registries including npm, PyPI, Conda, CRAN, crates.io, NuGet, Maven Central, RubyGems, Packagist, Homebrew and AUR
  • Search AI models on Hugging Face and container images on Docker Hub
  • Return results as structured Markdown and prompt the assistant to follow up with web search for commercial or self-hosted alternatives
  • Run the same searches from the terminal as a CLI tool
When to use it
Useful when an assistant is about to scaffold a new app, module or utility and you want it to first check for maintained open-source libraries, packages or existing products worth reusing or extending.
Requirements
Runs locally over stdio, typically via npx with Node.js installed. No API keys are required; all sources use public endpoints. An optional GITHUB_TOKEN environment variable raises the GitHub search rate limit from 10 to 30 requests per minute. Network access is needed for the searches.
Before you install
Searches are sent to many third-party public endpoints, so the keywords you search with leave your machine. Sources are queried best-effort, so results may be incomplete when a source is unavailable or rate-limited. If you set GITHUB_TOKEN, it is stored in the client configuration; use a token with minimal scope.

Installation

In SourceWeft

  1. Open Reuse Before Generate in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

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

Source: README.md at commit f9141bf

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.2.3LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts