dont-reinvent

Searches and vets existing libraries, dependencies, and open-source repos before writing new implementation code.

Updated Sep 1, 2026
One-click install
npx skills add https://github.com/krishsharma-source/skills --skill dont-reinvent-krishsharma-source
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dont-reinvent
Source: https://github.com/krishsharma-source/skills/tree/main/dont-reinvent
Command: npx skills add https://github.com/krishsharma-source/skills --skill dont-reinvent-krishsharma-source

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? AI agents can build almost anything on request, so teams skip the question "has someone already solved this?" and pay for it in tokens, iteration rounds, and unmaintained hand-rolled code. This Skill reinstates that check and answers it honestly, verifying candidates against source rather than recommending from memory. ## Core Features & Use Cases - Prior-art ladder: Walks rungs from stdlib and already-installed dependencies up through mature libraries, frameworks, mined repo patterns, and building from scratch, ordered by integration cost. - Search and vet tooling: Uses search.py (GitHub repo/code search via gh), fetch_repo.py (safe shallow clones into a marked cache), and vet.py (license detection plus OSV vulnerability checks with honest CONFIRMED/INDICATIVE labeling). - Divert test and red team: Challenges every candidate on coverage, maintenance, and reversibility, then dispatches an independent adversarial review before recommending adoption. - Use Case: Before adding rate limiting to a FastAPI service, the Skill checks installed dependencies and deployed infrastructure first, searches GitHub with multiple query phrasings, vets survivors for license and CVEs, and presents a gated recommendation for approval. ## Quick Start Before we build this feature, check whether a maintained library, an existing dependency, or a well-tested open-source pattern already solves it.

Frequently Asked Questions about dont-reinvent

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check if a library already exists before building a feature?

Search GitHub with 2-3 plain-noun query variations using gh search repos, then vet survivors for license, maintenance recency, and coverage against your requirement. Narrow queries systematically under-shoot, so start broad and drop star floors for niche fields.

How do I find production code patterns inside other projects on GitHub?

Use gh search code with identifiers you expect in the source, like class TokenBucket or async def acquire, rather than prose. Read the returned snippets to reject tutorial and benchmark false positives before cloning anything.

Should I adopt a dependency or copy a pattern from an open-source repo?

Adopt when the problem is genuinely hard, like cryptography, timezone math, or protocol parsing, and someone solved it correctly. Mine the pattern when the core mechanism is under roughly 200 lines you can read in full and owning it avoids a constraining dependency.

Can I rely on a package that is installed but only as a transitive dependency?

No. A transitive dependency is another package's private choice and can vanish in a routine upgrade. If you want it, declare it explicitly in your own manifest and vet it with the same scrutiny as any new dependency.

Why does an OSV vulnerability check on a version range give misleading results?

OSV answers questions about one concrete version and fails open on ranges, returning the package's entire advisory history. Only exact pinned versions produce CONFIRMED results; ranges are reported as INDICATIVE with the advisory list truncated.

When should I not search for prior art and just write the code?

Skip the search for bug fixes, refactors, renames, and additions under roughly 30 lines that add no dependency. Also exit early when the hard part is org-specific policy like your own weights or business rules, which no external project can supply.