
121 Java Object Oriented Design
This is a refactoring aid that runs your Java code through an OOD quality check before making any changes. It enforces compilation as a safety gate, then applies SOLID principles, fixes code smells like God Class and Feature Envy, and improves patterns around object creation, method signatures, and exception handling. The workflow is deliberate: compile first, read the reference guide for good and bad patterns, apply focused refactorings, then verify with a full Maven build. It's built for systematic cleanup work rather than greenfield development, and the hard stop on compilation failures keeps you from digging deeper holes. Part of the cursor-rules-java project by Juan Antonio Breña Moral.
- skills.sh installs
- 153
- GitHub stars
- 393
- last updated
- Jun 3, 2026
Install
$ npx -y skills add jabrena/cursor-rules-java --skill 121-java-object-oriented-design --agent claude-codeInstalls into .claude/skills of the current project.
Files
Java Object-Oriented Design Guidelines
Review and improve Java code using focused object-oriented design references selected after assessing the request and affected code.
What is covered in this Skill?
- Fundamental design principles (SOLID, DRY, YAGNI)
- Class and interface design: composition over inheritance, immutability, accessibility minimization, accessor methods
- Core OOP concepts: encapsulation, inheritance, polymorphism
- Object creation patterns: static factory methods, Builder, Singleton, dependency injection, avoiding unnecessary objects
- OOD code smells: God Class, Feature Envy, Inappropriate Intimacy, Refused Bequest, Shotgun Surgery, Data Clumps
- Method design: parameter validation, defensive copies, careful signatures, empty collections over nulls, Optional usage
- Exception handling: checked vs. runtime exceptions, standard exceptions, failure-capture messages, no silent ignoring
Scope: Classify the applicable OOD concerns first, then load only the focused references needed for those concerns. Load multiple references when a refactoring crosses concern boundaries.
Constraints
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- 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
- 122 Java Type Design132
- 144 Java Data Oriented Programming129
- 170 Java Documentation129
- 132 Java Testing Integration Testing128
- 113 Java Maven Documentation125
- 110 Java Maven Best Practices160