type: rule
status: active
timestamp: 2026-06-23
tags: [rule, dependencies, npm, community, build-vs-buy, default-yes]

Community packages first — prefer external dependencies over hand-rolling

Prefer well-maintained community packages over hand-rolling

Community packages first

Rule

When a problem has an established community solution (a maintained npm package, a known SDK, a documented framework), use it. Don’t reinvent.

Why

User explicitly stated 2026-06-23: “using external dependency is a priority because I don’t want to manage everything. I want maximum things to be imported by using community libraries and community packages.”

The trade-off math:

When to USE a dep (default YES)

When NOT to use a dep (case-by-case)

Quick sanity check before adding a dep

- License compatible? (MIT/Apache/ISC/BSD/0BSD)
- Last commit < 12 months ago?
- Either >100 GitHub stars OR from a known-good org?
- Bundle size acceptable for the use case?
- Maintained TypeScript types (or strictly-typed source)?

If 5/5 yes → install. If 3-4 → grill once, then install. If <3 → hand-roll.

Counter-rule precedence

This rule overrides any “minimal LOC” reflex. The grill-on-loc-removal rule still applies for DELETING code, but it doesn’t apply to NOT-WRITING code in the first place. Install the dep.

The match-surrounding-style rule still applies for HOW the dep is invoked (idioms match the rest of the codebase).

Cross-refs


Edit on GitHub · Back to index