/java-core:java-design-pattern [paste code to detect patterns, or describe your problem]from java-core
Detects Gang of Four design patterns in Java code or recommends the right pattern for a given problem. Tailors examples to Java 8+ or 17+.
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.
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 guidanceWhat 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