reuse-before-create

reuse-before-create is a skill for Claude Code from Ozzeron/prompt-pack. It costs 89 tokens per session (2,853 once invoked), scanned A, original, MIT.

A rule for checking whether an existing component, function, type, setting, or dependency can be reused before creating a new one.

In plain words
What is it for?
Use it before adding code or configuration to search for reusable pieces, then reuse, extend, compose, or extract them before creating something new.
Why use it?
It reduces duplication and keeps future changes from needing updates in several similar places.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument; built for openclaw.

Part of the minimal plugin — 4 skills shipped together , and of nextjs, backend, supabase, fullstack, all-skills

Good fit Use it before adding code or configuration to search for reusable pieces, then reuse, extend, compose, or extract them before creating something new.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ozzeron/prompt-pack/reuse-before-create
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.

Any agent
npx skills add Ozzeron/prompt-pack --skill reuse-before-create
Clone the repo
git clone --depth 1 https://github.com/Ozzeron/prompt-pack

Made for: Claude Code.

Or install minimal, the plugin that ships this one along with the rest of its 4 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for reuse-before-create

README.md
[![agentmods](https://agentmods.dev/badge/skills/ozzeron/prompt-pack/reuse-before-create/github.svg)](https://agentmods.dev/skills/ozzeron/prompt-pack/reuse-before-create)
Your own site
<a href="https://agentmods.dev/skills/ozzeron/prompt-pack/reuse-before-create"><img src="https://agentmods.dev/badge/skills/ozzeron/prompt-pack/reuse-before-create/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for reuse-before-create

Your own site · 80×15
<a href="https://agentmods.dev/skills/ozzeron/prompt-pack/reuse-before-create"><img src="https://agentmods.dev/badge/skills/ozzeron/prompt-pack/reuse-before-create.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,853 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00089 $0.02853
Opus 5 $0.00044 $0.01426
Sonnet 5 $0.00018 $0.00571
Haiku 4.5 $0.00009 $0.00285

Measured 3d ago against content hash 5f723a98ac4a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

reuse-before-create 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.

prompts/meta/reuse-before-create/SKILL.md · 229 lines

How it starts

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

Reuse Before Create

The single most consistent way AI coding agents degrade a codebase is by creating new artifacts when existing ones would do. New components instead of props. New utilities instead of imports. New types instead of references. The codebase doubles in volume, quality halves, and every requirement change now means N edits instead of one.

This skill is the central rule for that. Every coding skill in this pack inherits it. It is not aspirational; it is a precondition for any code-creating action.

When to use

Always, whenever you are about to write a new component, function, hook, util, type, constant, schema, configuration, or dependency. This is a precondition step, not an optional review.

The rule

Before writing anything new, search for what already exists. Reuse first; create last.

The order of preference is strict and non-negotiable:

  1. Reuse as-is — existing artifact fits, import and use
  2. Extend — add a prop, option, generic, or branch to existing artifact
  3. Compose — combine existing artifacts into a new shape without rewriting them
  4. Extract — pull a shared core out of two near-duplicates; both use the new core
  5. Create new — only when none of the above apply

Each step further down costs more — both in code volume and in long-term maintenance. Skipping straight to "create new" without proving the prior steps don't apply is the default failure mode this skill prevents.

Justification is not optional

When you do create something new, a one-line justification is mandatory, not a nice-to-have. It belongs in the commit message, the PR description, the handoff, or as an inline comment near the new artifact. Format:

"Created formatDateTz: no existing util handles ISO date with timezone offset; the project's formatDate strips the zone."

This rule applies to every kind of new artifact: component, hook, util, type, constant, schema, dependency, file, folder.

If you can't write the justification in one sentence, you haven't searched hard enough. Go back to step 1.

Read the full file on GitHub · 229 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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 Changed · +4 lines · +64 tokens per session 5f723a98ac4a
  2. 9d ago First seen · 225 lines · 25 tokens per session scan A 31f2f2147f39

Subscribe to this mod's changes

reuse-before-create is a skill published in the GitHub repository Ozzeron/prompt-pack (8 stars, last pushed 4d ago), licensed MIT. It adds 89 tokens to every session and 2,853 once invoked, about $0.0004 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.