# java-performance

A skill that hands your agent JVM tuning recipes: GC selection, CPU profiling, heap analysis and JMH benchmarks.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 482 installs · ★ 41
- Author: pluginagentmarketplace
- License: LicenseRef-Proprietary · policy=link-only · description only; the file stays with the author
- Source: https://github.com/pluginagentmarketplace/custom-plugin-java/tree/HEAD/skills/java-performance/SKILL.md
- Updated: 2026-01-05
- HTML: https://affpapa.org/en/nevibecode/skills/java-performance

## What it does

The skill packages JVM performance work into presets your agent can apply. Four flag sets cover high throughput, low latency, memory-constrained and container-optimized runs, each with its own garbage collector and heap settings.

Diagnostics come as ready commands: thread dumps with `jstack`, heap dumps with `jmap`, GC stats with `jstat`, flight recordings with `jcmd`, and Async Profiler. A comparison table lines up G1, ZGC, Shenandoah and Parallel by latency, throughput and heap size, and a troubleshooting table maps symptoms like GC thrashing or memory leaks to likely causes.

The skill takes a `focus` parameter with values `gc`, `memory`, `cpu` or `profiling`, and it is bonded as a secondary skill to the `02-java-advanced` subagent. Benchmarks assume JMH, using `@BenchmarkMode`, `@Warmup` and `@Measurement`. Tuning flags only pay off once you know what is actually slow, so expect to read a dump or two before changing anything.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add pluginagentmarketplace/custom-plugin-java --skill java-performance -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/java-performance/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/java-performance/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add pluginagentmarketplace/custom-plugin-java --skill java-performance -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/java-performance/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add pluginagentmarketplace/custom-plugin-java --skill java-performance -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/java-performance/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install pluginagentmarketplace/custom-plugin-java java-performance
```

2. **Manually: put the files in place**
- File: `.github/skills/java-performance/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add pluginagentmarketplace/custom-plugin-java --skill java-performance -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/pluginagentmarketplace/custom-plugin-java --path skills/java-performance
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/java-performance/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add pluginagentmarketplace/custom-plugin-java --skill java-performance -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/pluginagentmarketplace/custom-plugin-java/tree/HEAD/skills/java-performance/SKILL.md

## When to use it
- pick a garbage collector for low latency
- find CPU hotspots with a profiler
- trace a memory leak through a heap dump
- measure a method with a JMH benchmark
- set JVM limits for a container

## Example prompts
- Tune GC for low latency, focus: gc
- Take a thread dump from the running process and show where it blocks
- Write a JMH benchmark for this method

## Similar
- [performance-smell-detection](https://affpapa.org/en/nevibecode/skills/performance-smell-detection.md) — skill · 310 installs
- [161-java-profiling-detect](https://affpapa.org/en/nevibecode/skills/161-java-profiling-detect.md) — skill · 337 installs
- [162-java-profiling-analyze](https://affpapa.org/en/nevibecode/skills/162-java-profiling-analyze.md) — skill · 350 installs
- [golang-performance](https://affpapa.org/en/nevibecode/skills/golang-performance.md) — skill · 41900 installs
- [python-performance-optimization](https://affpapa.org/en/nevibecode/skills/python-performance-optimization.md) — skill · 35675 installs
- [m10-performance](https://affpapa.org/en/nevibecode/skills/m10-performance.md) — skill · 3600 installs

From the same set: [pluginagentmarketplace/custom-plugin-java](https://affpapa.org/en/nevibecode/by/pluginagentmarketplace/custom-plugin-java.md) — 4 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
