Skip to content

Commit 7e69262

Browse files
ducpm2303claude
andcommitted
feat: improve skill UX and add v2.2.0 improvements
- Add explicit trigger phrases to all skill descriptions for better auto-invocation - Add allowed-tools frontmatter to read-only skills (review, explain, health, etc.) - Add SessionStart hook to java-core (detects Java version on session open) - Add PreToolUse and Stop hooks to java-quality (warns on dangerous commands, reminds to run tests) - Refactor java-crud SKILL.md: move inline templates to references/templates.md - Refactor java-scaffold SKILL.md: move inline templates to references/templates.md - Bump all plugins to v2.2.0 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 65e1739 commit 7e69262

28 files changed

Lines changed: 490 additions & 525 deletions

File tree

.claude-plugin/marketplace.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,28 @@
55
},
66
"metadata": {
77
"description": "Java developer toolkit for Claude Code — general Java, Spring Boot, and quality (security + performance + testing)",
8-
"version": "2.1.0"
8+
"version": "2.2.0"
99
},
1010
"plugins": [
1111
{
1212
"name": "java-core",
1313
"source": "./plugins/java-core",
1414
"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": "2.1.0",
15+
"version": "2.2.0",
1616
"keywords": ["java", "core", "review", "refactor", "solid", "design-patterns", "concurrency", "migrate", "adr"]
1717
},
1818
{
1919
"name": "java-spring",
2020
"source": "./plugins/java-spring",
2121
"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": "2.1.0",
22+
"version": "2.2.0",
2323
"keywords": ["java", "spring", "spring-boot", "scaffold", "jpa", "crud", "logging"]
2424
},
2525
{
2626
"name": "java-quality",
2727
"source": "./plugins/java-quality",
2828
"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",
29+
"version": "2.2.0",
3030
"keywords": ["java", "security", "owasp", "performance", "testing", "junit", "mockito", "testcontainers"]
3131
}
3232
]

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.1.0",
4+
"version": "2.2.0",
55
"author": {
66
"name": "java-plugins contributors"
77
},

plugins/java-core/hooks/hooks.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
{
22
"hooks": {
3+
"SessionStart": [
4+
{
5+
"hooks": [
6+
{
7+
"type": "command",
8+
"command": "echo '[java-core] Detecting Java project...' && (cat pom.xml 2>/dev/null | grep -E '<java.version>|<maven.compiler.source>' | head -2 || cat build.gradle 2>/dev/null | grep -E 'sourceCompatibility|JavaVersion' | head -2 || echo '[java-core] No build file found — ask user for Java version if needed.')"
9+
}
10+
]
11+
}
12+
],
313
"PostToolUse": [
414
{
515
"matcher": "Write|Edit",

plugins/java-core/skills/java-adr/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: Create, list, or update Architecture Decision Records (ADRs) for your Java project
2+
description: Creates, 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".
33
argument-hint: "[new <title> | list | show <id> | supersede <id> <title>]"
44
---
55

plugins/java-core/skills/java-api-review/SKILL.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
2-
description: Review Java REST API design HTTP status codes, naming, pagination, versioning, error responses, and validation
2+
description: Reviews 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".
33
argument-hint: "[paste controller or API code]"
4+
allowed-tools: Read, Grep, Glob
45
---
56

67
Review the REST API design of the provided Java controller or endpoint code. Detect Spring Boot version from `pom.xml` to tailor advice.

plugins/java-core/skills/java-commit/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: Generate a meaningful git commit message based on the Java files changed
2+
description: Generates a Conventional Commits message for staged Java changes. Use when user asks to "write a commit message", "help me commit", "what should my commit say", "summarize my changes", "draft a commit", or "create commit message".
33
argument-hint: "[leave empty to use git diff, or describe the change]"
44
---
55

plugins/java-core/skills/java-concurrency-review/SKILL.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
2-
description: Review Java code for thread safety issues, race conditions, deadlocks, and concurrency anti-patterns
2+
description: Reviews Java code for thread safety, race conditions, deadlocks, and Java 21 virtual thread compatibility. Use when user asks to "review concurrency", "is this thread safe", "check for race conditions", "concurrency issues", or "virtual thread compatible".
33
argument-hint: "[paste concurrent code or select in editor]"
4+
allowed-tools: Read, Grep, Glob
45
---
56

67
Review the Java code for concurrency correctness. Before reviewing, detect the Java version from `pom.xml` or `build.gradle` — suggest modern alternatives only if the version supports them.

plugins/java-core/skills/java-design-pattern/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: Detect design patterns in Java code, or suggest the right pattern for a given problem
2+
description: Detects GoF patterns in Java code or recommends the right pattern for a problem. Use when user asks to "what pattern is this", "detect design patterns", "suggest a pattern", "should I use factory", "which design pattern", or "recommend a pattern for".
33
argument-hint: "[paste code to detect patterns, or describe your problem]"
44
---
55

plugins/java-core/skills/java-docs/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: Generate Javadoc comments for selected Java classes and methods
2+
description: Generates Javadoc comments for Java classes and methods. Use when user asks to "add javadoc", "document this class", "write documentation", "add comments", "generate docs", or "document this method".
33
argument-hint: "[paste code or select in editor]"
44
---
55

plugins/java-core/skills/java-explain/SKILL.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
2-
description: Explain selected Java code in plain language, including design patterns and idioms used
2+
description: Explains Java code in plain language including design patterns. Use when user asks to "explain this code", "what does this do", "help me understand", "walk me through this", or "how does this work".
33
argument-hint: "[paste code or select in editor]"
4+
allowed-tools: Read, Grep, Glob
45
---
56

67
Explain the Java code I've selected or provided. Tailor the explanation to what the code actually does — avoid generic descriptions.

0 commit comments

Comments
 (0)