skills/deprecation-and-migration/SKILL.md
Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when deciding whether to maintain or sunset existing code.
npx skillsauth add paulund/skills deprecation-and-migrationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Make the deprecation decision — before deprecating, answer these questions:
Build the replacement first — it must cover all critical use cases of the old system, be proven in production, and have a migration guide before announcement.
Announce with documentation:
## Deprecation Notice: <OldThing>
Status: Deprecated as of YYYY-MM-DD
Replacement: <NewThing> — see migration guide below
Removal date: Advisory (no hard deadline) | Compulsory by YYYY-MM-DD
Reason: <one paragraph>
### Migration Guide
1. Replace `import { X } from 'old'` with `import { X } from 'new'`
2. Update configuration: ...
Migrate incrementally — for each consumer:
Remove the old system — only after all consumers have migrated:
Zombie code — code with no active owner, no commits in 6+ months, and active consumers: either assign an owner and maintain it properly, or deprecate with a concrete plan. It cannot stay in limbo.
| Rationalization | Reality | |---|---| | "It still works, why remove it?" | Working code that nobody maintains accumulates security debt silently. | | "Someone might need it later" | If it's needed later, it can be rebuilt. Keeping unused code costs more than rebuilding. | | "Users will migrate on their own" | They won't. Provide tooling, documentation, and incentives — or do the migration yourself. | | "We can maintain both systems indefinitely" | Two systems doing the same thing is double the maintenance, testing, and onboarding cost. |
After completing a deprecation:
development
Use when implementing any logic, fixing any bug, or changing any behaviour. Use when you need to prove code works, when a bug report arrives, or when modifying existing functionality. Do NOT use for config changes, data migrations, or dependency updates.
development
Use when starting a new feature, when requirements are unclear, when asked to write code without a clear spec, or before any non-trivial implementation. Do NOT use for trivial bug fixes or one-line changes.
development
Use when you want authoritative, source-cited code free from outdated patterns. Use when building with any framework or library where correctness matters. Detects the stack from dependency files, fetches official documentation, implements following documented patterns, and cites sources for every framework-specific decision.
development
Use when preparing to ship a feature, release, or deployment. Use before merging to main, creating a release, or deploying to production. Do NOT use for CI-only changes or internal refactors that don't reach production.