deprecation-and-migration

deprecation-and-migration is a skill for Claude Code from 233i/agent-skills. It costs 56 tokens per session (2,246 once invoked), scanned A, original, MIT.

A guide for retiring old software, APIs, or features and moving users to replacements. Deprecation means formally ending support for something; migration means moving its users or callers to another system.

In plain words
What is it for?
Use it when replacing an old system or library, removing a feature, merging duplicate implementations, handling legacy code, or planning how a new system could eventually be retired.
Why use it?
It helps teams remove code that still costs time and maintenance while accounting for hidden dependencies, behavior users rely on, and the effort required to move them safely.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the agent-skills plugin — 20 skills, 7 commands, 3 agents, 1 hook shipped together

Good fit Use it when replacing an old system or library, removing a feature, merging duplicate implementations, handling legacy code, or planning how a new system could eventually be retired.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/233i/agent-skills/deprecation-and-migration
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 233i/agent-skills --skill deprecation-and-migration
Clone the repo
git clone --depth 1 https://github.com/233i/agent-skills

Made for: Claude Code.

Or install agent-skills, the plugin that ships this one along with the rest of its 20 skills, 7 commands, 3 agents, 1 hook.

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 deprecation-and-migration

README.md
[![agentmods](https://agentmods.dev/badge/skills/233i/agent-skills/deprecation-and-migration/github.svg)](https://agentmods.dev/skills/233i/agent-skills/deprecation-and-migration)
Your own site
<a href="https://agentmods.dev/skills/233i/agent-skills/deprecation-and-migration"><img src="https://agentmods.dev/badge/skills/233i/agent-skills/deprecation-and-migration/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 deprecation-and-migration

Your own site · 80×15
<a href="https://agentmods.dev/skills/233i/agent-skills/deprecation-and-migration"><img src="https://agentmods.dev/badge/skills/233i/agent-skills/deprecation-and-migration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,246 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.00056 $0.02246
Opus 5 $0.00028 $0.01123
Sonnet 5 $0.00011 $0.00449
Haiku 4.5 $0.00006 $0.00225

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

Security

Grade A, and why

deprecation-and-migration 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 11d 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/deprecation-and-migration/SKILL.md · 208 lines

How it starts

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

弃用与迁移

概览

代码是一种负债,不是资产。每一行代码都有持续维护成本:要修 bug、要升级依赖、要打安全补丁、还要让新工程师看懂。弃用,是把已经不再值得维护的代码移除出去的纪律;迁移,则是把用户安全地从旧东西带到新东西上的过程。

大多数工程组织都很擅长构建新东西,但很少真正擅长删除旧东西。这个 skill 就是为了解决这个缺口。

何时使用

  • 用新系统、API 或库替换旧系统
  • 下线一个已经不再需要的功能
  • 合并重复实现
  • 移除“没人负责但所有人都依赖”的死而不僵代码
  • 为新系统规划完整生命周期,也就是在设计阶段就考虑弃用
  • 判断是继续维护遗留系统,还是投入迁移

核心原则

代码是负债

每一行代码都有持续成本:需要测试、需要文档、需要安全补丁、需要依赖升级,也会增加附近所有人的心智负担。代码的价值不在“它存在”,而在它提供的功能。如果同样的功能可以用更少的代码、更低的复杂度或更好的抽象提供出来,那么旧代码就应该被移除。

Hyrum's Law 让移除变难

只要用户足够多,系统中每一个可观察行为都会被依赖上,包括 bug、时序怪癖和没写文档的副作用。这就是为什么弃用不能只发公告,还必须做主动迁移。因为用户依赖的往往不只是“功能名义上该做什么”,还包括替代品未必复刻的那些细节。

弃用规划应该从设计时开始

在构建一个新系统时,就该问一句:“如果 3 年后要把它删掉,该怎么删?”
有清晰接口、feature flag 和小暴露面的系统,远比到处泄露实现细节的系统更容易弃用。

做弃用决策前要回答什么

在弃用任何东西前,先回答下面的问题:

1. Does this system still provide unique value?
   → If yes, maintain it. If no, proceed.

2. How many users/consumers depend on it?
   → Quantify the migration scope.

3. Does a replacement exist?
   → If no, build the replacement first. Don't deprecate without an alternative.

4. What's the migration cost for each consumer?
   → If trivially automated, do it. If manual and high-effort, weigh against maintenance cost.

5. What's the ongoing maintenance cost of NOT deprecating?
   → Security risk, engineer time, opportunity cost of complexity.

强制弃用 vs 建议弃用

类型 适用场景 机制
Advisory 迁移是可选的,旧系统仍稳定 警告、文档、提醒,由用户按自己的节奏迁
Compulsory 旧系统存在安全问题、阻碍进展,或维护成本已不可接受 明确截止时间,到期移除,并提供迁移工具

默认优先 Advisory。 只有当风险或维护成本足以 justify 强制迁移时,才用 Compulsory。并且强制弃用必须配套迁移工具、迁移文档和支持,不能只宣布一个最后期限。

迁移流程

步骤 1:先把替代品建出来

没有可用替代品,就不要宣布弃用。替代品至少要满足:

  • 覆盖旧系统的所有关键用例
  • 带有文档和迁移指南
  • 已在生产中被验证,不是理论上“更好”

步骤 2:公告并文档化

## Deprecation Notice: OldService

**Status:** Deprecated as of 2025-03-01
**Replacement:** NewService (see migration guide below)
**Removal date:** Advisory — no hard deadline yet
**Reason:** OldService requires manual scaling and lacks observability.
            NewService handles both automatically.

### Migration Guide
1. Replace `import { client } from 'old-service'` with `import { client } from 'new-service'`
2. Update configuration (see examples below)
3. Run the migration verification script: `npx migrate-check`

Read the full file on GitHub · 208 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. 11d ago First seen · 208 lines · 56 tokens per session scan A b6c2337b5b39

Subscribe to this mod's changes

deprecation-and-migration is a skill published in the GitHub repository 233i/agent-skills (6 stars, last pushed 5mo ago), licensed MIT. It adds 56 tokens to every session and 2,246 once invoked, about $0.0003 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

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens

next-cache-components-optimizer

Drive a Next.js route to instant navigation by setting up an agentic loop, under Cache Components / PPR, on initial load (hard navigation) and client-side navigation (soft navigation). Encode the goal as a failing @next/playwright instant() e2e and work it to green, one verified route at a time; the shipped test then…

vercel/next.js · 170 tokens

next-partial-prefetching-adoption

Turn on Partial Prefetching in a Next.js app and work through the insights it surfaces. Use when the user wants to enable or adopt Partial Prefetching, flip the partialPrefetching flag, opt routes in with export const prefetch = 'partial', audit Link prefetch={true} behavior, preserve existing prefetched UI with…

vercel/next.js · 103 tokens