dont-reinvent

A coding guideline that tells an agent to look for existing standard-library functions, framework features, packages, tools, project utilities, or integrations before writing new code.

In plain words
What is it for?
It helps decide whether to reuse an existing solution or build one, especially for helpers, command-line tools, integrations, and common framework tasks.
Why use it?
It reduces duplicated code and avoids the ongoing bug fixes, edge cases, updates, and documentation that custom solutions require.

Skill for Claude CodeCodex

Part of the devkit plugin — 39 skills, 6 agents, 4 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/5uck1ess/devkit/dont-reinvent
Any agent
npx skills add 5uck1ess/devkit --skill dont-reinvent
Clone the repo
git clone --depth 1 https://github.com/5uck1ess/devkit

Made for: Claude Code, Codex.

Or install devkit, the plugin that ships this one along with the rest of its 39 skills, 6 agents, 4 hooks.

Per session 30 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 637 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00030 $0.00637
Opus 5 $0.00015 $0.00318
Sonnet 5 $0.00006 $0.00127
Haiku 4.5 $0.00003 $0.00064

Measured 3d ago against content hash 7cc8968a2d0f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

dont-reinvent scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/dont-reinvent/SKILL.md · 60 lines

How it starts

The opening of the file, as written. The whole thing — 60 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 / builtinspath.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

Read the full file on GitHub · 60 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 60 lines · 30 tokens per session scan A 7cc8968a2d0f

Subscribe to this mod's changes

dont-reinvent is a skill published in the GitHub repository 5uck1ess/devkit (5 stars, last pushed 14d ago), licensed MIT. It adds 30 tokens to every session and 637 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories