deprecate-and-remove

deprecate-and-remove is a skill for Claude Code, Codex from tmj-90/gaffer. It costs 80 tokens per session (1,282 once invoked), scanned A, original, Apache-2.0.

A method for retiring an old feature, endpoint, setting, module, database column, or command without breaking its users or dependent systems. It first checks who still uses it, then deprecates or removes it in the right order.

In plain words
What is it for?
Use it to remove legacy APIs, feature flags, configuration options, database columns, command-line commands, modules, and other obsolete code.
Why use it?
It prevents apparently unused code from breaking another application, production setting, stored data, or operator workflow. It provides a warning period when outside users or systems still depend on the old interface.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to remove legacy APIs, feature flags, configuration options, database columns, command-line commands, modules, and other obsolete code.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tmj-90/gaffer/deprecate-and-remove
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 tmj-90/gaffer --skill deprecate-and-remove
Clone the repo
git clone --depth 1 https://github.com/tmj-90/gaffer

Made for: Claude Code, Codex.

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 deprecate-and-remove

README.md
[![agentmods](https://agentmods.dev/badge/skills/tmj-90/gaffer/deprecate-and-remove/github.svg)](https://agentmods.dev/skills/tmj-90/gaffer/deprecate-and-remove)
Your own site
<a href="https://agentmods.dev/skills/tmj-90/gaffer/deprecate-and-remove"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/deprecate-and-remove/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 deprecate-and-remove

Your own site · 80×15
<a href="https://agentmods.dev/skills/tmj-90/gaffer/deprecate-and-remove"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/deprecate-and-remove.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 80 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,282 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.
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.00080 $0.01282
Opus 5.5 $0.00032 $0.00513
Sonnet 5.5 $0.00016 $0.00256
Haiku 4.5 $0.00008 $0.00128

Measured 16d ago against content hash 82c10551c223, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

deprecate-and-remove 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 16d 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.

runner/skills/deprecate-and-remove/SKILL.md · 88 lines

How it starts

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

Deprecate, then remove

Removing code changes a contract somebody may still hold. Find every dependent, warn before you cut, remove in the right order, and prove nothing still points at the thing you deleted. Dead code that is really dead is the best diff there is; dead code that is secretly load-bearing is an incident.

Steps

  1. Prove it is dead — and write the proof down. Search for every reference, including the non-obvious ones:
    • the symbol and its string form (grep -rn): reflection, dynamic imports, DI registration, templates, routes tables, serialised names, cron/job registries;
    • tests, fixtures, docs, scripts, CI workflows, dashboards and infra config;
    • for a flag or option: every read, and every place that sets it;
    • for a column or table: every query, ORM model, migration and report;
    • other repos: find_dependents and search_lore for declared consumers, and grep any read-only context repos listed in your prompt. "No callers" is a claim; the commands you ran and their empty output are the evidence.
  2. Decide: deprecate first, or remove now. Anything with consumers you cannot see — another repo, a public or partner API, an operator-set option, a persisted format — gets a deprecation period. Purely internal code with an empty step-1 search is removed now. Semantic versioning puts a deprecation in a minor release and the removal in the next major. If you cannot tell which case applies, request_decision.
  3. When deprecating, make it loud and dated. Mark it deprecated where tooling shows it (JSDoc @deprecated, warnings.warn(DeprecationWarning), [Obsolete], #[deprecated]), log a warning on use (once, not per call), document the replacement, and set the removal date. For HTTP APIs send Deprecation (RFC 9745) and Sunset (RFC 8594) headers with a Link to the migration note; the sunset date must not precede the deprecation date.
  4. Remove in dependency order. Callers before callees; public surface before implementation; code before schema. Data follows expand/contract (the add-db-migration skill): stop writing, then stop reading, then drop — in separate deliveries when the repo deploys them separately.
  5. Delete completely. Code, tests, fixtures, types, docs, config keys, flag declarations, and now-unused helpers that only the dead code used. A dependency that becomes unused is listed in your evidence for a human to remove: package-manager commands cannot run safely in a delivery worktree (the dependency-upgrade skill). A half-removed feature leaves a reader guessing which half is real.
  6. Fail loudly for stragglers. An old API caller gets an explicit error with a pointer (HTTP 410 Gone with a link, a CLI message naming the replacement), not a silent 404 or a no-op stub that swallows the call.
  7. Verify nothing else moved. Run the full suite, build and lint once: removals break through import side effects, registration order, and shared helpers. Re-run the step-1 search to show zero remaining references.
  8. Record it. A CHANGELOG "Removed"/"Deprecated" entry in the repo's format (the changelog-generator skill), and evidence via the record-evidence skill: the searches and their empty results, what was deprecated-not-removed and its removal date. On a resume that call is refused: do not retry; put this, the AC → test map and the smallest-change note in your final message.

Read the full file on GitHub · 88 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. 16d ago Changed · +27 lines 82c10551c223
  2. 19d ago First seen · 61 lines · 80 tokens per session scan A bc5d4ca38af8

Subscribe to this mod's changes

deprecate-and-remove is a skill published in the GitHub repository tmj-90/gaffer (2 stars, last pushed 17d ago), licensed Apache-2.0. It adds 80 tokens to every session and 1,282 once invoked, about $0.0003 per session on Opus 5.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-28.

Related

Other skills, from other repositories

plan-to-tasks

Transform a plancreation planv{N}.md into a structured tasks.yaml + per-WP workpackages/.yaml using parallel Sonnet sub-agents. Use after plan-creation finishes when you need execution-friendly task structure.

QBall-Inc/the-bulwark · 50 tokens

pact-init

Initialize PACT governance files in the current project.

jonathanmr22/pact · 9 tokens

daily-domain-migration-selector

Use when choosing daily Helpdesk service-to-domain migration candidates, table ownership moves, write seam consolidation, domain README gaps, or A-plus architecture burn-down work before implementation.

anotherben/claude-harness · 40 tokens

orchestrating-parallel-work

Orchestrates parallel execution of AI agents with dependency analysis, batch scheduling, and the playbook for landing many branches at once. Use when coordinating multiple concurrent tasks, optimizing task ordering, sequencing batches of code changes into waves, landing parallel branches through review and merge, or…

dork-labs/dorkos · 73 tokens

anthropic-validator

Validates Claude Code assets (skills, hooks, agents, commands, MCP servers, plugins) against official Anthropic standards. Fetches latest docs dynamically and produces structured validation reports.

QBall-Inc/the-bulwark · 40 tokens

create-subagent

Generates single-purpose Claude Code sub-agents for use via the Task tool. Use when creating dedicated sub-agents, scaffolding agent definitions, or generating agents with diagnostics and permissions setup.

QBall-Inc/the-bulwark · 42 tokens