{"data":{"slug":"discovered-cdbed09385829169416ed39caeb63923aeb5eeb6ba76dab5","title":"Migrate Callers Then Delete Legacy APIs","summary":"Update code to use a new API and remove the old one when there are no external compatibility constraints.","url":"https:\/\/skillshunter.net\/skills\/discovered-cdbed09385829169416ed39caeb63923aeb5eeb6ba76dab5","json_url":"https:\/\/skillshunter.net\/api\/public\/v1\/skills\/discovered-cdbed09385829169416ed39caeb63923aeb5eeb6ba76dab5","markdown_url":"https:\/\/skillshunter.net\/skills\/discovered-cdbed09385829169416ed39caeb63923aeb5eeb6ba76dab5.md","download_url":"https:\/\/skillshunter.net\/skills\/discovered-cdbed09385829169416ed39caeb63923aeb5eeb6ba76dab5\/download","category":{"slug":"software-development","name":"Software & Development"},"editor_note":"Ensure that no external users depend on the legacy API before proceeding. Update tests to reflect the new API contract and remove tests that only verify old implementation details.","instructions":"---\nname: principle-migrate-callers-then-delete-legacy-apis\ndescription: When replacing an internal API, migrate callers and delete the old one.\ndisable-model-invocation: true\n---\n\n# Migrate Callers Then Delete Legacy APIs\n\n- Update tests to assert the new contract, and delete tests that only protect pre-refactor implementation details\n\n**When this applies:**\n- No external users depend on backward compatibility\n- The project can absorb coordinated breaking changes\n- The new API is part of a simplification or refactor initiative\n","use_cases":["Refactoring internal APIs during a codebase simplification initiative","Removing deprecated APIs after ensuring all internal callers have been updated","Updating test suites to align with new API contracts"],"limitations":[],"compatibility":[],"setup_tip":null,"sample_input":null,"sample_output":null,"source_url":"https:\/\/github.com\/jueyi6\/empstack\/blob\/74181e31d2f00313f8683ba157966efcabbe109e\/skills\/principle-migrate-callers-then-delete-legacy-apis\/SKILL.md","source_commit":"74181e31d2f00313f8683ba157966efcabbe109e","license":null,"version":null,"listing_approved_at":"2026-12-02","created_at":"2026-11-30T08:56:18.000000Z","updated_at":"2026-12-02T09:15:14.000000Z","seo_title":"Migrate Callers Then Delete Legacy APIs","seo_description":"A structured approach to replacing legacy APIs with new ones when external compatibility is not required.","seo_keywords":["API migration","legacy API removal","code refactoring","test suite update","internal API replacement"]}}