java-21

Installation
SKILL.md

When to Use

Load this skill when:

  • Writing Java 21 application or library code
  • Designing immutable DTOs or value objects
  • Modeling closed hierarchies with sealed types
  • Using virtual threads for blocking I/O

Critical Patterns

Pattern 1: Records for immutable data

Use records for DTOs and value objects, validate in compact constructors.

Pattern 2: Sealed types + pattern matching

Use sealed interfaces/classes and switch pattern matching for exhaustiveness.

Pattern 3: Virtual threads for I/O

Related skills
Installs
160
GitHub Stars
504
First Seen
Feb 5, 2026