A focused toolkit for JVM performance work that covers the essentials: GC tuning presets for different scenarios (G1, ZGC, Serial), profiling commands using jstack and jmap, and JMH benchmarking setup. The quick reference format is solid here because performance tuning is usually urgent and you need the right flags fast. It's bonded as a secondary skill to an advanced Java agent, which makes sense since you're typically optimizing existing code rather than writing from scratch. The GC comparison table is genuinely useful for deciding between collectors based on your heap size and latency requirements. Most valuable when you're facing memory leaks, GC pauses, or need to optimize container deployments where resource constraints matter.

skills.sh installs
488
GitHub stars
42
last updated
Aug 21, 2026

Install

$ npx -y skills add pluginagentmarketplace/custom-plugin-java --skill java-performance --agent claude-code

Installs into .claude/skills of the current project.

Files

Java Performance Skill

Optimize JVM performance through profiling, GC tuning, and memory analysis.

Overview

This skill covers JVM performance optimization including garbage collection tuning, memory analysis, CPU profiling, and benchmarking with JMH.

When to Use This Skill

Use when you need to:

  • Tune GC for low latency or throughput
  • Profile CPU hotspots
  • Analyze memory leaks
  • Benchmark code performance
  • Optimize container settings

Quick Reference

GC Presets

# High-throughput
-XX:+UseG1GC
-XX:MaxGCPauseMillis=200
-Xms4g -Xmx4g
-XX:+AlwaysPreTouch

# Low-latency
-XX:+UseZGC
-XX:+ZGenerational
-Xms8g -Xmx8g

# Memory-constrained
-XX:+UseSerialGC
-Xms512m -Xmx512m
-XX:+UseCompressedOops

# Container-optimized
-XX:+UseContainerSupport
-XX:MaxRAMPercentage=75.0
-XX:+ExitOnOutOfMemoryError

Profiling Commands

# Thread dump
jstack -l <pid> > threaddump.txt

# Heap dump
jmap -dump:format=b,file=heap.hprof <pid>

# GC analysis
jstat -gcutil <pid> 1000 10

# Flight recording
jcmd <pid> JFR.start duration=60s filename=app.jfr

# Async profiler
./profiler.sh -d 30 -f profile.html <pid>

JMH Benchmark

Sponsors

Details

Repository
github.com/pluginagentmarketplace/custom-plugin-java
Categories
Debugging, Java & JVM
First seen
Jun 3, 2026

More from pluginagentmarketplace/custom-plugin-java

All 12

Recommended

More Debugging
1aj-geddes avatarprofiling-optimizationaj-geddes/useful-ai-promptsProfile application performance, identify bottlenecks, and optimize hot paths using CPU profiling, flame graphs, and benchmarking. Use when investigating perfor456skills.sh installs
2maxnorm avatarmagento-performance-analystmaxnorm/magento2-agent-skillsConducts comprehensive Magento 2 performance analysis and optimization. Use when analyzing performance bottlenecks, profiling applications, optimizing database 434skills.sh installs
3levnikolaevich avatarln-772-error-handler-setuplevnikolaevich/claude-code-skillsConfigures global exception handling middleware. Use when adding centralized error handling to .NET or Python backends.382skills.sh installs
4gohypergiant avataraccelint-ts-performancegohypergiant/agent-skillsSystematic JavaScript/TypeScript performance audit and optimization using V8 profiling and runtime patterns. Use when (1) Users say 'optimize performance', 'aud347skills.sh installs
5davila7 avatargh-fix-cidavila7/claude-code-templatesInspect GitHub PR checks with gh, pull failing GitHub Actions logs, summarize failure context, then create a fix plan and implement after user approval. Use whe325skills.sh installs
6rstackjs avatarrspack-debuggingrstackjs/agent-skillsHelps Rspack users and developers debug crashes or deadlocks/hangs in the Rspack build process using LLDB. Use this Skill when users encounter "Segmentation fau277skills.sh installs