
122 Java Type Design
This one walks through your Java code looking for type design problems like primitive obsession, weak type hierarchies, and inconsistent naming. It pushes you toward value objects (EmailAddress instead of String, Money instead of double), generic type parameters, and fluent interfaces. The workflow is cautious: it compiles before touching anything, applies refactorings based on pattern examples in the reference doc, then runs clean verify. Good for codebases that work but feel mushy around the edges, where you're passing strings and primitives everywhere instead of domain types. It's opinionated about BigDecimal for money and won't proceed if your project doesn't compile first.
- skills.sh installs
- 132
- GitHub stars
- 393
- last updated
- Jun 3, 2026
Install
$ npx -y skills add jabrena/cursor-rules-java --skill 122-java-type-design --agent claude-codeInstalls into .claude/skills of the current project.
Files
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
Sponsors
Details
- Repository
- github.com/jabrena/cursor-rules-java
- Categories
- Java & JVM, Design & UI/UX
- First seen
- Jun 3, 2026
More from jabrena/cursor-rules-java
All 16- 144 Java Data Oriented Programming129
- 170 Java Documentation129
- 132 Java Testing Integration Testing128
- 113 Java Maven Documentation125
- 110 Java Maven Best Practices160
- 121 Java Object Oriented Design153
- 124 Java Secure Coding146
- 111 Java Maven Dependencies136
- 125 Java Concurrency135
- 128 Java Generics135
- 141 Java Refactoring With Modern Features135
- 142 Java Functional Programming135
- 131 Java Testing Unit Testing134
- 112 Java Maven Plugins133
- 143 Java Functional Exception Handling133