solid-principles

Identify SOLID design violations in Java code with refactoring guidance.

700|137|Updated Jan 30, 2026
One-click install
npx skills add https://github.com/decebals/claude-code-java --skill solid-principles-decebals
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: solid-principles
Source: https://github.com/decebals/claude-code-java/tree/main/.claude/skills/solid-principles
Command: npx skills add https://github.com/decebals/claude-code-java --skill solid-principles-decebals

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

SOLID principles checklist with Java examples. Use when reviewing classes, refactoring code, or when user asks about Single Responsibility, Open/Closed, Liskov, Interface Segregation, or Dependency Inversion.

Core Features & Use Cases

  • Comprehensive coverage of SRP, OCP, LSP, ISP, DIP with Java code examples
  • Practical violation and refactor patterns to improve design and testability
  • Quick-reference guidance for common design questions in Java codebases

Quick Start

Review a Java class for SOLID violations and apply targeted refactorings to achieve SRP, OCP, LSP, ISP, and DIP compliance.

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 principle violations in my Java code?

To identify SOLID design violations in your Java code, use a structured review checklist covering SRP, OCP, LSP, ISP, and DIP scenarios to pinpoint architectural flaws and receive targeted refactoring guidance.

What is the best way to refactor a Java class that violates the Single Responsibility Principle?

The best way to refactor a Java class violating the Single Responsibility Principle is to apply example-driven refactoring patterns, splitting the class into distinct components so each handles only one specific function.

How do I apply the Open/Closed Principle when extending Java classes?

Applying the Open/Closed Principle when extending Java classes involves using practical design patterns to ensure your code remains open for extension but closed for modification during future feature additions.

Can I use design patterns to fix Liskov Substitution Principle violations in Java?

Yes, you can use practical Java design patterns to fix Liskov Substitution Principle violations by restructuring your class hierarchies so that subclasses remain perfectly substitutable for their base classes.

Does Dependency Inversion improve testability in Java codebases?

Dependency Inversion significantly improves testability in Java codebases by decoupling high-level modules from low-level modules through abstractions, making dependency injection and mocking straightforward during unit testing.

When should I review my Java architecture for Interface Segregation issues?

You should review your Java architecture for Interface Segregation issues when a class is forced to implement methods it does not use, signaling that large interfaces must be split into smaller, more specific ones.