121-java-object-oriented-design

Installation
SKILL.md

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

Before applying any OOD changes, ensure the project compiles. If compilation fails, stop immediately — do not proceed until resolved. After applying improvements, run full verification.

Installs
193
GitHub Stars
407
First Seen
Mar 3, 2026
121-java-object-oriented-design — jabrena/cursor-rules-java