/java-core:java-solid [paste class or paste multiple related classes]from java-core
Reviews Java code for SOLID principle violations (single responsibility, open/closed, Liskov, interface segregation, dependency inversion) with Java-specific patterns and refactoring suggestions.
Ships in java-core. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Review the provided Java code for SOLID principles violations. For each principle, check for violations and suggest targeted improvements. Tailor suggestions to the detected Java version.
A class should have one reason to change.
Violations to flag:
*Manager, *Helper, *Utils with more than 3 unrelated methodsFix pattern: Extract each responsibility into its own class. Show the split.
Open for extension, closed for modification.
Violations to flag:
if/else or switch chains on type/status that would require modification to add new typesFix pattern: Introduce Strategy, Template Method, or polymorphism. Show the refactoring.
Subtypes must be substitutable for their base types.
Violations to flag:
UnsupportedOperationExceptionFix pattern: Use composition over inheritance, or restructure the hierarchy.
Clients should not depend on interfaces they don't use.
Violations to flag:
implements classes that leave methods empty or throw UnsupportedOperationExceptionFix pattern: Split the fat interface into focused role interfaces.
Depend on abstractions, not concretions.
Violations to flag:
new UserServiceImpl) instead of an interface (UserService)new ConcreteClass() inside business logic instead of dependency injection@Autowired on a concrete class field instead of an interfaceFix pattern: Introduce interface + constructor injection. Show the change.
For each violation:
End with: SOLID Score — how many of the 5 principles are cleanly satisfied (e.g., "3/5 — S, I, D pass; O and L need attention").
/java-design-pattern to find the right pattern/java-refactor to extract interfaces/java-refactor to split classesWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub ducpm2303/claude-java-plugins --plugin java-core14 skills in this plugin
/java-adr/java-adr — Architecture Decision RecordsCreates, lists, and manages Architecture Decision Records for Java projects. Use when user asks to "create an ADR", "document this decision", "write an architecture decision", "add ADR", "list decisions", "show ADRs", or "record this architectural choice"./java-api-reviewStep 1 — HTTP method and status code correctnessReviews Java REST API design including HTTP methods, status codes, naming, and versioning. Use when user asks to "review my API", "check REST design", "is this good REST", "review endpoints", "API design review", "check my controller", or "review HTTP API"./java-Other plugins' skills for the same job