121-java-object-oriented-design

Installation
SKILL.md

Java Object-Oriented Design Guidelines

Review and improve Java code using comprehensive object-oriented design guidelines and refactoring practices.

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: The reference is organized by examples (good/bad code patterns) for each core area. Apply recommendations based on applicable examples.

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.

Related skills

More from jabrena/cursor-rules-java

Installs
110
GitHub Stars
380
First Seen
Mar 3, 2026