modern-java

Detects Java version and applies modernization transformations to legacy code.

Updated Feb 21, 2026
One-click install
npx skills add https://github.com/ajaywadhara/modern-java --skill modern-java
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: modern-java
Source: https://github.com/ajaywadhara/modern-java/tree/main
Command: npx skills add https://github.com/ajaywadhara/modern-java --skill modern-java

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Transforms legacy Java code to modern idioms and patterns across Java versions, reducing boilerplate and enhancing readability and maintainability.

Core Features & Use Cases

  • Version-aware modernization: detects Java version from project build files and applies appropriate patterns.
  • Pattern transformations: converts verbose POJOs to records, replaces for-loops with streams, and substitutes anonymous inner classes with lambdas; framework-aware adjustments for Spring Boot, Quarkus, and Micronaut.
  • Progressive loading & reporting: loads relevant reference materials based on version and generates a modernization report with changes and rationale.

Quick Start

Run the Skill against a Java project root to automatically detect the version and apply modernization transformations.

Frequently Asked Questions about modern-java

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

FAQPage Schema
How do I modernize legacy Java code to use streams and lambdas?▼

Modernize legacy Java by applying version-aware transformations that replace for loops with streams and anonymous inner classes with lambdas. The tool detects the target Java version from build files and generates a report detailing all changes and lines saved.

Can I migrate DTOs to Java records automatically?▼

Yes, you can migrate verbose POJOs and DTOs to Java records automatically. The process detects the Java version from project build files and applies the record transformation, including framework-aware adjustments for Spring Boot, Quarkus, and Micronaut.

What is the best way to upgrade legacy Java applications to virtual threads?▼

Upgrading to virtual threads involves migrating platform threads when the detected Java version supports them. The tool scans the codebase, applies the thread transformation, and outputs a modernization report detailing the changes and version requirements.

Does this Java modernization process work with Spring Boot and Quarkus?▼

Yes, the modernization process works with Spring Boot, Quarkus, and Micronaut. It applies framework-aware adjustments when transforming legacy patterns like DTOs to records and for loops to streams, ensuring compatibility with your specific framework.

How do I identify which legacy Java patterns need updating in my project?▼

Identify legacy Java patterns by scanning a Java project root to automatically detect the version and find verbose POJOs, anonymous inner classes, and for loops. It then generates a modernization report detailing the required changes and rationale.

Will modernizing my Java codebase expose my source code to external services?▼

No, modernizing your Java codebase performs all transformations locally with no data exfiltration or external calls. The tool generates a local modernization report detailing changes, lines saved, and version requirements without sending data externally.