Source profileQuality 89/100

jabrena/plinth/skills/121-java-object-oriented-design/SKILL.md

121-java-object-oriented-design

Use when reviewing, improving, or refactoring Java object-oriented design, including applying SOLID, DRY, or YAGNI; improving classes and interfaces; correcting encapsulation, inheritance, or polymorphism; resolving God Class, Feature Envy, or Data Clumps; and improving object creation, methods, or exception contracts. Triggers include review Java OOD, refactor Java OOD, improve Java OOD, fix OOP misuse, and identify Java code smells. Part of Plinth Toolkit

Source repository stars
423
Declared platforms
0
Static risk flags
0
Last source update
2026-08-02
Source checked
2026-08-04

Decision brief

What it does—and where it fits

Review and improve Java code using focused object-oriented design references selected after assessing the request and affected code.

Best for

  • Review Java code for object-oriented design
  • Refactor Java code for object-oriented design
  • Improve Java code for object-oriented design

Not for

  • Tasks that require unconfirmed production actions or broad system permissions.
  • Environments where the pinned source and install steps cannot be inspected.

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/jabrena/plinth --skill "skills/121-java-object-oriented-design"
Safe inspection promptEditorial

Inspect the Agent Skill "121-java-object-oriented-design" from https://github.com/jabrena/plinth/blob/fdaf68ccf0ffc4fb6147dc4ab805c34841ffaf33/skills/121-java-object-oriented-design/SKILL.md at commit fdaf68ccf0ffc4fb6147dc4ab805c34841ffaf33. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Workflow

    1. Compile project before OOD changes

    Compile project before OOD changesAssess code and classify OOD concernsFundamental principles: SOLID, DRY, or YAGNI violations.
  2. 02

    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.

    MANDATORY: Run ./mvnw compile or mvn compile before applying any changeSAFETY: If compilation fails, stop immediately and do not proceed — compilation failure is a blocking conditionVERIFY: Run ./mvnw clean verify or mvn clean verify after applying improvements
  3. 03

    When to use this skill

    Review Java code for object-oriented design

    Review Java code for object-oriented designRefactor Java code for object-oriented designImprove Java code for object-oriented design

Permission review

Static risk signals and limitations

No configured static risk pattern was detected

This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score89/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars423SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
jabrena/plinth
Skill path
skills/121-java-object-oriented-design/SKILL.md
Commit
fdaf68ccf0ffc4fb6147dc4ab805c34841ffaf33
License
Apache-2.0
Collected
2026-08-04
Default branch
main
View the original 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.

  • MANDATORY: Run ./mvnw compile or mvn compile before applying any change
  • SAFETY: If compilation fails, stop immediately and do not proceed — compilation failure is a blocking condition
  • VERIFY: Run ./mvnw clean verify or mvn clean verify after applying improvements
  • PROGRESSIVE DISCLOSURE: Classify the applicable OOD concerns before reading references, then read only the references mapped to those concerns
  • MULTI-CONCERN CHANGES: Read multiple focused references only when the request or diagnosed code problems cross concern boundaries
  • PRESERVE BEHAVIOR: Apply focused, incremental refactorings without changing observable business behavior
  • INCREMENTAL SAFETY: Compile after each significant refactoring and keep changes easy to revert if validation reveals a regression
  • DEPENDENCY SAFETY: Confirm refactoring does not break imports, dependencies, class relationships, or established contracts
  • ADJACENT SKILLS: Use skill 122 for dedicated type-design work and skill 126 for dedicated exception-handling work; use the overlapping skill 121 references only when those topics are part of a broader OOD review
  • EDGE CASE: If request scope is ambiguous, stop and ask a clarifying question before applying changes
  • EDGE CASE: If required inputs, files, or tooling are missing, report what is missing and ask whether to proceed with setup guidance

When to use this skill

  • Review Java code for object-oriented design
  • Refactor Java code for object-oriented design
  • Improve Java code for object-oriented design
  • Fix OOP concept misuse in Java code
  • Identify and resolve code smells in Java code
  • Improve object creation patterns in Java code
  • Improve method design in Java code
  • Improve exception handling in Java code

Workflow

  1. Compile project before OOD changes

Run ./mvnw compile or mvn compile and stop immediately if compilation fails.

  1. Assess code and classify OOD concerns

Analyze the request and affected Java code before reading implementation guidance. Classify each relevant problem into one or more concerns:

  • Fundamental principles: SOLID, DRY, or YAGNI violations.
  • Core OOP concepts: encapsulation, inheritance, or polymorphism misuse.
  • Code smells: God Class, Feature Envy, Inappropriate Intimacy, Refused Bequest, Shotgun Surgery, or Data Clumps.
  • Object creation: factories, builders, singletons, dependency injection, or unnecessary object creation.
  • Classes and interfaces: accessibility, public fields, mutability, composition, or inheritance design.
  • Enums and annotations: int constants, ordinals, bit fields, ordinal indexing, or missing @Override.
  • Methods: parameter validation, defensive copies, signatures, null collections, or Optional.
  • Exceptions: exception contracts that are part of the broader OOD review.

If the request is dedicated type-design work, use skill 122. If it is dedicated exception-handling work, use skill 126.

  1. Read only applicable OOD references

Map the classified concerns to focused references:

  • For SOLID, DRY, or YAGNI, read references/121-java-object-oriented-design-principles.md.
  • For encapsulation, inheritance, or polymorphism, read references/121-java-object-oriented-design-oop-concepts.md.
  • For object-oriented code smells, read references/121-java-object-oriented-design-code-smells.md.
  • For factories, builders, singletons, dependency injection, or unnecessary objects, read references/121-java-object-oriented-design-object-creation.md.
  • For class and interface boundaries, accessibility, mutability, composition, or inheritance design, read references/121-java-object-oriented-design-classes-interfaces.md.
  • For enums, ordinals, bit fields, enum lookup, or @Override, read references/121-java-object-oriented-design-enums-annotations.md.
  • For method contracts, validation, defensive copies, signatures, collection returns, or Optional, read references/121-java-object-oriented-design-methods.md.
  • For exception contracts within a broader OOD review, read references/121-java-object-oriented-design-exceptions.md.

Read every reference required by a cross-concern refactoring, but do not read unrelated references.

  1. Apply focused refactorings

Prioritize findings by impact: CRITICAL, MAINTAINABILITY, FLEXIBILITY, or CODE_QUALITY. Apply the smallest suitable refactoring for each diagnosed concern while preserving observable behavior:

  • Extract classes or methods to restore focused responsibilities.
  • Introduce or refine abstractions for extension, interface segregation, and dependency inversion.
  • Correct inheritance hierarchies to preserve substitutability, or replace inheritance with composition.
  • Move behavior to eliminate Feature Envy and improve encapsulation.
  • Introduce cohesive value or parameter objects for Data Clumps.
  • Hide exposed state and reduce unnecessary coupling.

Apply changes incrementally and compile after each significant refactoring.

  1. Verify with full build

Run ./mvnw clean verify or mvn clean verify after applying improvements.

  1. Report applied OOD improvements

Report findings by impact and concern, focused references used, refactorings applied, maintainability/flexibility/testability benefits, behavior-preservation evidence, and the final compilation and test result.

Reference

For detailed guidance, examples, and constraints, see:

Alternatives

Compare before choosing

Computed 9929,558

HKUDS/Vibe-Trading

strategy-generate

Create, modify, and optimize quantitative trading strategies, then backtest and evaluate them.

Computed 97106

AI-Unified-Process/marketplace

browserless-test

Creates Vaadin Browserless server-side unit tests for Vaadin views covering navigation, component interactions, form validation, grid operations, and notifications. Use when the user asks to "write Browserless tests", "write Vaadin UI unit tests", "unit test a Vaadin view without a browser", "create view tests with the official Vaadin testing framework", or mentions Browserless testing, SpringBrowserlessTest, browserless-test-junit6, UI Unit Testing, or server-side Vaadin testing.

Computed 9723

freenet/freenet-agent-skills

dapp-builder

Build and maintain decentralized applications on Freenet using river as a template. Guides through designing contracts (shared state), delegates (private state), and UI, and through upgrading a live dApp safely. Use when user wants to create a new Freenet dApp, design contract state, implement delegates, build a Freenet-connected UI, OR upgrade an existing dApp — bump freenet-stdlib, ship a new contract/delegate version (v2), fix a bug that re-keys the WASM, or migrate state across a contract/de

Computed 976

mgiovani/cc-arsenal

team-review

Multi-agent review team: architecture, security, performance, testing, style, docs/UX, plus an adversary that cross-examines the other 6, for security-sensitive, architectural, or large PRs (15+ files) where a single-agent pass risks missing cross-cutting issues. Use for auth/payments/PII changes, schema/pattern changes, compliance sign-off, or when asked to 'get the review team on this' / 'multi-agent review' / 'thorough review before merge'. For a standard PR or a quick pre-merge check, use /r