modernize-java

Installation
SKILL.md

Modernize Java Code

Update the target code to use modern Java features:

  • Records instead of mutable POJOs where the type is a value carrier
  • Switch expressions with arrow syntax and exhaustiveness checking
  • Pattern matching for instanceof and switch
  • Local variable type inference (var) where it helps readability
  • Virtual threads (Java 21+) for I/O-bound operations — Executors.newVirtualThreadPerTaskExecutor()
  • Sealed classes when the type hierarchy is closed
  • Text blocks for multiline strings
  • Sequenced collections (Java 21+) where ordered access matters
  • Collection factory methods (List.of, Map.of, Map.entry)

Constraints

Installs
7
GitHub Stars
306
First Seen
May 14, 2026
modernize-java — kousen/claude-code-training