agentleFS
5uck1ess5uck1ess/devkit/skills/dont-reinvent/SKILL.md

dont-reinvent

Skill4 starsChanged 4 months agoMITView on GitHub

Don't reinvent the wheel — use existing libraries, tools, and stdlib before building custom solutions. Every custom solution is maintenance burden.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before writing any non-trivial utility, helper, or tool — check if it already exists.

    line 8
  2. Distinctive:

    Only build custom when none of the above genuinely fit.

    line 18
  3. Distinctive:

    Every custom solution is code you maintain forever:

    line 22
  4. Distinctive:

    Before adopting a dependency, check:

    line 49

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Don't Reinvent the Wheel

Before writing any non-trivial utility, helper, or tool — check if it already exists.

The Search Order

  1. Language stdlib / builtins — path.join(), os.path, filepath.Join() exist. Don't write your own.
  2. Framework built-ins — most frameworks have solutions for routing, validation, auth, caching. Use them.
  3. Established packages — if there's a well-maintained package with meaningful adoption and recent commits, prefer it over custom code.
  4. Existing tools / plugins / MCP servers — before building a new CLI wrapper or integration, check if one exists. Run a quick search.
  5. Internal codebase — search the project for existing utilities before creating new ones. Someone may have already solved this.

Only build custom when none of the above genuinely fit.

Why This Matters

Every custom solution is code you maintain forever:

  • Bug fixes are your problem
  • Edge cases are your problem
  • Updates when dependencies change are your problem
  • Documentation is your problem

A well-maintained library handles all of this for you. The 20 minutes you "save" by writing it yourself costs hours in future maintenance.

When Custom Is Justified

  • The existing solutions don't fit and adapting them is harder than building
  • The existing solutions are unmaintained (no commits in 12+ months, unresolved security issues)
  • The scope is truly trivial (a 3-line helper doesn't need a dependency)
  • Performance requirements rule out general-purpose solutions (measure first, don't assume)
  • Security requirements demand full control over the implementation

Red Flags You're Reinventing

  • Writing a date parser, URL parser, retry wrapper, or logger from scratch
  • Building a custom HTTP client wrapper around fetch/axios
  • Writing string manipulation utilities that exist in lodash/underscore/stdlib
  • Creating a custom config file format instead of using JSON/YAML/TOML
  • Building a task queue when BullMQ/Celery/existing solutions exist
  • Writing a custom test framework instead of using the ecosystem standard

Evaluating Existing Solutions

Before adopting a dependency, check:

  • Last commit date — no commits in 12+ months is a warning sign
  • Open issues — many unresolved issues with no maintainer response suggests abandonment
  • Downloads / stars — social proof that others rely on it
  • License compatibility — GPL in an MIT project is a problem
  • Bundle size — don't add a 500KB dependency for one function (use the function directly)

The Maintenance Test

Before writing custom code, ask: "Am I willing to maintain this for the life of the project?" If the answer is no, find an existing solution. If no existing solution fits, keep the custom code as simple as possible — the less code you write, the less you maintain.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.