Skill
API Deprecation Handling
Deprecates a public function or endpoint the careful way: replacement first, runtime warnings, docs, a migration note and a dated removal plan.
1Never remove in the same release that introduces the replacement.
2Steps
31. Define the change: what is old, what replaces it, and who calls it. Search the repo (`grep` or symbol search) for internal callers and list them. For public APIs, check logs or metrics for external use if available.
42. Confirm the replacement exists, has tests and covers every use case of the old API. If it does not, stop and report the gap.
53. Mark the old API in the language's own way: `@deprecated` JSDoc, `warnings.warn(..., DeprecationWarning)`, `#[deprecated]`, `[Obsolete]`. For HTTP, add `Deprecation` and `Sunset` headers and a `Link` header pointing at the migration doc.
Claude CodeCodex
API Deprecation Handling
SkillCode quality
Free