122-java-type-design

Installation
SKILL.md

Type Design Thinking in Java

Review and improve Java code using comprehensive type design principles that apply typography concepts to code structure and organization for maximum clarity and maintainability.

What is covered in this Skill?

  • Clear type hierarchies: nested static classes, logical structure
  • Consistent naming conventions: domain-driven patterns, uniform interface/implementation naming
  • Strategic whitespace for readability
  • Type-safe wrappers: value objects replacing primitive obsession (EmailAddress, Money)
  • Generic type parameters: flexible reusable types, bounded parameters
  • Domain-specific fluent interfaces: builder pattern, method chaining
  • Type weights: conceptual importance — core domain vs supporting vs utility
  • Type contrast through interfaces: contract vs implementation separation
  • Aligned method signatures: consistent parameter and return types across related classes
  • Self-documenting code: clear descriptive names
  • BigDecimal for precision-sensitive calculations (financial/monetary operations)
  • Strategic type selection: Optional, Set vs List, interfaces over concrete types

Scope: The reference is organized by examples (good/bad code patterns) for each core area. Apply recommendations based on applicable examples.

Related skills

More from jabrena/cursor-rules-java

Installs
96
GitHub Stars
380
First Seen
Mar 3, 2026