मुख्य सामग्री पर जाएँ
Skillpedia
सामान्य कोडिंग107k · #769

deprecation-and-migration

यह क्या करती है

यह टूल कंप्यूटर प्रोग्राम से पुराने सिस्टम, APIs या फीचर हटाने में मदद करता है। यह यूज़र्स को पुराने वर्ज़न से नए वर्ज़न पर ले जाने में भी सहायता करता है, ताकि बदलाव आसानी से हो।

कब इस्तेमाल करें

  • ✓जब कोई पुराना सिस्टम बंद करके नया लाना हो।
  • ✓जब यूज़र्स को पुरानी सेवा से नई सेवा पर ले जाना हो।
  • ✓यह तय करते समय कि पुराना कोड अभी भी संभालने लायक है या नहीं।

Skill का लिंक

https://github.com/addyosmani/agent-skills/blob/main/skills/deprecation-and-migration/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/addyosmani/agent-skills/blob/main/skills/deprecation-and-migration/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मैं पुराने सिस्टम को सुरक्षित तरीके से कैसे हटाऊँ और अपने यूज़र्स को नए सिस्टम पर कैसे ले जाऊँ?”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

यह उस कोड को हटाने की योजना बनाता है जो अब काम का नहीं है, और यूज़र्स को नए विकल्पों की तरफ़ ले जाने का रास्ता तय करता है। इसमें बदलावों की घोषणा करना, नए वर्ज़न तक साफ़ रास्ता देना और आख़िर में पुराना कोड हटाना शामिल है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Deprecation and Migration

Overview

Code is a liability, not an asset. Every line of code has ongoing maintenance cost — bugs to fix, dependencies to update, security patches to apply, and new engineers to onboard. Deprecation is the discipline of removing code that no longer earns its keep, and migration is the process of moving users safely from the old to the new.

Most engineering organizations are good at building things. Few are good at removing them. This skill addresses that gap.

When to Use

  • Replacing an old system, API, or library with a new one
  • Sunsetting a feature that's no longer needed
  • 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

Core Principles

Code Is a Liability

Every line of code has ongoing cost: it needs tests, documentation, security patches, dependency updates, and mental overhead for anyone working nearby. The value of code is the functionality it provides, not the code itself. When the same functionality can be provided with less code, less complexity, or better abstractions — the old code should go.

Hyrum's Law Makes Removal Hard

With enough users, every observable behavior becomes depended on — including bugs, timing quirks, and undocumented side effects. This is why deprecation requires active migration, not just announcement. Users can't "just switch" when they depend on behaviors the replacement doesn't replicate.

Deprecation Planning Starts at Design Time

When building something new, ask: "How would we remove this in 3 years?" Systems designed with clean interfaces, feature flags, and minimal surface area are easier to deprecate than systems that leak implementation details everywhere.

The Deprecation Decision

Before deprecating anything, answer these questions:

1. Does this system still provide unique value?
   → If yes, maintain it. If no, proceed.

2. How many users/consumers depend on it?
   → Quantify the migration scope.

3. Does a replacement exist?
   → If no, build the replacement first. Don't deprecate without an alternative.

4. What's the migration cost for each consumer?
   → If trivially automated, do it. If manual and high-effort, weigh against maintenance cost.

5. What's the ongoing maintenance cost of NOT deprecating?
   → Security risk, engineer time, opportunity cost of complexity.

Compulsory vs Advisory Deprecation

Type When to Use Mechanism
Advisory Migration is optional, old system is stable Warnings, documentation, nudges. Users migrate on their own timeline.
Compulsory Old system has security issues, blocks progress, or maintenance cost is unsustainable Hard deadline. Old system will be removed by date X. Provide migration tooling.

Default to advisory. Use compulsory only when the maintenance cost or risk justifies forcing migration. Compulsory deprecation requires providing migration tooling, documentation, and support — you can't just announce a deadline.

The Migration Process

Step 1: Build the Replacement

Don't deprecate without a working alternative. The replacement must:

  • Cover all critical use cases of the old system
  • Have documentation and migration guides
  • Be proven in production (not just "theoretically better")

Step 2: Announce and Document

## Deprecation Notice: OldService

**Status:** Deprecated as of 2025-03-01
**Replacement:** NewService (see migration guide below)
**Removal date:** Advisory — no hard deadline yet
**Reason:** OldService requires manual scaling and lacks observability.
            NewService handles both automatically.

### Migration Guide
1. Replace `import { client } from 'old-service'` with `import { client } from 'new-service'`
2. Update configuration (see examples below)
3. Run the migration verification script: `npx migrate-check`

Step 3: Migrate Incrementally

Migrate consumers one at a time, not all at once. For each consumer:

1. Identify all touchpoints with the deprecated system
2. Update to use the replacement
3. Verify behavior matches (tests, integration checks)
4. Remove references to the old system
5. Confirm no regressions

…

अक्सर पूछे जाने वाले सवाल

पुराना कोड हटाना क्यों ज़रूरी है?

पुराने कोड को संभालने में पैसा लगता है (फिक्स, अपडेट, सुरक्षा) और यह नए फीचर जोड़ने में रुकावट बन सकता है। जो काम का नहीं रहा उसे हटाने से संसाधन बचते हैं और सिस्टम सरल होता है।

"हाइरम्स लॉ" क्या है?

यह विचार है कि समय के साथ पुराने सिस्टम के बग या अनपेक्षित व्यवहार भी लोगों की ज़रूरत बन जाते हैं। इसलिए हटाने के लिए सिर्फ़ नोटिस देना काफ़ी नहीं, सावधानी और सक्रिय माइग्रेशन ज़रूरी है।

यूज़र्स को परेशान किए बिना सिस्टम कैसे हटाऊँ?

पहले से योजना बनाएँ, एक काम करने वाला विकल्प तैयार करें, माइग्रेशन गाइड के साथ बदलावों की साफ़ घोषणा करें, और यूज़र्स को धीरे-धीरे नए सिस्टम पर लाएँ। पुराना सिस्टम तभी हटाएँ जब पक्का हो कि उसे अब कोई इस्तेमाल नहीं कर रहा।

जानकारी

लेखक का मूल विवरण

Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code.

repo: addyosmani/agent-skills

लोकप्रियता

GitHub स्टार
107k
रैंकिंग में स्थान
#769
लाइसेंस
MIT
अपडेट की गई
13/10/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

api-and-interface-design

107k

अच्छी तरह परिभाषित APIs और interfaces डिज़ाइन करने में मदद करता है। सॉफ्टवेयर के अलग-अलग हिस्से आपस में कैसे बात करेंगे, यह तय करते समय उपयोगी है।

कोडिंगAPI और सर्वर (backend)

browser-testing-with-devtools

107k

आपके एजेंट को असली browsers में सीधे code टेस्ट करने में मदद करता है। जिस माहौल में चीज़ इस्तेमाल होगी, वहाँ वह कैसे चलती है यह जाँचने और errors व performance की समस्याएँ ढूंढने के लिए उपयोगी है।

कोडिंगटेस्टिंग

ci-cd-and-automation

107k

आपके AI एजेंट को दोहराए जाने वाले काम अपने-आप करना, प्रोजेक्ट्स शिप करना और इंफ्रास्ट्रक्चर मैनेज करना सिखाता है।

प्रोडक्टिविटीऑटोमेशन

code-review-and-quality

107k

कई पहलुओं पर detailed code reviews करता है। नए changes merge करने से पहले quality सुनिश्चित करने और आगे की समस्याएँ रोकने के लिए उपयोगी है।

कोडिंगटेस्टिंग

मिलती-जुलती skills