Kipt

Deprecation and migration skill for Claude Code: what it does and how to install it

From Addy Osmani, a deprecation and migration skill Claude Code can load: strangler and adapter patterns, expand/contract schema changes, and how to install it.

By the Kipt team · Updated 24 October 2026

Source: addyosmani/agent-skills · Maintainer: community: Addy Osmani · License: MIT · Checked: 24 October 2026

What is the deprecation and migration skill?

The deprecation and migration skill teaches Claude Code and other coding agents how to remove old code safely: decide whether something should go, move every consumer to a replacement, and only then delete it. It also covers the riskiest kind of migration, a production database schema change, with a step-by-step expand/contract plan.

It is one of 25 skills in addyosmani/agent-skills, which the README describes as "Production-grade engineering skills for AI coding agents." The skill's description reads: "Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code."

As of 24 October 2026, its skills.sh page listed 56.1K installs (snapshot, 24 October 2026).

What does it do?

The skill is a single SKILL.md with no scripts or reference files. Its starting point is blunt: "Code is a liability, not an asset." From there it gives the agent a decision process and a set of migration patterns.

When it triggers. The SKILL.md lists these situations: replacing an old system, API or library; sunsetting a feature; consolidating duplicate implementations; removing dead code that nobody owns; planning the lifecycle of a new system; and deciding whether to keep a legacy system or invest in migration.

The deprecation decision. Before removing anything, the agent works through five questions: does the system still provide unique value, how many consumers depend on it, does a replacement exist, what each consumer's migration costs, and what keeping it costs. If no replacement exists, the skill says to build one first.

Advisory or compulsory. Advisory deprecation uses warnings and docs and lets users move when they are ready. Compulsory deprecation sets a removal date and requires tooling and support. The rule is "Default to advisory."

A four-step migration process. Build the replacement, announce and document it (the skill includes a template deprecation notice), migrate consumers one at a time, then remove the old system only after usage reaches zero. It adds what it calls the Churn Rule: if you own the infrastructure being deprecated, you migrate your users or ship backward-compatible updates.

Migration patterns. Three code patterns are spelled out, with TypeScript examples for two of them:

Pattern How it works
Strangler Run old and new side by side and shift traffic in phases (0%, 10%, 50%, 100%) before removing the old system
Adapter Keep the old interface and translate its calls to the new implementation
Feature flag Switch consumers to the new system one at a time behind a flag

Expand/contract schema migrations. This section is the most practical. Its worked example renames name to full_name in five steps: add the new column as nullable, dual-write both columns, backfill in batches, switch reads, then stop writing name and drop it in a separate later deploy. The rules that go with it: additive changes first and destructive ones last and alone, a tested down path for every migration, batched backfills off the hot path, and non-blocking index builds such as Postgres CREATE INDEX CONCURRENTLY.

It closes with a section on zombie code (code nobody owns but everybody depends on), a table of common rationalizations with rebuttals, red flags, and two verification checklists, one for deprecations and one for schema migrations.

How do you install it?

The skills.sh page gives this command for just this skill:

npx skills add https://github.com/addyosmani/agent-skills --skill deprecation-and-migration

The skills CLI installs the folder into your project's .claude/skills/deprecation-and-migration/, or into ~/.claude/skills/deprecation-and-migration/ for every project, which are the standard Claude Code skill locations. The README notes that a per-skill install copies only the skill folder, not the repo-level references/ directory. This skill does not point to any shared checklist there, so nothing is lost.

Whole pack as a Claude Code plugin. From the README:

/plugin marketplace add addyosmani/agent-skills
/plugin install agent-skills@addy-agent-skills

That also installs the repo's slash commands (/spec, /plan, /build, /test, /review, /ship and others) and the other 24 skills. Plugin skills are namespaced as /plugin-name:skill-name in Claude Code.

claude.ai. You can zip the deprecation-and-migration folder and upload it under Customize > Skills, as described in Anthropic's help article on skills. The MIT License allows this.

Codex and Cursor read the same SKILL.md format; see Codex skills and Cursor skills.

How do you use it?

The skill is model-invoked, so the agent can load it when you mention removing, replacing or migrating something. In Claude Code you can also type /deprecation-and-migration.

Example prompts (suggestions, not quotes from the repo):

  • We're replacing the v1 /orders endpoint with v2. Write a deprecation notice and a migration plan for our three internal consumers.
  • Rename users.name to users.full_name in production without downtime. Plan the deploys using expand/contract.
  • This legacy PDF export module has no owner. Should we keep it or deprecate it? Work through the decision questions.
  • Put the new payment client behind a feature flag so we can move tenants over one at a time.
  • Check this migration PR against the schema migration checklist before I merge it.

There are no packages, credentials or scripts. You need your project's own migration tool and, for the data steps, a way to measure usage (logs or metrics), because the skill asks the agent to confirm zero active consumers before deleting anything.

Tips and limits

  • It plans; your tools execute. The skill gives the order of deploys and the checks between them. It does not generate ORM-specific migration files, so pair it with your migration tool's docs.
  • Expect more deploys than you planned. Expand/contract turns one rename into several separate deploys plus a batched backfill. That is the point, but tell the agent if your release process makes that costly so it can group steps sensibly.
  • "Remove" means remove. Step 4 deletes code, tests, docs, config and the deprecation notices. Review those diffs, especially when the agent decides usage is zero from limited evidence.
  • Some examples are illustrative. The deprecation notice template mentions npx migrate-check and an old-service package; these are placeholders, not real tools.
  • Security audits. On 24 October 2026, skills.sh showed Pass from Gen Agent Trust Hub, Socket and Snyk.

The skill runs no scripts and writes no files on its own. Under the MIT License you can copy and edit it as long as you keep the copyright notice.

Save it in your Kipt library

Kipt keeps your prompts and skills as Markdown in a private GitHub repo you own. Open Skills and paste the folder link, https://github.com/addyosmani/agent-skills/tree/main/skills/deprecation-and-migration, into the import box. If you paste the repo link instead, it shows a list of its skills so you can also take api-and-interface-design. Everything in your library installs into Claude Code or Codex with one command:

npx skills add https://github.com/<you>/<repo>.git --all -g

Kipt is not affiliated with Addy Osmani or addyosmani/agent-skills.

Similar skills

Questions

What is the deprecation and migration skill for Claude Code?

deprecation-and-migration is an Agent Skill in Addy Osmani's addyosmani/agent-skills repo. It guides a coding agent through removing old systems, APIs or features, moving users to a replacement, and changing a production database schema without downtime using expand/contract.

How do I install the migration skill in Claude Code?

Run npx skills add https://github.com/addyosmani/agent-skills --skill deprecation-and-migration to install only this skill. To get the whole pack as a Claude Code plugin, run /plugin marketplace add addyosmani/agent-skills and then /plugin install agent-skills@addy-agent-skills.

Does the skill help with database schema migrations?

Yes. It has a section on expand/contract schema changes: add the new column as nullable, dual-write, backfill in batches, switch reads, then drop the old column in a separate later deploy. It also says every migration needs a tested down path.

Does it work with Prisma, Drizzle or a specific migration tool?

It is tool-neutral. The skill describes the sequence of deploys and the rules for each one, not commands for a particular ORM. You pair it with whatever migration tool your project already uses.

What is the difference between advisory and compulsory deprecation?

In the skill's terms, advisory deprecation means the old system stays stable and users move on their own timeline after warnings and docs. Compulsory deprecation sets a hard removal date and requires migration tooling and support. The skill says to default to advisory.

More in Skill directory

All guides

Keep your prompts and skills in one place, in your own GitHub. Install every skill with one command.

Get started

Kipt is an independent product, not affiliated with or endorsed by Anthropic, OpenAI, Cursor or GitHub. Claude, ChatGPT, Codex, Cursor and GitHub are trademarks of their owners.