Diagnose JVM incidents from stack traces, thread dumps, JFR, jcmd output, or memory-pressure evidence.
Ships in jvm. 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.
Read when SKILL.md points to them.
Triage JVM runtime problems with standard JDK diagnostic tools and an evidence-first workflow.
Collect the smallest next capture that reduces uncertainty before naming a root cause.
Prefer jcmd first for live JVMs, keep jstack and jmap as legacy or narrower-purpose tools, and reserve jhsdb for Serviceability Agent cases such as core dumps or deeper postmortem inspection.
Treat JDK 8, 11, 17, 21, and 25 as the supported LTS reference line for this skill, and confirm runtime-specific command availability on the target JVM before assuming a newer flag or event exists.
Treat JFR as the standard low-overhead path on JDK 11 and later.
On JDK 8, do not assume JFR is ordinarily available: verify the exact Oracle JDK 8 commercial-feature and licensing posture before recommending JFR.start or -XX:StartFlightRecording, and prefer thread dumps plus other low-risk captures when that requirement is not clearly satisfied.
Start from the available traces, logs, dumps, or recordings and identify the symptom that needs explanation. Use jcmd commands for live diagnostic command selection. Use thread dumps and JFR for snapshot comparison or time-based evidence. Use legacy tools only for a JDK 8-era tool requirement. Use jhsdb for core files or Serviceability Agent work.
Confirm the target process, allowed capture scope, and command impact before live attachment. Continue authorized diagnostics without requesting approval for each command. Heap dumps, live Serviceability Agent attachment, remote debug servers, and runtime changes need authority covering their specific impact. When that authority is missing, analyze existing evidence and report the precise next capture needed. Store diagnostic captures in restricted paths and remove them when the investigation allows. Stop recordings started for the investigation when finished; leave others untouched unless their owner authorizes a change.
Run diagnostics on the same machine as the target JVM and, for attach-based tools, with the same effective user/group as the target process.
Tool-selection baseline:
jcmd for normal live-process diagnosticsjstack and jmap only when their narrower legacy output shape is specifically usefuljhsdb for core dumps, SA debugger flows, or when live attach is not the normal jcmd pathIdentify the JVM first:
jcmd -l
[!NOTE]
jcmd -llists processes visible to the current user context. In container environments, process visibility may be restricted by namespace boundaries. Ensure you are querying from the correct user or namespace context.
Select the commands needed to identify the target and investigate the symptom:
jcmd -l
jcmd <pid> help
jcmd <pid> help Thread.print
jcmd <pid> VM.version
jcmd <pid> VM.command_line
jcmd <pid> VM.flags
jcmd <pid> Thread.print -l
Use when: the symptom is real but you do not yet know which deeper tool is justified.
Use diagnostic capture templates when collecting thread, JFR, heap, native-memory, legacy-tool, or core-file evidence.
Tie the diagnosis to the target process and captured evidence, and separate confirmed causes from hypotheses.
Validate only the capture used: thread detail, recording name and status, or enabled Native Memory Tracking, as applicable.
Explain any escalation beyond jcmd and any missing evidence that prevents a diagnosis.
Stop collecting when the existing evidence answers the operator’s question or further capture exceeds the grant.
Use output shapes when interpreting process discovery, thread, heap, histogram, native-memory, or JFR output.
jcmd before legacy jstack or jmap for common runtime diagnostics.jhsdb for cases that truly need Serviceability Agent behavior.| Anti-pattern | Why it fails | Correct move |
|---|---|---|
| jumping straight to a heap dump | high cost and often unnecessary for the first pass | start with Thread.print, GC.heap_info, or JFR |
| reading one thread dump as a full story | one snapshot can hide transient blocking or scheduler effects | capture repeated dumps and compare them |
using jstack or jmap by default | current JDK guidance favors jcmd for common attach operations | prefer jcmd <pid> help and then the specific subcommand |
using jhsdb for ordinary live triage | Serviceability Agent attach is heavier and official docs warn about hangs/crashes on detach | keep jhsdb for core dumps or SA-specific workflows |
| assuming RSS growth must be heap growth | non-heap memory such as metaspace, code cache, arenas, or thread stacks can dominate | use VM.native_memory when the heap story does not fit |
| collecting evidence without naming the symptom | tool choice becomes random | classify the symptom first, then choose the smallest matching capture |
jcmd and JFRreferences/diagnostic-capture-templates.md (opens in a new tab)references/diagnostic-output-shapes.md (opens in a new tab)references/jcmd-commands.md (opens in a new tab)references/jdk8-legacy-tools.md (opens in a new tab)references/jhsdb.md (opens in a new tab)references/thread-dumps-jfr.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
3 skills in this plugin
/jvm:jvm-runtime-diagnosticsfrom jvm
npx claudepluginhub ririnto/sinon --plugin jvm