skills/deprecation-handler/SKILL.md
Handles deprecated APIs, types, and modules by applying safe migration patterns. Use when encountering deprecation warnings, migrating from deprecated code, updating dependencies with breaking changes, or modernizing legacy code to use current APIs.
npx skillsauth add alienfast/claude Deprecation HandlerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill helps safely identify, assess, and migrate deprecated code to modern alternatives. It ensures systematic handling of deprecated APIs, types, functions, and modules.
Invoke this skill when:
Automated Detection:
# TypeScript compiler warnings
npx tsc --noEmit
# Dependency audit
npm outdated
pnpm outdated
# Check for deprecated packages
npm deprecate-check
Manual Detection:
Output: Create a catalog of all detected deprecations with:
Classify by Priority:
Analyze Scope:
Risk Assessment:
For Immediate/High Priority:
For Medium/Low Priority:
Output: Migration plan with:
Safe Migration Pattern:
// 1. Add new implementation alongside old
const newImplementation = modernApi.newMethod(params);
// 2. Validate equivalence in tests
expect(newImplementation).toEqual(oldImplementation);
// 3. Replace usage
// const result = legacyApi.deprecatedMethod(params); // DEPRECATED
const result = modernApi.newMethod(params);
// 4. Remove old code after validation
Incremental Approach:
For Simple Cases (same file):
// Before
import { deprecatedFunc } from 'old-package';
deprecatedFunc(arg);
// After
import { newFunc } from 'new-package';
newFunc(arg);
For Complex Cases (separate commit/PR):
Automated Validation:
# Type checking
npx tsc --noEmit
# Linting (should show fewer deprecation warnings)
npx eslint . --ext .ts,.tsx,.js,.jsx
# Run test suite
npm test
pnpm test
# Build verification
npm run build
pnpm build
Manual Validation:
Regression Prevention:
See resources/migration-patterns.md for detailed examples of:
When deprecations cannot be immediately fixed:
/**
* TODO: Migrate to newApi.modernMethod() when v3 migration is complete
*
* Current usage of deprecatedMethod() due to:
* - Dependency on legacy authentication system
* - Breaking changes require coordinated update
*
* Migration guide: https://docs.example.com/v2-to-v3
* Sunset date: 2026-Q2
* Tracking issue: #1234
*/
legacyApi.deprecatedMethod(params);
Required Elements:
Update changelog or migration notes:
## Deprecation Fixes
- Replaced `React.createClass` with functional components
- Migrated from `componentWillMount` to `useEffect` hooks
- Updated deprecated `request` package to `axios`
- Removed usage of deprecated `moment` in favor of `date-fns`
Before completing migration:
// Document why no replacement exists and alternative approach
// DEPRECATED: myLib.removedFeature() has no direct replacement
// Alternative: Implement custom logic using myLib.lowerLevelApi()
// See: https://github.com/mylib/issues/5678
const customImplementation = (params) => {
// Custom logic using available APIs
};
// When one dependency requires deprecated API from another:
// TODO: Blocked by [email protected] requiring deprecated API
// Cannot upgrade until outdated-package releases v3.x
// Tracking: https://github.com/outdated-package/issues/123
deprecatedApi.requiredByDependency();
// When migrating incrementally across large codebase:
// MIGRATION IN PROGRESS: 45% complete (15/33 files migrated)
// See migration plan: docs/deprecation-migration-plan.md
// This file: Not yet migrated (scheduled for Sprint 5)
legacyPattern.stillInUse();
This skill implements patterns from:
testing
End-to-end Linear issue macro — runs /start then /finish in sequence, gated on the /quality-review verdict. Worktree mode is opt-in via the `wt` token, mirroring /start. Pauses only for plan approval and the deferred-items filing decision; otherwise autonomous. Use when the user says 'full PL-XX', 'ship PL-XX end-to-end', or invokes /full.
development
Adversarial implementation review with triage and fix loop. Hard-gates on `pnpm check`, delegates to the quality-reviewer agent for categorized findings (Critical/High/Medium/Nice-to-Have/Approved), then triages and fixes findings via the developer agent. Loops until a re-review surfaces no new Critical/High/Medium findings (convergence), with a soft ceiling of 5 cycles before asking the user how to proceed; option 3 of that prompt terminates with verdict `escalated-to-architect`. Use when the user says 'review my work', 'check this implementation', 'adversarial review', 'quality review', or invokes /quality-review.
testing
Triage and prioritize Linear backlog. Analyzes issues for staleness, blockers, and suggests priorities based on dependencies and capacity.
testing
Start working on a Linear issue — check blockers, assign, move to In Progress, create branch, plan implementation, execute with checkpoint updates, review and triage findings. Use when the user says 'start issue', 'work on PL-XX', 'begin PL-XX', or invokes /start.