deprecation-migration
Skill3 starsChanged 4 months agoMITView on GitHub
Use when deprecating old code or APIs, migrating to a new system, or upgrading dependencies — staged deprecation paths and migration strategies that preserve behavior across the transition. Triggers on "deprecate", "migrate", "sunset API", "弃用", "迁移", "升级依赖", "更新这个库", "upgrade dependency".
- Installs packages
1 other project uses a version of this.
Adopted by
Most recently taken up by
- kwhorne/elyra-skillstheir own version, first seen May 22, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- kwhorne/elyra-skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository49 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- brainstormSkill
- oss-strategySkill
- specSkill
- researchSkill
- api-designSkill
- architectureSkill
- codebase-designSkill
- design-researchSkill
- domain-modelingSkill
- frontend-designSkill
- imagegenSkill
- image-to-codeSkill
- prompt-engineeringSkill
- prototypeSkill
- schema-designSkill
- auth-implementationSkill
- breakdownSkill
- context-engineeringSkill
- error-handlingSkill
- i18nSkill
- implementSkill
- multi-agent-orchestrationSkill
- cost-optimizationSkill
- performanceSkill
- refactoringSkill
- simplifySkill
- api-testingSkill
- e2e-testingSkill
- load-testingSkill
- tddSkill
- test-generationSkill
- a11y-reviewSkill
- code-reviewSkill
- debuggingSkill
- lintingSkill
- security-reviewSkill
- ci-cdSkill
- git-workflowSkill
- oss-polishSkill
- shippingSkill
- documentation-auditSkill
- handoffSkill
- incident-responseSkill
- observabilitySkill
- purity-auditSkill
- skill-authoringSkill
- using-skillsSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 5 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 28
Before deprecating anything, answer:
- Distinctive: line 38
No commits in 6+ months; no assigned maintainer or team
- Very specific: line 92
Add imports from @total-typescript/shoehorn, run typecheck, verify.
- Distinctive: line 94
Test code only — never use shoehorn in production code.
- Very specific: line 108
Expand: Add full_name nullable. Deploy.
- Very specific: line 112
Contract: Stop writing name; in a *separate, later* deploy, drop the column.
- Distinctive: line 120
After completing a deprecation:
- Distinctive: line 128
After a database schema migration:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Deprecation and Migration
Code is a liability, not an asset. Every line carries maintenance cost — bugs, dependency updates, security patches, onboarding overhead. Deprecation is the discipline of removing code that no longer earns its keep; migration is the process of moving users safely from old to new. Most organizations build things well; few remove them well.
Hyrum's Law makes removal hard: with enough users, every observable behavior becomes depended on — including bugs, timing quirks, and undocumented side effects. Deprecation therefore requires active migration, not just announcement. Plan removal at design time — systems with clean interfaces, feature flags, and minimal surface area are far easier to sunset.
When to use
- Replacing an old system, API, or library with a new one.
- Sunsetting a feature that's no longer needed, or consolidating duplicate implementations.
- Removing dead code that nobody owns but everybody depends on.
- Planning the lifecycle of a new system (deprecation planning starts at design time).
- Deciding whether to maintain a legacy system or invest in migration.
- Upgrading a dependency or framework version, including major/breaking upgrades (see
references/dependency-upgrade.md). - Moving data between systems (dual-write, backfill, CDC, cutover) — see
references/data-migration.md.
Not for: patching a security vulnerability in place (use security-review); routine commits (use git-workflow).
Steps
1. Make the deprecation decision
Before deprecating anything, answer:
- Does this system still provide unique value? If yes, maintain it.
- How many consumers depend on it? Quantify the migration scope.
- Does a replacement exist? If no, build the replacement first — never deprecate without an alternative.
- What's the migration cost for each consumer? Trivially automated → do it; manual and high-effort → weigh against maintenance cost.
- What's the ongoing cost of not deprecating? Security risk, engineer time, opportunity cost of complexity.
Zombie-code diagnostic — if the target shows these signs, it's zombie code: nobody owns it, but everybody depends on it.
- No commits in 6+ months; no assigned maintainer or team
- Failing tests that nobody fixes
- Dependencies with known vulnerabilities that nobody updates
- Documentation referencing systems that no longer exist
Response: assign an owner and maintain it properly, or deprecate it with a concrete migration plan. Zombie code cannot stay in limbo — it either gets investment or removal.
2. Choose advisory vs compulsory
| Type | When | Mechanism |
| Advisory | Migration optional; old system stable | Warnings, docs, nudges. Users migrate on their own timeline. |
| Compulsory | Security issues, blocks progress, or maintenance unsustainable | Hard deadline; removal by date X. Migration tooling must be provided. |
Default to advisory. Use compulsory only when the cost or risk justifies forcing migration — and never just announce a deadline; provide tooling, documentation, and support (the Churn Rule: if you own the infrastructure being deprecated, you migrate your users, or provide backward-compatible updates that require no migration).
3. Migrate incrementally
- Build the replacement — covers all critical use cases, documented, proven in production (not "theoretically better").
- Announce and document — deprecation notice with status, replacement, removal date, reason, and a migration guide with concrete steps and examples.
- Migrate consumers one at a time — identify touchpoints, update to the replacement, verify behavior matches (tests, integration checks), remove old references, confirm no regressions.
- Remove the old system — only after all consumers migrated. Verify zero active usage (metrics, logs, dependency analysis), then remove code, tests, docs, config, and the deprecation notices. Removing code is an achievement.
4. Pick a migration pattern
Strangler — run old and new in parallel; route traffic incrementally (0% → 10% canary → 50% → 100%); remove the old system when it handles 0%.
Adapter — translate calls from the old interface to the new implementation. Consumers keep using the old interface while you migrate the backend.
class LegacyTaskService implements OldTaskAPI {
constructor(private newService: NewTaskService) {}
getTask(id: number): OldTask {
return this.toOldFormat(this.newService.findById(String(id)));
}
}Feature flag — switch consumers one at a time:
function getTaskService(userId: string): TaskService {
if (featureFlags.isEnabled('new-task-service', { userId })) {
return new NewTaskService();
}
return new LegacyTaskService();
}Concrete example — migrating test helpers to @total-typescript/shoehorn. When the migration target is a library whose API replaces a problematic pattern (e.g. as type assertions in tests), the same incremental process applies:
- Install the replacement:
npm i @total-typescript/shoehorn. - Find call sites:
grep -rE ' as [A-Z]' --include='*.test.ts' --include='*.spec.ts'. - Replace
as Type→fromPartial(...)(partial data that still type-checks); replaceas unknown as Type→fromAny(...)(intentionally wrong data for error tests). UsefromExact()to force a full object when you plan to swap tofromPartiallater. - Add imports from
@total-typescript/shoehorn, run typecheck, verify.
Test code only — never use shoehorn in production code.
Database schema (expand/contract) — the riskiest migration because data is the one thing you can't roll back by reverting a deploy. Never change a column in place. Migrate in additive phases so old and new code are both valid at every step:
EXPAND ──────→ MIGRATE ──────→ CONTRACT
add new backfill rows, once no code reads
column dual-write the old column,
(nullable) old+new drop it in a later,
from app separate deployWorked example — renaming name to full_name:
- Expand. Add
full_namenullable. Deploy. (Old code ignores it.) - Dual-write. App writes both
nameandfull_nameon every insert/update. Deploy. - Backfill. Copy
name → full_namefor existing rows, in throttled batches (don't lock the table). - Switch reads. Point the app at
full_name, keep writing both. Deploy and bake. - Contract. Stop writing
name; in a separate, later deploy, drop the column.
Rules: additive first, destructive last and alone; every migration has a tested down path; backfill in batches off the hot path; build large indexes without blocking writes (e.g. Postgres CREATE INDEX CONCURRENTLY); decouple cutover from code by feature flag when risky.
Warning: If
CONCURRENTLYfails mid-build, it leaves anINVALIDindex that silently does nothing — check\diorpg_indexesfor validity; drop and recreate before relying on it.
Verify
After completing a deprecation:
- Replacement is production-proven and covers all critical use cases
- Migration guide exists with concrete steps and examples
- All active consumers migrated (verified by metrics/logs)
- Old code, tests, documentation, and config fully removed
- No references to the deprecated system remain in the codebase
- Deprecation notices removed (they served their purpose)
After a database schema migration:
- Change ships in additive phases (expand → backfill → contract), not a single in-place edit
- Old and new code are both valid against the schema at every deploy step
- Each migration has a tested down path; backfills run in throttled batches
- Destructive steps (drop/rename) ship in their own deploy after no code references the old shape
References
- ${CLAUDE_PLUGIN_ROOT}/references/engineering-principles.md — shared discipline (verify don't assume, surgical scope, simplicity)
- references/dependency-upgrade.md — changelog/migration-guide reading, breaking-change triage, branch-based upgrade, root-cause fix per break
- references/data-migration.md — moving data between systems: dual-write + backfill, CDC, cutover, verification, failure modes
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

