From java-core
Detects GoF design patterns like Singleton, Builder, Decorator, Strategy in Java code (Java 8+) or recommends patterns for problems with minimal implementations.
npx claudepluginhub ducpm2303/claude-java-plugins --plugin java-coreThis skill uses the workspace's default tool permissions.
Either detect which design patterns are used in the provided code, or recommend the right pattern for a described problem. Tailor all examples to the detected Java version (Java 8+).
Recommends creational, structural, behavioral, and distributed design patterns with implementations, unit tests, and trade-offs; detects anti-patterns like God Object, circular dependencies, and primitive obsession.
Consults design pattern catalog before implementing or refactoring code to check for matching patterns and follow established implementations.
Detects design patterns (Singleton, Factory, Observer) and anti-patterns (God Object, Spaghetti Code) in code. Analyzes implementation quality and provides refactoring recommendations.
Share bugs, ideas, or general feedback.
Either detect which design patterns are used in the provided code, or recommend the right pattern for a described problem. Tailor all examples to the detected Java version (Java 8+).
Scan the code for these common patterns and name them explicitly:
Creational:
volatile or enum)create() or of() returning an interface typeBuilder class with fluent setters and build()Structural:
@Transactional, @Cacheable, @Async are all proxies; flag manual proxies*Adapter or *Wrapper class name)Behavioral:
ApplicationEvent / @EventListener or manual listener listfinal algorithm method calling overridable stepsFor each detected pattern: name it, show the key code that reveals it, explain how it's used here.
When the user describes a problem, recommend the most appropriate pattern:
| Problem | Recommended Pattern |
|---|---|
| Need multiple algorithms interchangeable at runtime | Strategy |
| Object creation is complex, many optional fields | Builder |
| Need to add behaviour without modifying existing class | Decorator |
| Need to notify multiple objects when state changes | Observer |
| Complex subsystem needs a simple interface | Facade |
| Same operation on tree structures | Composite |
| Object has distinct lifecycle states | State |
| Need only one instance globally | Singleton (or Spring @Component) |
Show a minimal Java implementation for the recommended pattern, appropriate for the detected Java version:
Function<T,R>)Mode A: List each detected pattern with: name + location + explanation + any concerns (e.g., non-thread-safe Singleton) Mode B: Recommend pattern + minimal before/after code + when to use vs alternatives
/java-solid to check if patterns are applied correctlyjava-architect agent for full design guidance