Refactoring Deprecated Code

Refactor deprecated library functions, APIs, and language features to modern equivalents.

1|Updated Jun 4, 2025
One-click install
npx skills add https://github.com/kynoptic/markdownlint-trap --skill refactoring-deprecated-code
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Refactoring Deprecated Code
Source: https://github.com/kynoptic/markdownlint-trap/tree/main/.claude/skills/code-refactor-deprecations
Command: npx skills add https://github.com/kynoptic/markdownlint-trap --skill refactoring-deprecated-code

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Systematically scans for deprecated library functions, APIs, and language features, then automatically updates code to use modern alternatives. Handles migration guides, version compatibility, and integration testing. Use when detecting deprecation warnings, updating dependencies, addressing API evolution, or when the user mentions deprecated APIs, legacy code, or migration needs.

Core Features & Use Cases

  • Scan for deprecation indicators: compiler warnings, static analysis, and changelog review
  • Categorize impact: critical, high, medium, low
  • Research modern alternatives: direct replacements and complex migrations
  • Automated refactoring scripts: language-specific tooling and pattern-based replacements
  • Phased implementation: low-risk replacements to high-complex migrations
  • Validation: automate tests and review results

Quick Start

Example: Run a deprecation pass to replace a deprecated API with a modern alternative and run tests to ensure compatibility.

Frequently Asked Questions about Refactoring Deprecated Code

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automatically detect and refactor deprecated code across my project?

Deprecated code refactoring scans for deprecation warnings from compilers, static analysis tools, and changelogs, then automatically updates functions and APIs to modern equivalents using language-specific tooling. This detects issues early and applies pattern-based replacements with minimal manual effort.

Can I refactor deprecated APIs in Python, JavaScript, Java, Go, and Rust projects?

Yes, deprecated code refactoring supports multi-language projects including Python, JavaScript, Java, Go, and Rust. It uses language-specific tooling and AST-based analysis to identify and replace deprecated library functions and language features in each ecosystem.

How do I safely migrate deprecated code without breaking my application?

Deprecated code refactoring uses phased rollout, categorizing changes by impact severity, then automates testing and validation to ensure compatibility. It updates dependencies and documentation alongside code changes, reducing risk during large-scale migrations.

What's the best way to handle API evolution when dependencies are updated?

When dependencies update and APIs change, deprecated code refactoring automatically identifies breaking changes via changelog review and warning detection, researches modern alternatives, and applies targeted replacements while maintaining version compatibility and integration test validation.

Can deprecated code refactoring work with my existing dependency management workflow?

Yes, deprecated code refactoring integrates with dependency updates and version compatibility checks. It handles migration guides, resolves conflicts between old and new APIs, and coordinates roadmap integration so upgrades align with your release cycle.