solid-principles

Identify SOLID violations in Java code and propose targeted refactoring guidance.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

SOLID principles checklist with detailed Java examples to help teams review class design and guide principled refactoring.

Core Features & Use Cases

  • Structured guidance on SRP, OCP, LSP, ISP, and DIP with practical Java snippets.
  • Detection prompts, refactoring patterns, and best-practice checks to boost code quality.
  • Useful during code reviews, design discussions, and onboarding for clean architecture concepts.

Quick Start

Review a Java class for SOLID violations and propose targeted refactors aligned to SRP, OCP, LSP, ISP, and DIP.

Frequently Asked Questions about solid-principles

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

FAQPage Schema
How do I identify SOLID violations in Java code during a code review?

To identify SOLID violations in Java code, use structured detection prompts for SRP, OCP, LSP, ISP, and DIP during reviews. This process highlights design flaws and provides targeted refactoring examples using modern patterns.

What are the best practices for refactoring Java code to fix LSP and ISP violations?

Best practices for refactoring LSP and ISP violations involve applying Java 17+ patterns like sealed types and splitting large interfaces. This ensures code conforms to SOLID principles through targeted structural improvements.

How does composition over inheritance apply to Open/Closed Principle design in Java?

Composition over inheritance supports the Open/Closed Principle in Java by allowing behavior extension without modifying existing classes. This refactoring pattern uses modern Java features to achieve flexible architecture.

When should I check Single Responsibility Principle violations in my Java classes?

You should check Single Responsibility Principle violations in Java classes during code reviews, design discussions, and onboarding. Assessing SRP early prevents complex architectures and guides principled refactoring.