reuse-before-generate
Health Warn
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 6 GitHub stars
Code Warn
- process.env — Environment variable access in index.js
- network request — Outbound network request in index.js
Permissions Pass
- Permissions — No dangerous permissions requested
No AI report is available for this listing yet.
Stop your AI agent from rebuilding what already exists. An opinionated MCP server that checks GitHub, npm and Python repos for maintained alternatives before you scaffold.
reuse-before-generate
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 GitHub, npm, and crates.io across multiple angles, formats results in structured tables, and directs the AI to search the web for existing SaaS products and community discussions.
Quick Start & Installation
No API keys required to start.
1. Claude Code CLI
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):
{
"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:
{
"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:
npx reuse-before-generate "terminal markdown viewer"
# or if cloned locally:
node index.js "gnome speech to text offline"
🤖 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:
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
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found