deprecation-and-migration

deprecation-and-migration is a skill for Claude Code from vinvcn/addyosmani-agent-skills-zh. It costs 50 tokens per session (2,150 once invoked), scanned A, original, MIT.

A guide for retiring old code, systems, or interfaces and moving users to replacements. Deprecation means marking something as no longer preferred; migration means switching its users safely.

In plain words
What is it for?
Replacing old APIs or libraries, removing unused features, merging duplicate implementations, and planning the transition from a legacy system.
Why use it?
It helps teams decide when old code is no longer worth maintaining and plan the work needed to remove it without breaking dependent users.

Skill for Claude Code

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

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

Good fit Replacing old APIs or libraries, removing unused features, merging duplicate implementations, and planning the transition from a legacy system.

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

Made for: Claude Code.

Or install agent-skills, the plugin that ships this one along with the rest of its 23 skills, 8 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/vinvcn/addyosmani-agent-skills-zh/deprecation-and-migration/github.svg)](https://agentmods.dev/skills/vinvcn/addyosmani-agent-skills-zh/deprecation-and-migration)
Your own site
<a href="https://agentmods.dev/skills/vinvcn/addyosmani-agent-skills-zh/deprecation-and-migration"><img src="https://agentmods.dev/badge/skills/vinvcn/addyosmani-agent-skills-zh/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/vinvcn/addyosmani-agent-skills-zh/deprecation-and-migration"><img src="https://agentmods.dev/badge/skills/vinvcn/addyosmani-agent-skills-zh/deprecation-and-migration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 50 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,150 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.00050 $0.02150
Opus 5 $0.00025 $0.01075
Sonnet 5 $0.00010 $0.00430
Haiku 4.5 $0.00005 $0.00215

Measured 12d ago against content hash 1a186dba52e9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, 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 12d 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 · 207 lines

How it starts

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

弃用和迁移

概览

代码是一种负债,而不是资产。每一行代码都有持续维护成本:需要修复 bug、更新依赖、应用安全补丁,并帮助新工程师理解它。弃用是一套移除不再值得维护的代码的纪律,迁移则是将用户安全地从旧系统转移到新系统的过程。

大多数工程组织都擅长构建东西,但很少擅长移除它们。这个 skill 就是为了弥补这个缺口。

何时使用

  • 用新系统、API 或库替换旧系统、API 或库
  • 下线不再需要的功能
  • 合并重复实现
  • 移除无人拥有但人人依赖的死代码
  • 规划新系统的生命周期(弃用规划从设计阶段就开始)
  • 判断是继续维护遗留系统,还是投入迁移

核心原则

代码是一种负债

每一行代码都有持续成本:它需要测试、文档、安全补丁、依赖更新,也会给附近工作的任何人带来理解成本。代码的价值在于它提供的功能,而不是代码本身。当同样的功能可以用更少的代码、更低的复杂度或更好的抽象来提供时,旧代码就应该离开。

Hyrum 定律让移除变得困难

只要用户足够多,每一种可观察行为都会被依赖,包括 bug、时序怪癖和未记录的副作用。这就是为什么弃用需要主动迁移,而不只是发公告。当用户依赖了替代方案没有复现的行为时,他们不能“直接切换”。

弃用规划从设计阶段开始

构建新东西时,要问:“三年后我们要如何移除它?”带有清晰接口、功能开关和最小表面积的系统,比到处泄漏实现细节的系统更容易弃用。

弃用决策

弃用任何东西之前,先回答这些问题:

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.

强制弃用与建议弃用

类型 何时使用 机制
Advisory 迁移是可选的,旧系统稳定 警告、文档、提示。用户按自己的节奏迁移。
Compulsory 旧系统有安全问题、阻碍进展,或维护成本不可持续 明确截止日期。旧系统将在日期 X 被移除。提供迁移工具。

默认使用建议弃用。 只有当维护成本或风险足以证明强制迁移合理时,才使用强制弃用。强制弃用要求提供迁移工具、文档和支持,不能只是宣布一个截止日期。

迁移流程

步骤 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 · 207 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. 12d ago First seen · 207 lines · 50 tokens per session scan A 1a186dba52e9

Subscribe to this mod's changes

deprecation-and-migration is a skill published in the GitHub repository vinvcn/addyosmani-agent-skills-zh (31 stars, last pushed 4mo ago), licensed MIT. It adds 50 tokens to every session and 2,150 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-30.

Related

Other skills, from other repositories

api-and-interface-design

Guides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints, defining type contracts between modules, or establishing boundaries between frontend and backend.

borhen68/SkillEngine · 49 tokens

api-and-interface-design

Guides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints, defining type contracts between modules, or establishing boundaries between frontend and backend.

addyosmani/agent-skills · 49 tokens

test-driven-development

Drives development with tests via Red-Green-Refactor and the Prove-It pattern, with hard rules against weakening assertions or faking green suites. Use when implementing any logic, fixing any bug, or changing any behavior. Triggers on "add a feature", "fix this bug", "write tests", or any task where done must be…

borhen68/SkillEngine · 79 tokens

ai-ops

Guides operational excellence for AI/ML systems in production. Use when deploying models, managing inference infrastructure, monitoring model drift, or maintaining AI-powered features. Use when you need reliable, observable, and governable machine learning systems.

borhen68/SkillEngine · 50 tokens

ci-cd-and-automation

Automates CI/CD pipeline setup. Use when setting up or modifying build and deployment pipelines. Use when you need to automate quality gates, configure test runners in CI, or establish deployment strategies.

borhen68/SkillEngine · 45 tokens

context-engineering

Optimizes agent context setup. Use when starting a new session, when agent output quality degrades, when switching between tasks, or when you need to configure rules files and context for a project.

borhen68/SkillEngine · 43 tokens