java-best-practices

Installation
SKILL.md

Java Best Practices

Type-First Development

Types define the contract before implementation. Follow this workflow:

  1. Define data models - records, sealed classes, and interfaces first
  2. Define method signatures - parameter types, return types, and exceptions
  3. Implement to satisfy types - let the compiler guide completeness
  4. Validate at boundaries - runtime checks where data enters the system

Make Illegal States Unrepresentable

Use Java's type system to prevent invalid states at compile time.

Records for immutable data:

Installs
2
GitHub Stars
9
First Seen
Aug 23, 2026
java-best-practices — stephanj/claude-code-collections