# Migrate Callers Then Delete Legacy APIs

Update code to use a new API and remove the old one when there are no external compatibility constraints.

**Canonical 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

**Instructions download URL:** https://skillshunter.net/skills/discovered-cdbed09385829169416ed39caeb63923aeb5eeb6ba76dab5/download

**Category:** Software & Development

**Source URL:** https://github.com/jueyi6/empstack/blob/74181e31d2f00313f8683ba157966efcabbe109e/skills/principle-migrate-callers-then-delete-legacy-apis/SKILL.md

**Source commit:** 74181e31d2f00313f8683ba157966efcabbe109e

**Listing approved at:** 2026-12-02

**Created at:** 2026-11-30T08:56:18.000000Z

**Updated at:** 2026-12-02T09:15:14.000000Z

## Catalog information

The following descriptions are catalog information. Listing approval does not mean the skill has been tested or is safe for every environment.

### Editor's 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.

### When to use it

- 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

## Skill instructions

---
name: principle-migrate-callers-then-delete-legacy-apis
description: When replacing an internal API, migrate callers and delete the old one.
disable-model-invocation: true
---

# Migrate Callers Then Delete Legacy APIs

- Update tests to assert the new contract, and delete tests that only protect pre-refactor implementation details

**When this applies:**
- No external users depend on backward compatibility
- The project can absorb coordinated breaking changes
- The new API is part of a simplification or refactor initiative

