reuse-or-replace

reuse-or-replace is a skill for Claude Code, Codex from melodic-software/claude-code-plugins. It costs 183 tokens per session (2,284 once invoked), scanned A, original, MIT.

A consistency guide for reusing an established code, document, naming, or process pattern instead of creating a parallel one.

In plain words
What is it for?
Use it when adding a new structure, workflow, format, or convention to an existing project.
Why use it?
Multiple ways to do the same thing make a project harder to understand and maintain. It requires a clear reuse or replacement decision.

Skill for Claude CodeCodex

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the discipline plugin — 16 skills 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/melodic-software/claude-code-plugins/reuse-or-replace
Any agent
npx skills add melodic-software/claude-code-plugins --skill reuse-or-replace
Clone the repo
git clone --depth 1 https://github.com/melodic-software/claude-code-plugins

Made for: Claude Code, Codex.

Or install discipline, the plugin that ships this one along with the rest of its 16 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-or-replace

README.md
[![agentmods](https://agentmods.dev/badge/skills/melodic-software/claude-code-plugins/reuse-or-replace.svg)](https://agentmods.dev/skills/melodic-software/claude-code-plugins/reuse-or-replace)
Your own site
<a href="https://agentmods.dev/skills/melodic-software/claude-code-plugins/reuse-or-replace"><img src="https://agentmods.dev/badge/skills/melodic-software/claude-code-plugins/reuse-or-replace.svg" alt="Measured on agentmods" height="20"></a>
Per session 183 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,284 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.00183 $0.02284
Opus 5 $0.00092 $0.01142
Sonnet 5 $0.00037 $0.00457
Haiku 4.5 $0.00018 $0.00228

Measured yesterday against content hash f9c737375fc1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

reuse-or-replace 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 yesterday.

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.

plugins/discipline/skills/reuse-or-replace/SKILL.md · 169 lines

How it starts

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

Reuse or replace

A drift corrector for anti-fragmentation discipline: one way to do a thing, not two. When an established way already exists, new work reuses it or openly replaces it. It does not add a silent second way beside it. The method, re-anchor, audit the work in flight, correct forward, report, and the tone that firing this is not an accusation, lives in ${CLAUDE_PLUGIN_ROOT}/context/re-anchor-audit-correct.md. Read it; this file adds only what is specific to reusing or replacing an established way rather than splitting into a parallel one.

The discipline this re-anchors

When a codebase, structure, or process already has an established way of doing something, new work must not silently stand up a second, parallel way beside it. Two coexisting ways of doing the same thing is fragmentation It splits the reader's model, doubles the surface that drifts, and taxes every future change with a "which one?" decision. Resolve the source of truth per the method doc's ladder: if the consuming project states a consistency / one-way rule in its own CLAUDE.md / .claude/rules/, re-anchor THAT. Otherwise re-anchor this portable baseline.

Facing an established way, new work has exactly two honest options. The two this skill is named for:

  • Reuse it. Follow the established way, so the codebase keeps one way.
  • Replace it. Openly argue the established way should change, then, if it should. migrate the old uses to the new way and record the decision. Replacement converges the codebase on the new single way.

The sin is neither of those: it is leaving the established way in place and quietly adding a divergent way alongside it, so both now exist. That silent second way is what this skill exists to catch.

Misconstrual guard. This is NOT "always conform" (mandatory)

Reusing is not blind conformity, and this skill never demands straight obedience to the incumbent way. Replacing the established way is a first-class, encouraged move, not a deviation to be suppressed. The established way should be replaced when:

Read the full file on GitHub · 169 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. yesterday First seen · 169 lines · 183 tokens per session scan A f9c737375fc1

Subscribe to this mod's changes

reuse-or-replace is a skill published in the GitHub repository melodic-software/claude-code-plugins (15 stars, last pushed today), licensed MIT. It adds 183 tokens to every session and 2,284 once invoked, about $0.0009 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-09-03.

Related

Other skills, from other repositories

parallel-orchestrator

Manage parallel Claude Code workstreams using git worktrees. Use when: splitting large tasks across multiple workers, coordinating parallel development, monitoring worker progress, integrating completed work, analyzing work item documents (code reviews, issue lists). Triggers: parallel, orchestrator, worktrees…

jimmc414/claude-code-plugin-marketplace · 78 tokens

parallel-worker

Execute focused implementation tasks in a parallel workflow. Use when: working on assigned files in a worktree, making checkpoint commits, signaling dependencies or blockers, completing orchestrator-assigned tasks. Triggers: worker, checkpoint, worktree, assigned scope, commit prefix, parallel task.

jimmc414/claude-code-plugin-marketplace · 59 tokens

propagate-then-search

For constraint problems: eliminate impossibilities before guessing, reduce search space through inference, fail fast on contradictions.

jimmc414/claude-code-plugin-marketplace · 27 tokens

stack-based-backtrack

For search with undo: explicit decision stack, backtracking when paths fail, depth-first exploration with state restoration.

jimmc414/claude-code-plugin-marketplace · 27 tokens

build-priority-queue

For ordered processing: A search, Dijkstra, event simulation, task scheduling. Efficient min/max extraction with heap-based queue.

jimmc414/claude-code-plugin-marketplace · 32 tokens

catch-expected-errors

For iteration with errors: catch exceptions during exploration, skip invalid cases, continue to next attempt.

jimmc414/claude-code-plugin-marketplace · 24 tokens