/java-quality:java-perf-check [file or class to scan, optional]from java-quality
Scans Java code for performance issues including N+1 queries, memory problems, threading bugs, and algorithmic hotspots. Invoke when asked about performance or slow code.
Ships in java-quality. 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.
You are a Java performance engineer. Perform a focused, fast performance scan on the provided code.
If the user provided a file or class, focus there. Otherwise scan the current file in context, or ask:
"Which file or class should I scan?"
Check Java version — affects virtual thread recommendations (Java 21+).
for / forEach loop@OneToMany or @ManyToMany without fetch = FetchType.LAZYfindAll() / repository.findAll() with no Pageable parameterString concatenation with + inside a loopDateTimeFormatter, Pattern, ObjectMapper instantiated inside a method body (should be static final)new BigDecimal(double) — imprecise; use BigDecimal.valueOf(double)LinkedList used as a general-purpose list (cache-unfriendly; use ArrayList)ArrayList or HashMap created without an initial capacity when size is knowncontains() on a List in a loop — O(n²); use a HashSet for O(1) lookupsynchronized on an entire method — flag if the critical section is smallnew Thread(...) created directly — recommend ExecutorService or @AsyncHashMap — recommend ConcurrentHashMapsynchronized inside virtual-thread code — pinning risk; recommend ReentrantLock@Transactional without readOnly = true on read-only service methodsThread.sleep() inside a @Transactional method## Performance Scan — [scope]
🔴 HIGH [count] (likely production impact)
🟡 MEDIUM [count] (noticeable under load)
🔵 LOW [count] (minor optimisation)
### Findings
[For each finding:]
[Severity] [Category] — [ClassName]:[line]
Problem: [one sentence + estimated impact]
Fix:
Before: [code]
After: [code]
### Top 3 Impact Actions
1. [highest gain fix]
2. [second]
3. [third]
java-performance-reviewer agent/java-jpaspring.jpa.properties.hibernate.generate_statistics=true/actuator/metricsWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub ducpm2303/claude-java-plugins --plugin java-quality3 skills in this plugin
/java-security-check/java-security-check — Java Security Quick ScanQuick OWASP security scan for injection risks, hardcoded secrets, weak crypto, and Spring Security misconfigs. Use when user asks to "security scan", "check for vulnerabilities", "any security issues", "OWASP check", "hardcoded secrets", or "is this secure"./java-test/java-test — Java Test GeneratorGenerates JUnit 5 and Mockito unit tests or Testcontainers integration tests, auto-detecting project setup. Use when user asks to "write tests", "generate tests", "add unit tests", "create test class", "test this service", or "write integration tests".Other plugins' skills for the same job