Legacy Code Reviewer

Detect deprecated patterns and propose modernization refactors for Python 3.12+ and JavaScript/TypeScript codebases.

Updated Dec 14, 2025
One-click install
npx skills add https://github.com/radfares/nurseRN --skill legacy-code-reviewer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Legacy Code Reviewer
Source: https://github.com/radfares/nurseRN/tree/main/.claude/skills/legacy-code-reviewer
Command: npx skills add https://github.com/radfares/nurseRN --skill legacy-code-reviewer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Legacy code bases accumulate debt over time, making maintenance costly and risky. This Skill provides an AI-powered review and refactoring plan that identifies deprecated patterns, suggests modern replacements (Python 3.12+), assesses test coverage, and outlines incremental steps to improve reliability and maintainability without breaking behavior.

Core Features & Use Cases

  • Automated Discovery: Detect deprecated APIs, anti-patterns, duplicated logic, and high McCabe complexity to surface modernization targets.
  • Refactoring Guidance: Propose a phased modernization plan (formatting, typing, modularization) with concrete before/after code examples.
  • Test & Coverage Awareness: Recommend characterization tests when coverage is low and outline test strategies to preserve behavior.
  • Use Case: A monolithic Python project with legacy constructs can be transformed incrementally, reducing risk and technical debt while enabling safer upgrades.

Quick Start

Invoke the Legacy Code Reviewer on a target codebase, for example analyze src/legacy to receive a modernization plan with concrete steps and example refactors.

Frequently Asked Questions about Legacy Code Reviewer

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

FAQPage Schema
How do I refactor legacy Python code to modern standards?

Refactoring legacy Python code involves identifying deprecated patterns and anti-patterns, then replacing them with Python 3.12+ idioms. This Skill automates discovery of complexity hotspots, deprecated APIs, and duplicated logic, then proposes phased modernization steps with concrete before/after examples to reduce technical debt safely.

Can I use static analysis tools like Ruff, mypy, and Bandit on my legacy codebase?

Yes. This Skill integrates static analysis tools—Ruff, mypy, Bandit, Radon, and Vulture—to detect code quality issues, type inconsistencies, security vulnerabilities, and cyclomatic complexity in legacy Python and JavaScript/TypeScript codebases, then recommends fixes aligned with modern standards.

What's the best way to modernize legacy code without breaking existing behavior?

Incremental, risk-aware refactoring is best. This Skill assesses test coverage, recommends characterization tests where coverage is low, and structures modernization in phased steps—formatting, typing, then modularization—so behavior is preserved and regression risk stays minimal throughout the upgrade process.

How do I identify which parts of my legacy codebase need refactoring most?

Automated discovery surfaces high-priority modernization targets by detecting deprecated APIs, anti-patterns, duplicated logic, and high McCabe complexity. This Skill ranks defects by severity and proposes concrete refactors for each, so you can tackle the highest-impact issues first.

Does this work with JavaScript and TypeScript legacy code, or just Python?

This Skill handles both Python 3.12+ and JavaScript/TypeScript legacy codebases. It applies language-specific analysis and modern tooling recommendations for each, delivering modernization plans tailored to your tech stack.

What happens if my legacy codebase has low test coverage?

When test coverage is low, this Skill recommends characterization tests—tests that document current behavior—before refactoring. This safety net lets you modernize confidently by capturing existing functionality, so refactors don't introduce silent breaks.