Skip to content

Commit 323474f

Browse files
ducpm2303claude
andcommitted
feat!: remove java-security, java-testing, java-performance plugins
All three replaced by java-quality plugin. See previous commit for details. BREAKING CHANGE: java-security, java-testing, java-performance no longer exist. Uninstall them and install java-quality: /plugin install java-quality@java-plugins Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent e391fad commit 323474f

18 files changed

Lines changed: 383 additions & 665 deletions

File tree

.claude-plugin/marketplace.json

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,44 +4,30 @@
44
"name": "java-plugins contributors"
55
},
66
"metadata": {
7-
"description": "Java developer toolkit for Claude Code — general Java, Spring Boot, security, testing, and performance",
8-
"version": "2.0.0"
7+
"description": "Java developer toolkit for Claude Code — general Java, Spring Boot, and quality (security + performance + testing)",
8+
"version": "3.0.0"
99
},
1010
"plugins": [
1111
{
1212
"name": "java-core",
1313
"source": "./plugins/java-core",
14-
"description": "General Java skills (review, refactor, explain, fix, docs, health, concurrency, API, migration, commit, SOLID, design patterns, ADR), architect + build-resolver agents, and path-scoped Java coding standards",
15-
"version": "2.0.0",
14+
"description": "General Java skills (review, refactor, explain, fix, docs, health, concurrency, API, migration, commit, SOLID, design patterns, ADR) and architect + build-resolver agents",
15+
"version": "3.0.0",
1616
"keywords": ["java", "core", "review", "refactor", "solid", "design-patterns", "concurrency", "migrate", "adr"]
1717
},
1818
{
1919
"name": "java-spring",
2020
"source": "./plugins/java-spring",
21-
"description": "Spring Boot skills (scaffold, JPA review, logging review, CRUD generator) and Spring expert agent",
22-
"version": "2.0.0",
21+
"description": "Spring Boot skills (scaffold new projects, JPA review, logging review, CRUD generator) and Spring expert agent. Supports Spring Boot 2.7.x through 4.0.x.",
22+
"version": "3.0.0",
2323
"keywords": ["java", "spring", "spring-boot", "scaffold", "jpa", "crud", "logging"]
2424
},
2525
{
26-
"name": "java-security",
27-
"source": "./plugins/java-security",
28-
"description": "Java security reviewer agent and post-edit security hooks",
29-
"version": "2.0.0",
30-
"keywords": ["java", "security", "owasp"]
31-
},
32-
{
33-
"name": "java-testing",
34-
"source": "./plugins/java-testing",
35-
"description": "Java test generation skill and test engineer agent",
36-
"version": "2.0.0",
37-
"keywords": ["java", "testing", "junit", "mockito"]
38-
},
39-
{
40-
"name": "java-performance",
41-
"source": "./plugins/java-performance",
42-
"description": "Java performance reviewer agent",
43-
"version": "2.0.0",
44-
"keywords": ["java", "performance", "jpa", "optimization"]
26+
"name": "java-quality",
27+
"source": "./plugins/java-quality",
28+
"description": "Java quality toolkit — security scan (/java-security-check), performance scan (/java-perf-check), test generation (/java-test), and specialist agents for OWASP, performance, and testing strategy",
29+
"version": "1.0.0",
30+
"keywords": ["java", "security", "owasp", "performance", "testing", "junit", "mockito", "testcontainers"]
4531
}
4632
]
4733
}

README.md

Lines changed: 64 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
# Java Plugins for Claude Code
22

3-
A Claude Code plugin marketplace with 5 independently installable plugins for Java developers.
3+
A Claude Code plugin marketplace with 3 focused plugins for Java developers. All plugins support **Java 8 through Java 21** and tailor advice to your target Java version.
44

55
## Plugins
66

7-
| Plugin | Skills | Agents | Description |
7+
| Plugin | Skills | Agents | Install when |
88
|---|---|---|---|
9-
| `java-core` | `/java-review`, `/java-refactor`, `/java-explain`, `/java-fix`, `/java-docs`, `/java-health`, `/java-concurrency-review`, `/java-api-review`, `/java-migrate`, `/java-commit`, `/java-solid`, `/java-design-pattern`, `/java-adr` | `java-architect`, `java-build-resolver` | General Java — code review, refactoring, explanation, fix, docs, health scoring, concurrency, API design, migration, commits, SOLID, design patterns, ADRs |
10-
| `java-spring` | `/java-scaffold`, `/java-jpa`, `/java-logging`, `/java-crud` | `java-spring-expert` | Spring Boot — scaffolding, JPA review, logging review, CRUD generation |
11-
| `java-security` || `java-security-reviewer` | Security — OWASP Top 10 review and hooks |
12-
| `java-testing` | `/java-test` | `java-test-engineer` | Testing — test generation and strategy |
13-
| `java-performance` || `java-performance-reviewer` | Performance — N+1, memory, threading review |
14-
15-
All plugins support **Java 8 through Java 21** and tailor advice to your target Java version.
9+
| `java-core` | 13 skills | `java-architect`, `java-build-resolver` | Every Java project |
10+
| `java-spring` | 4 skills | `java-spring-expert` | Spring Boot projects |
11+
| `java-quality` | 3 skills | `java-security-reviewer`, `java-performance-reviewer`, `java-test-engineer` | Quality enforcement |
1612

1713
## Installation
1814

@@ -22,77 +18,82 @@ All plugins support **Java 8 through Java 21** and tailor advice to your target
2218
/plugin marketplace add ducpm2303/claude-java-plugins
2319
```
2420

25-
This registers the marketplace once. Claude Code will fetch the plugin catalog from `https://github.com/ducpm2303/claude-java-plugins`.
26-
2721
### Step 2 — Install plugins
2822

29-
Install only what you need:
30-
3123
```shell
32-
/plugin install java-core@java-plugins
33-
/plugin install java-spring@java-plugins
34-
/plugin install java-security@java-plugins
35-
/plugin install java-testing@java-plugins
36-
/plugin install java-performance@java-plugins
24+
/plugin install java-core@java-plugins # every Java project
25+
/plugin install java-spring@java-plugins # Spring Boot projects
26+
/plugin install java-quality@java-plugins # security + performance + testing
3727
```
3828

39-
Or install the full suite at once:
29+
### Updating
4030

4131
```shell
42-
/plugin install java-core@java-plugins && \
43-
/plugin install java-spring@java-plugins && \
44-
/plugin install java-security@java-plugins && \
45-
/plugin install java-testing@java-plugins && \
46-
/plugin install java-performance@java-plugins
32+
/plugin marketplace update java-plugins
4733
```
4834

49-
### Step 3 — Verify installation
35+
---
5036

51-
```shell
52-
/plugin list
53-
```
37+
## Skills (slash commands)
5438

55-
You should see all installed java-* plugins listed.
39+
### java-core
5640

57-
### Updating
41+
| Command | What it does |
42+
|---|---|
43+
| `/java-review` | Review Java code for bugs, naming issues, and version-appropriate idioms |
44+
| `/java-refactor` | Suggest and apply version-gated refactorings |
45+
| `/java-explain` | Explain Java code in plain language |
46+
| `/java-fix` | Diagnose compile errors or stack traces |
47+
| `/java-docs` | Generate Javadoc for classes and methods |
48+
| `/java-health` | Structural health score across Security, Tests, Performance, Quality (A–F) |
49+
| `/java-concurrency-review` | Review thread safety, race conditions, and Java 21 virtual thread compatibility |
50+
| `/java-api-review` | Review REST API design — HTTP methods, status codes, naming, versioning |
51+
| `/java-migrate` | Interactive migration guide: Java 8→11, 11→17, or 17→21 |
52+
| `/java-commit` | Generate a Conventional Commits message for staged Java changes |
53+
| `/java-solid` | Check all 5 SOLID principles with Java-specific patterns |
54+
| `/java-design-pattern` | Detect GoF patterns in code or recommend a pattern for a problem |
55+
| `/java-adr` | Create, list, and manage Architecture Decision Records |
5856

59-
To get the latest plugin versions:
57+
### java-spring
6058

61-
```shell
62-
/plugin marketplace update java-plugins
63-
```
59+
| Command | What it does |
60+
|---|---|
61+
| `/java-scaffold` | Scaffold a brand-new Spring Boot project (2.7.x – 4.0.x) |
62+
| `/java-jpa` | Deep JPA review — N+1 queries, fetch strategies, projections, Specifications |
63+
| `/java-logging` | Review logging — SLF4J, MDC, structured logging, PII safety |
64+
| `/java-crud` | Generate a complete CRUD feature in an existing project |
65+
66+
### java-quality
67+
68+
| Command | What it does |
69+
|---|---|
70+
| `/java-security-check` | Quick OWASP scan — secrets, injection, weak crypto, Spring Security misconfigs |
71+
| `/java-perf-check` | Quick performance scan — N+1, memory, threading, algorithmic hotspots |
72+
| `/java-test` | Generate JUnit 5 + Mockito unit or Testcontainers integration tests (auto-detects project) |
73+
74+
---
6475

65-
## Usage
76+
## Agents
6677

67-
### Skills (slash commands)
68-
| Command | Plugin | What it does |
78+
Agents are specialist sub-agents Claude can delegate to:
79+
80+
| Agent | Plugin | Use for |
6981
|---|---|---|
70-
| `/java-review` | `java-core` | Review Java code for bugs, naming issues, and version-appropriate idioms |
71-
| `/java-refactor` | `java-core` | Suggest and apply version-gated refactorings |
72-
| `/java-explain` | `java-core` | Explain Java code in plain language |
73-
| `/java-fix` | `java-core` | Diagnose compile errors or stack traces |
74-
| `/java-docs` | `java-core` | Generate Javadoc for classes and methods |
75-
| `/java-health` | `java-core` | Score codebase across Security, Tests, Performance, Quality (A–F grades) |
76-
| `/java-concurrency-review` | `java-core` | Review thread safety, race conditions, and Java 21 virtual thread compatibility |
77-
| `/java-api-review` | `java-core` | Review REST API design — HTTP methods, status codes, naming, versioning |
78-
| `/java-migrate` | `java-core` | Interactive migration guide: Java 8→11, 11→17, or 17→21 |
79-
| `/java-commit` | `java-core` | Generate a Conventional Commits message for staged Java changes |
80-
| `/java-solid` | `java-core` | Check all 5 SOLID principles with Java-specific patterns |
81-
| `/java-design-pattern` | `java-core` | Detect GoF patterns in code or recommend a pattern for a problem |
82-
| `/java-adr` | `java-core` | Create, list, and manage Architecture Decision Records |
83-
| `/java-scaffold` | `java-spring` | Scaffold a Spring Boot project or feature |
84-
| `/java-jpa` | `java-spring` | Deep JPA review — N+1 queries, fetch strategies, projections, Specifications |
85-
| `/java-logging` | `java-spring` | Review logging — SLF4J best practices, MDC, structured logging, PII safety |
86-
| `/java-crud` | `java-spring` | Generate a complete CRUD feature (entity, repo, service, controller, DTOs, tests) |
87-
| `/java-test` | `java-testing` | Generate JUnit 5 + Mockito unit or Testcontainers integration tests |
88-
89-
### Agents
90-
Agents are specialist sub-agents Claude can delegate to. Reference them by name in conversation:
91-
- *"Ask the java-architect agent to design a package structure for this domain"*
92-
- *"Use the java-security-reviewer agent to check this controller for OWASP vulnerabilities"*
93-
- *"Have the java-test-engineer agent write a test strategy for this service"*
94-
95-
## Adding a new ecosystem plugin (for contributors)
82+
| `java-architect` | `java-core` | Project structure, hexagonal/layered architecture, multi-module Maven, design patterns |
83+
| `java-build-resolver` | `java-core` | Fix Maven/Gradle/javac build errors with minimal changes |
84+
| `java-spring-expert` | `java-spring` | Spring Boot best practices, Spring Data JPA, Spring Security, REST API design |
85+
| `java-security-reviewer` | `java-quality` | Full OWASP Top 10 deep-dive, Spring Security misconfig, secrets audit |
86+
| `java-performance-reviewer` | `java-quality` | Deep JPA/memory/threading performance analysis with before/after fixes |
87+
| `java-test-engineer` | `java-quality` | Test strategy, coverage analysis, Testcontainers setup, PITest mutation testing |
88+
89+
**Example usage:**
90+
- *"Ask the `java-architect` agent to design a hexagonal architecture for this order service"*
91+
- *"Use the `java-security-reviewer` agent to do a full OWASP audit of this controller"*
92+
- *"Have the `java-test-engineer` agent write a test strategy for this service layer"*
93+
94+
---
95+
96+
## Contributing
9697

9798
1. Create `plugins/java-<ecosystem>/` following the same structure as an existing plugin
9899
2. Add an entry to `.claude-plugin/marketplace.json`

plugins/java-core/.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "java-core",
33
"description": "General Java skills, architect agent, and coding standards for Java 8+",
4-
"version": "2.0.0",
4+
"version": "3.0.0",
55
"author": {
66
"name": "java-plugins contributors"
77
},
Lines changed: 109 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,120 @@
11
---
2-
description: Java system architect — designs project structure, class hierarchies, Maven/Gradle layout, and applies design patterns for Java 8+ projects
2+
description: Java system architect — designs project structure, module layout, class hierarchies, and applies architecture patterns for Java 8+ projects
33
---
44

5-
You are a senior Java software architect with 15 years of experience designing production Java systems. You specialise in:
6-
- Maven and Gradle project structure (single-module and multi-module)
7-
- Object-oriented design: SOLID principles, clean architecture, layered architecture
8-
- Design patterns: Factory, Builder, Strategy, Observer, Repository, Decorator, Proxy, and others from GoF
9-
- Java 8+ features and how they affect design (functional interfaces, streams, Optional)
10-
- Domain-driven design concepts: entities, value objects, repositories, services, aggregates
5+
You are a senior Java software architect with 15 years of experience designing production Java systems. You make opinionated, concrete recommendations — not vague guidance.
116

12-
## How you work
7+
## Always start here
138

14-
**Always start by asking for the Java version.** Check `pom.xml` or `build.gradle` first. If not present, ask: "What Java version are you targeting? This affects which patterns and idioms I'll recommend."
9+
**Detect Java version first.** Check `pom.xml` or `build.gradle`. If not present, ask once: "What Java version are you targeting?" This affects which patterns and idioms you recommend.
1510

16-
**When designing a project structure:**
17-
1. Ask about the domain (what does the system do?)
18-
2. Ask about scale (single service, microservices, monolith?)
19-
3. Ask about persistence (relational DB, NoSQL, in-memory?)
20-
4. Propose a package structure with one-line descriptions of each package's responsibility
21-
5. Define the key interfaces and their relationships before any implementation
11+
---
12+
13+
## Architecture patterns you know deeply
14+
15+
### Layered Architecture (most Spring Boot apps)
16+
```
17+
controller/ ← HTTP boundary: validate input, delegate to service, map to response
18+
service/ ← Business logic: orchestrates, owns transactions
19+
repository/ ← Data access: Spring Data JPA, no business logic
20+
entity/ ← JPA entities: persistence model only
21+
dto/ ← Request/response: never expose entities to the HTTP layer
22+
exception/ ← Custom exceptions + @RestControllerAdvice
23+
```
24+
**Rule:** dependencies flow inward only. Controller → Service → Repository. Never skip layers.
25+
26+
### Hexagonal Architecture (Ports & Adapters)
27+
Use when: the business logic is complex, you need to test it without the framework, or you expect to swap adapters (e.g., REST today, gRPC tomorrow).
28+
```
29+
src/main/java/com/example/
30+
├── domain/ ← pure Java, zero framework imports
31+
│ ├── model/ ← entities, value objects, aggregates
32+
│ ├── port/
33+
│ │ ├── in/ ← use case interfaces (driving ports)
34+
│ │ └── out/ ← repository/notification interfaces (driven ports)
35+
│ └── service/ ← use case implementations
36+
└── adapter/
37+
├── in/
38+
│ └── web/ ← @RestController (calls domain port.in)
39+
└── out/
40+
├── persistence/ ← JpaRepository implementations (implements port.out)
41+
└── messaging/ ← Kafka/SQS adapters
42+
```
43+
**When to avoid:** small CRUD services, prototypes — the extra indirection adds complexity without benefit.
44+
45+
### Multi-module Maven
46+
Use when: you need strong build-time boundary enforcement or you share code across services.
47+
```
48+
parent/
49+
├── pom.xml ← parent pom: dependency management, plugins
50+
├── {name}-domain/ ← pure domain: no Spring, no JPA
51+
│ └── pom.xml ← depends only on domain module
52+
├── {name}-application/ ← use cases, orchestration, Spring @Service
53+
│ └── pom.xml ← depends on domain
54+
├── {name}-infrastructure/ ← JPA, Kafka, Redis adapters
55+
│ └── pom.xml ← depends on application + domain
56+
└── {name}-web/ ← @RestController, Spring Boot main class
57+
└── pom.xml ← depends on application + infrastructure
58+
```
59+
**Benefits:** impossible to accidentally call infrastructure from domain. Build fails if someone tries.
60+
**When to avoid:** teams smaller than ~5 engineers, early-stage products — the overhead slows iteration.
61+
62+
---
63+
64+
## When designing a project structure
2265

23-
**When designing a class hierarchy:**
24-
1. Identify whether inheritance or composition is appropriate (prefer composition)
25-
2. Define interfaces before classes
26-
3. Apply the Dependency Inversion Principle: depend on abstractions, not concretions
27-
4. Show a minimal example of how the classes interact
66+
1. Ask: what does the system do, and what is the scale? (CRUD service / domain-heavy / microservice?)
67+
2. Ask: single module or multi-module? (teams > 5, complex domain → multi-module)
68+
3. Recommend the simplest architecture that fits. Layered first; hexagonal only when justified.
69+
4. Show the package tree with one-line descriptions per package
70+
5. Define key interfaces before any implementation
71+
72+
## When designing class hierarchies
73+
74+
1. Prefer **composition over inheritance** — flag any `extends` that could be `has-a`
75+
2. Define interfaces before concrete classes
76+
3. Apply Dependency Inversion: depend on abstractions (`UserRepository`, not `UserJpaRepository`)
77+
4. Show a minimal interaction example:
78+
```java
79+
// Define the port
80+
public interface OrderRepository {
81+
Order findById(OrderId id);
82+
void save(Order order);
83+
}
84+
85+
// Domain service depends on the port, not the JPA impl
86+
public class OrderService {
87+
private final OrderRepository orders; // injected
88+
89+
public void confirmOrder(OrderId id) {
90+
Order order = orders.findById(id);
91+
order.confirm();
92+
orders.save(order);
93+
}
94+
}
95+
```
96+
97+
## When recommending design patterns
2898

29-
**When recommending design patterns:**
3099
- Name the pattern explicitly
31-
- Explain why it fits this specific problem
32-
- Show a minimal Java implementation appropriate for the target Java version
33-
- Note version-gated alternatives (e.g., sealed classes for ADTs on Java 17+)
100+
- Explain WHY it fits this specific problem (not just what it is)
101+
- Show the minimum Java implementation for the target version:
102+
- Java 8+: lambdas for Strategy, method references for Command
103+
- Java 17+: sealed classes + pattern matching for Visitor/ADT patterns
104+
- Java 21+: virtual threads change threading patterns — `Executors.newVirtualThreadPerTaskExecutor()`
105+
- Flag when a simpler approach is better than a pattern
34106

35107
## Output style
36-
- Prefer diagrams as ASCII art or structured lists over prose descriptions
37-
- Show package/class structure as a tree
38-
- Include brief comments explaining each component's responsibility
39-
- Keep examples minimal — show the shape, not a full implementation
40-
41-
## Constraints
42-
- Never recommend patterns that add complexity without clear benefit
43-
- Always explain trade-offs when presenting alternatives
44-
- Flag when a simpler approach (e.g., a plain class with static methods) is better than a pattern
108+
109+
- ASCII trees for package/module structure
110+
- Sequence diagrams as numbered steps when showing interactions
111+
- Short code snippets showing the *shape* — not full implementations
112+
- Always state trade-offs when presenting alternatives
113+
- Flag accidental complexity: if the design has more abstraction layers than the problem warrants, say so
114+
115+
## Hard rules
116+
117+
- Never recommend a pattern that adds complexity without a clear, named benefit
118+
- Never show field injection (`@Autowired` on fields) — always constructor injection
119+
- Always flag circular dependencies between modules or packages
120+
- For multi-module: the domain module must have zero Spring/JPA/framework imports

0 commit comments

Comments
 (0)