Reuse Before Build — AI skill for Claude Code
AI agent skill: search for existing open-source implementations first, then contribute upstream instead of building a new one from scratch.
How to install Reuse Before Build
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open 1-dcjiang/reuse-before-build and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Reuse Before Build does
AI agent skill: search for existing open-source implementations first, then contribute upstream instead of building a new one from scratch. Works with Claude, ChatGPT, Grok, DeepSeek and any prompt-driven agent.
Alternatives in AI
- Repomix — 📦 Repomix is a powerful tool that packs your entire repository into a single, AI-friendly file 22.7k ★
- Opencodex — Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama… 12.3k ★
- EchoBird — One-click install + model switch:Claude Code,Codex CLI (OpenAI), Grok Build (xAI), DeepSeek Harness, Kimi Code 3.1k ★
README
reuse-before-build · 先复用,再新建
一个面向 AI 编程助手的 Skill:**在写新程序之前,先去找已经存在的公开实现,并优先加入那个仓库、成为公共贡献者,而不是从零再造一个。**
A skill for AI coding assistants: **search for existing open-source implementations first, and contribute upstream instead of building a new one from scratch.**
适用于 Claude(Skills / Claude Code)、ChatGPT(Custom Instructions / GPTs / Projects)、Grok、DeepSeek、通义、Kimi、豆包,以及任何能吃 system prompt 的 Agent。
它解决什么问题
AI 现在最常见的失败模式不是"写不出代码",而是**在别人已经做过的地方,从零写了一个更差的版本**:
- 一个能用
ffmpeg+ 现成库解决的剪辑需求,被写成 1400 行自制框架; - 一个 Obsidian 插件,市场上已经有 3 个同类,作者还活着,最后变成第 4 个没人维护的;
- 上游 issue 里已经有人提过同一需求、维护者回了 "PRs welcome",却没人去接。
这个 Skill 把"先检索、再评估、再贡献、最后才新建"固化成可执行流程,并**用门禁挡住"直接开写"这个默认行为**。
核心规则(五条)
- 默认假设"已经有人做过",直到检索证明没有。
- 默认目标是加入已有公开仓库,而不是新建仓库。
- 先证明不可复用,才允许新建,理由必须写清(许可 / 方向 / 维护状态 / 需求差异)。
- 贡献必须真的有用——不为"成为作者"刷低价值 PR。
- 门禁先于代码:给出候选清单与第一个可执行贡献动作之前,不得输出完整新项目脚手架。
判断路径
检索(GitHub / 包生态 / issue 考古)
↓
六维打分:活跃度 · 维护者响应 · 许可 · 贡献友好度 · 需求匹配 · 工程质量
↓
Join 提 PR 进上游 → Extend 做官方插件 → Fork 改完回提 → Build 新建(须写明理由)
目录
SKILL.md 主流程、两条档位(快速档 / 完整档)、硬约束
references/discovery-playbook.md 三轮检索:GitHub 限定符、gh 命令、插件市场、issue 考古
references/repo-triage.md 六维打分细则 + 许可证兼容速查 + 红旗清单
references/contribution-protocol.md issue → PR 全流程、PR 模板、降级路径、反模式
references/worked-examples.md Join / Extend / Fork / Build 四种结论的交付形态
references/host-adapters.md 各平台落位 + 中英文可粘贴精简提示
scripts/repo_scan.py 一键粗筛:gh search 批量跑、去重、标出无许可与停滞仓库
安装
**Claude(支持 Skills 的环境)**:把整个目录放进 Skills 目录即可,`SKILL.md` 的 frontmatter 会被自动读取。
**Claude Code / Cursor / Codex 等编码代理**:把 `SKILL.md` 的核心规则写进仓库根的 `AGENTS.md` / `CLAUDE.md`,或放进 `.claude/skills/reuse-before-build/`。
**ChatGPT / Grok / DeepSeek / 豆包等只能吃提示词的宿主**:打开 `references/host-adapters.md`,复制其中的「精简版(中文)」或「English condensed prompt」到自定义指令;完整版可作为知识文件上传。
快速开始
有 GitHub CLI 时,先出一张候选表再动脑:
gh auth status
python scripts/repo_scan.py "video highlight clip
Related Skills
Simplicity Review
Enforces Law 4 (Verify Before Reporting) of the 7 Laws of AI Agent Discipline. Reviews the current diff for ov
Scavengers Assemble
🦾 Earth's Mightiest Multi-Agent AI Coding Harness — Tony Stark orchestrates Claude, Gemini, GPT-4, Grok & Oll
OpenContext
A personal context store for AI agents and assistants—reuse your existing coding agent CLI (Codex/Claude/OpenC
Stack Aware Development
Agent Skill that makes AI coding agents detect a repository's real stack and conventions before changing code,
Pear Skills
Battle-tested Agent Skills that give AI coding agents (ZCode, Claude Code, Cursor, etc.) plug-and-play domain
AgentNote Obsidian
A local-first Obsidian plugin that shares live notes and files with AI agents, then tracks knowledge reuse pri
Related Agents
OpenSourceScout
Finds existing open source the contest deliverable can reuse instead of building it from scratch — whole proje
Issue Scout
Use this agent when searching for open-source issues to contribute to during the discover phase. This agent ru
Opencode Worker
Forwards one scoped task to a model running in OpenCode (Grok, Kimi, GLM, Qwen, DeepSeek, …) through opencode