api-deprecation-and-migration
Skill4 starsChanged 3 months agoMITView on GitHub
Deprecate APIs, features, or systems safely — announce, migrate consumers, sunset on a timeline, and document alternatives. Load when removing an old API, migrating users between implementations, sunsetting a feature, or the user asks about deprecation policy, migration guides, or breaking changes. Not for deleting dead code with zero consumers (use code-simplification). Distinct from meta `deprecate-skill` (skill library retirement).
In this repository125 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/agent-loom-routing.mdcCursor rule
- .cursor/rules/agent-loom-skills-index.mdcCursor rule
- adversarial-hatSkill
- agent-builderSkill
- agent-launcherSkill
- agent-loom-syncSkill
- agent-observabilitySkill
- agent-run-retroSkill
- agent-system-architectureSkill
- api-and-interface-designSkill
- apply-paper-to-projectSkill
- app-security-hardeningSkill
- architectural-decision-logSkill
- assumption-mappingSkill
- brainstormingSkill
- browser-testing-with-devtoolsSkill
- business-modelingSkill
- ci-cd-and-automationSkill
- codebase-understandingSkill
- code-review-crspSkill
- code-simplificationSkill
- compress-skillSkill
- context-engineeringSkill
- create-agent-promptSkill
- cross-link-skillsSkill
- customer-discoverySkill
- debug-and-fixSkill
- deep-thinkingSkill
- dependency-mappingSkill
- deploy-anywhereSkill
- deprecate-skillSkill
- design-directionSkill
- design-reviewSkill
- design-systemSkill
- dynamic-routingSkill
- eval-judgeSkill
- eval-outputSkill
- eval-pipelineSkill
- eval-rubric-designSkill
- experimentationSkill
- experiment-backlogSkill
- experiment-readoutSkill
- experiment-runbookSkill
- experiment-specSkill
- fault-localizeSkill
- feature-specSkill
- fermiSkill
- first-principlesSkill
- frontend-designSkill
- generate-changelogSkill
- git-workflow-and-versioningSkill
- gsap-animationSkill
- harness-engineeringSkill
- harness-evolutionSkill
- harness-generationSkill
- idea-evaluationSkill
- idea-generationSkill
- implementation-planSkill
- improve-skillsSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 51
After deadline: return structured errors on old surface.
- Distinctive: line 55
Delete code; update changelog.
- Distinctive: line 141
No changes — citation audit passed.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
API Deprecation and Migration
Code is a liability. Deprecation removes systems that no longer earn their keep; migration moves consumers safely to replacements.
Hard Rules
- Replacement before removal — working alternative with docs and migration path.
- Default advisory — warnings and timelines; compulsory only for security or unsustainable cost.
- Quantify consumers — usage metrics, client lists, or repo search before dates.
- Hyrum's Law — undocumented behavior will be depended on; plan for stragglers.
- Telemetry on migration — track who still calls deprecated surfaces.
Workflow
Step 1 — Deprecation decision
Answer: unique value remaining? consumer count? replacement ready? migration cost vs maintenance cost?
Step 2 — Announce
Publish notice: what, why, timeline, replacement, migration guide link, contact.
Step 3 — Migrate
Provide codemods, dual-write/read periods, feature flags, or versioned endpoints as appropriate.
Step 4 — Sunset
After deadline: return structured errors on old surface; keep read-only tombstone period if needed.
Step 5 — Remove and document
Delete code; update changelog; postmortem on straggler pain for next time.
Advisory vs compulsory
| Type | When | Mechanism |
| Advisory | Stable old path, low risk | Docs + warnings + metrics |
| Compulsory | Security, blocking progress | Hard deadline + tooling + support |
When NOT to use
- Internal dead code with zero callers (delete with tests)
- Retiring a skill from agent-loom library (
deprecate-skillinstead)
Gotchas
- Announcing without migration guide guarantees support churn.
- Breaking changes in patch versions destroy trust.
- Dual-write without reconciliation causes data drift.
- "We'll remove it someday" with no metric never happens.
Common Rationalizations
| Excuse | Reality |
| "Nobody uses the old API" | Check logs — Hyrum's Law says otherwise. |
| "Just delete it" | Forced migrations without notice become incidents. |
| "We'll support both forever" | Two systems = double security and cognitive cost. |
| "Migration guide is enough" | Tooling and deadlines drive completion. |
| "Breaking change in minor is fine" | Semver exists so clients can plan. |
Output Format
## Deprecation plan — [surface]
Consumers: [count/evidence]
Replacement: [link]
Type: [advisory/compulsory]
Timeline: [dates]
Migration: [steps/tooling]
Removal criteria: [metric or date]Examples
<examples>
<example>
<input>"Remove REST v1 `/users` in favor of v2."</input>
<output>90-day advisory → `Sunset` header → v1 returns 410 with link; codemod for internal clients; dashboard on v1 traffic.</output>
</example>
</examples>Verification
- Replacement documented and production-proven
- Consumer impact quantified
- Timeline and notice published
- Migration tooling or guide available
- Telemetry proves traffic at zero before code removal
Red Flags
- Sunset announced without working replacement and docs
- Breaking change shipped in patch or minor version
- Dual-write path has no reconciliation or drift checks
- Deprecation timeline set without consumer usage evidence
Prune Log
Last pruned: 2026-07-04
- No changes — citation audit passed; content current (improve-skills full pass 2026-07-04)
Impact Report
Surface: [name] | Consumers: [N]
Type: [advisory/compulsory] | Sunset: [date]
Migration: [ready/partial]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.

