design-smell-detection

Analyze Java/Spring code to detect design smells and propose minimal refactors.

1|Updated May 30, 2025
One-click install
npx skills add https://github.com/mzffreyvazov/yt-to-spotify2 --skill design-smell-detection
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: design-smell-detection
Source: https://github.com/mzffreyvazov/yt-to-spotify2/tree/main/.agents/skills/design-smell-detection
Command: npx skills add https://github.com/mzffreyvazov/yt-to-spotify2 --skill design-smell-detection

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Identify and refactor architectural and domain-model design smells in Java and Spring applications to improve maintainability, correctness, and evolution.

Core Features & Use Cases

  • Review code for smells such as volatile derivatives, primitive obsession, anemic domain models, feature envy, and temporal coupling.
  • Propose minimal, safe refactors that strengthen domain boundaries and invariants.
  • Use during architecture reviews, legacy refactors, and when designing entities or value objects.

Quick Start

Analyze a Java/Spring project to detect design smells and propose minimal, safe refactors.

Frequently Asked Questions about design-smell-detection

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I detect an anemic domain model in a Spring application?

To detect an anemic domain model in a Spring application, analyze the Java code for design smells where domain objects contain only data without behavior. This identifies weak domain boundaries and prescribes minimal refactors to strengthen invariants.

What is primitive obsession and how do I refactor it in Java?

Primitive obsession in Java is a design smell where primitives represent domain concepts instead of value objects. Code analysis identifies these violations and suggests safe refactoring to strengthen domain boundaries and improve modularity.

How do I fix feature envy and temporal coupling during legacy refactoring?

Fixing feature envy and temporal coupling during legacy refactoring involves analyzing code dependencies to isolate behaviors that belong to external classes. It proposes minimal, safe refactors to realign responsibilities and reduce temporal constraints.

Can I use code review analysis to identify volatile derivatives in Java?

Yes, you can use code review analysis to identify volatile derivatives in Java by scanning for unstable calculated values within domain models. The analysis flags these design smells and prescribes safe architectural improvements.

What is the best way to improve modularity when designing Spring entities?

The best way to improve modularity when designing Spring entities is to analyze them for architectural design smells like primitive obsession and anemic models. This guides minimal refactoring to enforce domain invariants and strengthen boundaries.