deprecation-and-migration
하는 일
컴퓨터 프로그램에서 오래된 시스템, API, 기능을 제거하도록 돕습니다. 또한 사용자가 이전 버전에서 새 버전으로 옮겨 가도록 도와, 전환이 매끄럽게 되도록 합니다.
사용하는 경우
- ✓오래된 시스템을 은퇴시키고 새 시스템을 도입해야 할 때.
- ✓오래된 서비스에서 새 서비스로 사용자를 옮길 때.
- ✓오래된 코드를 계속 유지할 가치가 있는지 판단할 때.
스킬 링크
https://github.com/addyosmani/agent-skills/blob/main/skills/deprecation-and-migration/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“오래된 시스템을 안전하게 제거하고 사용자를 새 시스템으로 옮기려면 어떻게 해야 하나요?”
매주 새 스킬 5개. 읽는 데 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
…
자주 묻는 질문
오래된 코드를 제거하는 것이 왜 중요한가요?
오래된 코드는 유지보수(수정, 업데이트, 보안)에 비용이 들고 새 기능 추가를 방해할 수 있습니다. 더 이상 쓰지 않는 것을 제거하면 자원이 확보되고 시스템이 단순해집니다.
'Hyrum's Law'란 무엇인가요?
시간이 지나면 오래된 시스템의 버그나 예상치 못한 동작조차 사람들이 의존하는 대상이 될 수 있다는 생각입니다. 그래서 제거하려면 단순한 공지가 아니라 신중함과 적극적인 이전이 필요합니다.
사용자에게 방해 없이 시스템을 제거하려면 어떻게 하나요?
미리 계획하고, 작동하는 대안을 만들고, 이전 안내와 함께 변경 사항을 명확히 알리고, 사용자를 점차 옮기세요. 아무도 쓰지 않는다고 확신할 때만 오래된 시스템을 제거하세요.
상세 정보
작성자의 원본 설명
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
- 업데이트
- 2026. 10. 13.
댓글
- …
이 저장소의 다른 스킬
api-and-interface-design
107k잘 정의된 API와 인터페이스를 만드는 데 도움을 줍니다. 소프트웨어의 서로 다른 부분이 통신하는 방식을 설계할 때 유용합니다.
browser-testing-with-devtools
107k에이전트가 실제 브라우저에서 코드를 직접 테스트하도록 돕습니다. 사용 환경에서 어떻게 작동하는지 확인하고, 오류와 성능 문제를 찾는 데 유용합니다.
ci-cd-and-automation
107k반복 작업을 자동화하고, 프로젝트를 배포하며, 인프라를 관리하도록 에이전트에게 가르칩니다.
code-review-and-quality
107k여러 측면에서 상세한 코드 검토를 수행합니다. 새 변경 사항을 병합하기 전에 품질을 확인하고 향후 문제를 막는 데 유용합니다.