Search GitHub before you build from scratch.
写代码前,先查 GitHub 有没有成熟轮子。
DevDetective is an open-source pre-build investigation tool for the AI coding era.
开发者在正式开工前,先输入产品想法,DevDetective 会搜索 GitHub 上的相似开源项目,比较维护状态、License、活跃度和可复用性,再生成可直接交给 Codex、Cursor、Claude Code 等工具的二次开发提示词。
| English | 中文 |
|---|---|
| Input an app idea | 输入一个应用想法 |
| Search similar GitHub repos | 搜索相似 GitHub 项目 |
| Evaluate maintenance, license, and reuse value | 评估维护状态、License 和复用价值 |
| Generate a follow-up prompt for AI coding tools | 生成可交给 AI 编程工具的后续提示词 |
flowchart LR
A["Idea Input"] --> B["AI Requirement Analysis"]
B --> C["GitHub Search Queries"]
C --> D["Repository Search"]
D --> E["Scoring and Filtering"]
E --> F["Top Recommendations"]
F --> G["AI Dev Prompt"]
G --> H["Markdown Report"]
中文理解:
- 用户先描述要做什么。
- 系统先拆解需求,再生成 GitHub 搜索词。
- 搜索候选仓库并评估维护状态、License 和复用价值。
- 输出 Top 推荐、AI 结论和一份可复制的开发提示词。
- It is not just a GitHub search box. It is a pre-build investigation workflow.
- It does not only rank by stars. It also checks push activity, maintenance freshness, and reuse fit.
- It is designed to work with AI coding assistants, not compete with them.
中文补充:
- 它不是普通的 GitHub 搜索框,而是一整套“开工前侦查流程”。
- 它不只看 Star,还看最近提交、维护状态和复用适配度。
- 它不是替代 AI 编程,而是给 AI 编程先做情报准备。
Many ideas already have mature open-source implementations, but people still ask AI tools to build everything from scratch. That usually means more token cost, more trial and error, and worse decisions around reuse and licensing.
很多需求其实已经有成熟开源实现,但大家常常直接让 AI 从零开始写,结果往往是:
- higher token usage / 消耗更多 token
- half-finished prototypes / 更容易做出半成品
- missed reuse opportunities / 错过直接 fork 或局部复用的机会
- ignored maintenance and license risk / 忽略维护状态和 License 风险
DevDetective moves this investigation step to the front of the workflow.
DevDetective 的目标,就是把这一步前置。
- Developers using Codex, Cursor, or Claude Code
- Indie hackers and founders building MVPs quickly
- Teams that want to investigate before rewriting
- Agent workflows that should search first and code second
对应中文场景:
- 使用 Codex、Cursor、Claude Code 的开发者
- 需要快速做 MVP 的独立开发者和创业者
- 想先调研 GitHub 再决定是否重写的人
- 想把“开工前侦查”固化进 Agent 工作流的人
- Natural-language idea input in Chinese or English
- AI requirement analysis and GitHub query generation
- Similar repo search with basic safety filtering
- Maintenance signals: stars, forks, last push, last update, license
- Top recommendations with reuse scoring
- AI-generated follow-up prompt for coding assistants
- Markdown investigation report export
- Unified
/api/investigateendpoint - Bundled
devdetective-skill/for agent workflows
中文总结:
- 支持中英文需求输入
- AI 拆解需求并生成 GitHub 搜索词
- 搜索相似仓库并做基础安全过滤
- 展示最近提交、最近更新、维护状态、Star、Fork、License
- 对候选项目做综合评分
- 生成 Top 推荐和 AI 开发提示词
- 导出 Markdown 侦查报告
- 提供统一的
/api/investigate接口 - 提供可供 Agent 调用的
devdetective-skill/
Live experience URL:
当前仓库以本地运行和开源发布为主,同时提供 AI2Work 托管体验版用于快速试用与案例展示。
For hosted mode, the current default is:
- 2 investigations per 6 hours for the same IP
- Top 5 results by default
- a gentle GitHub Star prompt on the 2nd successful investigation
- lightweight validation, not a replacement for the full local version
可通过环境变量启用:
HOSTED_EXPERIENCE_MODE=true
HOSTED_LIMIT_WINDOW_HOURS=6
HOSTED_MAX_QUERIES_PER_WINDOW=2
HOSTED_MAX_RESULTS=5
NEXT_PUBLIC_BASE_PATH=/devdetectivegit clone https://github.com/dadaleo/DevDetective.git
cd DevDetective
npm install
copy .env.example .env.localThen edit .env.local:
DEEPSEEK_API_KEY=sk-your-deepseek-key
DEEPSEEK_BASE_URL=https://api.deepseek.com/v1
GITHUB_TOKEN=ghp_your_github_token
NEXT_PUBLIC_APP_NAME=DevDetective
DATABASE_URL=./data/devdetective.sqliteStart the app:
npm run devDefault URL:
Required:
DEEPSEEK_API_KEYGITHUB_TOKEN
Optional:
DEEPSEEK_BASE_URLOPENAI_API_KEYOPENAI_BASE_URLNVIDIA_API_KEYDATABASE_URLNEXT_PUBLIC_APP_NAMENEXT_PUBLIC_SITE_URLNEXT_PUBLIC_BASE_PATH
Subpath deployment note:
- set
NEXT_PUBLIC_BASE_PATH=/devdetectivewhen serving the app under a subpath
Suggested repository topics:
github-searchopen-source-discoverydeveloper-toolsai-codingcodexcursornextjsrepo-researchreuse-firstproject-scoring
Product-level usage note:
- DevDetective also reads repository
topicsas part of search relevance, similarity scoring, safety filtering, and UI display, so keeping topics clean on both this repo and candidate repos improves result quality.
| Dimension | Hosted mode | Local mode |
|---|---|---|
| Goal | public online trial | full self-hosted or developer use |
| Access control | per-IP usage window | controlled by your own local/server environment |
| Result count | capped by HOSTED_MAX_RESULTS |
uses request maxResults |
| UX behavior | can show GitHub Star CTA | no hosted Star CTA path |
| Recommended use | demo, landing page, AI2Work traffic entry | real investigation, repeat use, internal workflow |
| Risk posture | lighter public-facing guardrails | you own the full config and operational boundary |
Hosted mode is intentionally conservative. It is for quick validation and public access. Local mode is the real working mode if you want stable repeat usage, fuller control, and private API-key ownership.
This project uses sql.js for zero-native setup and simple local persistence, which is a good fit for:
- local development
- single-user or low-write demo hosting
- quick self-hosted verification
It is not a strong fit for higher-concurrency production hosting because:
- the database is persisted through file exports rather than a multi-process database server
- concurrent writes can become fragile under shared-host or multi-instance traffic
- there is no built-in connection pooling, locking strategy, or operational tooling comparable to Postgres/MySQL
- the data file lives on local filesystem semantics, which is awkward for stateless or horizontally scaled hosting
For real multi-user production hosting, treat sql.js as a bootstrap choice and plan a proper database migration.
GitHub Search is a strong starting point, but it stops at retrieval. DevDetective adds a reusable pre-build investigation workflow on top of that search layer.
它和直接搜 GitHub 的区别,主要在这几件事:
- It turns a fuzzy product idea into structured search queries instead of making you guess the keywords manually.
- It compares repositories through reuse-oriented signals such as maintenance freshness, license visibility, and activity, not just stars.
- It packages the investigation result into a follow-up prompt and report that you can hand directly to Codex, Cursor, or Claude Code.
- It keeps the "search first, build second" step consistent for agent workflows instead of relying on one-off human judgment.
If you already know the exact repo you want, native GitHub Search may be enough. If you are still deciding whether to build, fork, adapt, or avoid a direction, DevDetective is the more useful layer.
如果你已经知道自己要找哪个仓库,直接用 GitHub Search 往往就够了;但如果你还在判断该不该重写、该不该 fork、能否复用,DevDetective 更适合放在开工之前。
说明:
GITHUB_TOKEN用于提升 GitHub API 请求额度与稳定性- 默认 AI Provider 走 DeepSeek
NVIDIA_API_KEY仅用于 README 批量总结分流,可不配置
The unified investigation endpoint handles:
- requirement analysis
- GitHub search
- repo scoring
- prompt generation
- Markdown report generation
请求示例:
{
"idea": "我想做一个局域网文件快传网页",
"techStack": ["Next.js"],
"projectType": "Web 应用",
"updatePreference": "最近 1 年有更新",
"licensePreference": "MIT / Apache / BSD 等友好协议",
"preferRecent": true,
"maxResults": 10,
"outputFormat": "markdown"
}For deployment or hosted-demo health checks.
{
"status": "ok",
"github_token_configured": true,
"ai_provider_configured": true,
"nvidia_configured": false
}Returns built-in example cases.
- local file sharing / 局域网文件快传
- video transcript archive / 视频号转文字归档
- prompt and asset manager / 提示词素材管理器
- WeChat mini app UI generator / 微信小程序 UI 模板生成器
- GitHub tool radar / GitHub 工具雷达
Each report can include:
- user request / 用户原始需求
- intent summary / 需求理解
- search queries / 搜索关键词
- similar repo list / 相似项目列表
- top recommendations / Top 推荐
- license risk note / License 风险提示
- AI development prompt / AI 开发提示词
devdetective-skill/ is designed for Codex, Cursor, Claude Code, and similar agent workflows.
它的用途不是替代网页,而是让 Agent 在“开始写代码前”先调用 DevDetective 的侦查流程。
See:
Current status:
- the repository already includes the skill directory, scripts, examples, and usage docs
- the skill depends on a reachable DevDetective server plus a Python runtime with
requests - before sharing it broadly, run one full install-and-call verification on a clean machine
Recommended verification flow:
- Start DevDetective locally with valid
DEEPSEEK_API_KEYandGITHUB_TOKEN. - In
devdetective-skill/, install Python dependencies fromrequirements.txt. - Run one CLI verification call against the local server.
- Confirm you get search keywords, candidate repos, reuse advice, and a generated development prompt.
- Repeat once with
--format jsonand once with a custom--output-dirto confirm both output paths work.
Example verification commands:
cd devdetective-skill
py -3.12 -m pip install -r requirements.txt
py -3.12 scripts/investigate.py "我想做一个局域网文件快传网页"
py -3.12 scripts/investigate.py "做一个本地知识库管理工具" --format json
py -3.12 scripts/investigate.py "GitHub 工具雷达" --output-dir ./reportsValidation checklist:
- local server reachable at
http://localhost:4567 - non-empty search keywords returned
- at least one repo recommendation shown
- generated prompt is present
- Markdown or JSON output written successfully
DevDetective applies a lightweight safety filter before scoring and displaying repositories.
Current filter behavior:
- checks repository name, full name, description, and GitHub topics
- blocks clearly sensitive or unsuitable categories such as political propaganda, NSFW, extremism, and gambling
- runs before result presentation so hosted-mode users do not see filtered candidates
Important caveats:
- this is a heuristic content filter, not a legal/compliance system
- it reduces obvious bad fits, but it does not replace human review
- false positives and false negatives are still possible, especially when repository wording is vague
- Next.js 14
- React 18
- TypeScript
- Tailwind CSS
- sql.js
- GitHub REST API
- DeepSeek API
- Improve ranking quality with stronger signals for recency, maintenance, and implementation fit
- Add clearer license compatibility warnings and reuse guidance in exported reports
- Support richer comparison views for similar repositories, tradeoffs, and suggested adoption paths
- Expand hosted mode operations, including usage telemetry, quotas, and admin visibility
- Make
devdetective-skill/easier to install and verify on a clean machine - Add more polished public-release assets such as screenshots, sample reports, and walkthrough content
- replace placeholder screenshots / 补产品截图
- confirm live AI2Work demo URL / 确认体验版地址
- keep
.env.localout of version control / 确保.env.local未提交 - run
npm run lintandnpm run buildbefore release - verify
devdetective-skill/on a clean Python environment / 在干净 Python 环境中完整验证 Skill
More deployment notes:
MIT
See LICENSE.
- Search and recommendation results are for reference only.
- License warnings are not legal advice.
- Please verify repository quality and license terms before production use.
中文补充:
- 搜索与推荐结果仅供参考
- License 风险提示不构成法律建议
- 正式使用前请自行验证目标仓库的质量与授权条款
