Skip to content

github/awesome-copilot / skills/java-diagnostics

java-diagnostics

Verified

Symptom-first runtime diagnostics for JVM applications using JDK tools: jcmd, jstack, jmap, jstat, JFR, GC logs, async-profiler, Native Memory Tracking, and Eclipse MAT. Use when a Java app has high CPU, memory leaks or OutOfMemoryError, slow startup, deadlocks or thread starvation, long GC pauses, native memory growth, or slow requests. Includes permission tiers for safe use.

FileKindSize
SKILL.mdskill md7.2 KB
references/async-profiler.mdmarkdown3.0 KB
references/containers.mdmarkdown1.7 KB
references/gc.mdmarkdown1.6 KB
references/heap.mdmarkdown3.0 KB
references/jcmd-basics.mdmarkdown1.9 KB
references/jfr.mdmarkdown2.3 KB
references/native-memory.mdmarkdown1.5 KB
references/thread-dumps.mdmarkdown3.3 KB

references/native-memory.md

View on GitHub
# Native Memory Tracking (Tier 2: needs consent)

Use when container RSS grows but heap usage does not. NMT tracks JVM-internal allocations (metaspace, thread stacks, code cache, GC structures, direct buffers via `Internal`/`Other`), not arbitrary native library `malloc`.

Enable at startup (needs a restart; Oracle documents a 5-10% JVM performance drop with NMT enabled, plus extra malloc header memory, and `detail` costs more; measure on your workload):

```
-XX:NativeMemoryTracking=summary
```

Then:

```bash
jcmd <pid> VM.native_memory summary
jcmd <pid> VM.native_memory baseline
# ... wait while the problem develops ...
jcmd <pid> VM.native_memory summary.diff
```

Use `detail` only for short sessions (higher overhead). It cannot be enabled on a running JVM.

## Common growth areas

| Category | Typical cause | Mitigation |
|----------|---------------|-----------|
| Thread | Too many threads (stack ~1 MB each) | Bound pools; virtual threads; `-Xss` |
| Class | Classloader leak, dynamic proxies | Fix leak; `-XX:MaxMetaspaceSize` |
| Code | Large JIT code cache | `-XX:ReservedCodeCacheSize` |
| GC | Remembered sets/card tables for big heaps | Right-size heap |
| Internal/Other | Direct `ByteBuffer`, Netty pools | `-XX:MaxDirectMemorySize`, check pooling |
| Not in NMT | JNI/native libraries, glibc arenas | async-profiler `nativemem`; `MALLOC_ARENA_MAX=2`; allocator profiling |

Total RSS ≈ heap + metaspace + threads + code cache + direct buffers + native libs. Compare against the container memory limit (see [containers](containers.md)).
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 197kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall