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.
npx skills add 233i/agent-skills --skill deprecation-and-migrationgit clone --depth 1 https://github.com/233i/agent-skillsWrote 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.
[](https://agentmods.dev/skills/233i/agent-skills/deprecation-and-migration)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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`
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.
- 11d ago First seen · 208 lines · 56 tokens per session scan A b6c2337b5b39
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.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
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…
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…
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…
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…
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…