buy-vs-build
CLAUDE.md3 starsChanged 5 months agoMITView on GitHub
Before writing code, decide whether the work should be bought, reused, or built. First classify the work: is it core (the differentiation users choose you for) or context (needed but unrewarded), and is the capability a commodity (standardized and stable) or novel (still changing or specific to you)? Reuse context and commodity work as far down the ladder as it allows; build in-house only where core meets novel. Scale scrutiny to reversibility: two-way-door choices decide fast, one-way-door commitments (deep platform…
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/buy-vs-build.mdcCursor rule
- buy-vs-build-adrSkill
- buy-vs-build-auditSkill
- buy-vs-build-decisionSkill
- buy-vs-build-dependencySkill
- buy-vs-build-gainSkill
- buy-vs-build-reviewSkill
- buy-vs-build-right-toolSkill
- buy-vs-buildSkill
The file
We split this CLAUDE.md into the rules it gives an agent
11 rules. About 0 are common, 10 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 3
Before writing code, decide whether the work should be bought, reused, or built.
- Distinctive: line 9
Do nothing: skip speculative requirements and scaffolding.
- Distinctive: line 10
Use built-ins: prefer language built-ins and the standard library.
- Very specific: line 11
Use the native platform: browser controls, OS/framework/database/cloud primitives, and protocol features.
- Distinctive: line 12
Use already-installed dependencies: prefer existing project dependencies before adding new ones.
- Distinctive: line 13
Use open source: add a mature library only when it lowers total cost of ownership.
- Distinctive: line 14
Use commercial: buy reliability, compliance, operations, support, or time when cheaper than owning it.
- Distinctive: line 17
When several options satisfy the chosen rung, pick the one whose capabilities match the requirement's real shape — directionality, volume, …
- Distinctive: line 19
Before adopting an open-source or commercial dependency, research it — maintenance and health (active maintainers, release cadence, …
- Distinctive: line 25
Use these rung labels: do-nothing, built-in, native-platform, installed-dependency, open-source, commercial, in-house.
- Distinctive: line 27
Never outsource core differentiation, trust-boundary logic, security-critical decisions, or tiny code that is clearer than a dependency.
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Buy-vs-build mode
Before writing code, decide whether the work should be bought, reused, or built.
First classify the work: is it core (the differentiation users choose you for) or context (needed but unrewarded), and is the capability a commodity (standardized and stable) or novel (still changing or specific to you)? Reuse context and commodity work as far down the ladder as it allows; build in-house only where core meets novel. Scale scrutiny to reversibility: two-way-door choices decide fast, one-way-door commitments (deep platform or data lock-in) get rigor and an exit plan.
Then stop at the first rung that satisfies the requirement:
- Do nothing: skip speculative requirements and scaffolding.
- Use built-ins: prefer language built-ins and the standard library.
- Use the native platform: browser controls, OS/framework/database/cloud primitives, and protocol features.
- Use already-installed dependencies: prefer existing project dependencies before adding new ones.
- Use open source: add a mature library only when it lowers total cost of ownership.
- Use commercial: buy reliability, compliance, operations, support, or time when cheaper than owning it.
- Build in-house only when reuse fails the real constraints, or the work is core differentiation.
When several options satisfy the chosen rung, pick the one whose capabilities match the requirement's real shape — directionality, volume, latency, consistency, and failure mode — not the most powerful, popular, or familiar option.
Before adopting an open-source or commercial dependency, research it — maintenance and health (active maintainers, release cadence, adoption, bus factor), security and supply chain (known vulnerabilities, install scripts, provenance), license, and transitive footprint — and prefer the lowest-ownership option that clears those checks.
For non-obvious decisions, compare fit, total cost of ownership, security, licensing, maintenance, integration, maturity, reversibility, and exit risk. State the chosen rung briefly as Decision: use <rung>: <option>. Tradeoff: <why it wins>. Rejected: <next-best option> because <constraint>. Revisit if <specific trigger>.
After implementing, verify the choice actually paid off — fewer lines, fewer failure modes, less to operate — not just that the right option was named; a sound choice can still be integrated badly. The decision note is the artifact that makes that tradeoff reviewable, so keep it accurate.
Use these rung labels: do-nothing, built-in, native-platform, installed-dependency, open-source, commercial, in-house.
Never outsource core differentiation, trust-boundary logic, security-critical decisions, or tiny code that is clearer than a dependency.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

