既存プロジェクトのコードや設定を調べ、技術構成・設計・規約・テスト・懸念点などを7つの文書に整理します。根拠のファイルと不明点も明記し、引き継ぎに役立てます。
- 初めて触るコードの全体像を知りたいとき
- プロジェクトの引き継ぎ資料作成
- 設計資料と実装の違いを確認
JavaアプリのCPU高負荷やメモリ不足、応答遅延を症状から調べ、JDKの診断ツールで原因を絞り込みます。採取時の負荷や機密情報の扱いも整理します。
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.
実行スコア 未検証
インストール方法を見るJavaアプリのCPU高負荷、メモリ不足、起動や応答の遅さを、症状に合う診断手段で調べます。jcmdやjstackによるスレッド情報、jstatやGCログによるメモリ回収状況を確認し、必要に応じて実行状況を記録するJFRやasync-profilerへ進みます。複数回の採取と別の情報源を組み合わせ、原因の仮説を検証する流れを示します。
Javaアプリが重いものの、何を採取すべきか分からないときに向いています。デッドロックや、Javaのヒープ外で増えるメモリの調査にも使えます。修正後は同じ方法で再測定し、変化を確かめます。
OutOfMemoryErrorの原因を絞るための採取手順を整理して」診断ツールは対象JVMと同じOSユーザーで実行します。記録や接続を伴う操作には同意が必要で、本番環境には明示的な指示が求められます。ヒープダンプは機密情報を含むため、共有せずローカルで解析し、削除する方針です。採取時の停止やディスク容量にも注意します。
この紹介文は、公開されている SKILL.md をもとに AI(OpenAI Codex)が作成しました。正確な仕様は下の原文を確認してください。
SKILL.md の記述から、注意が要る操作と導入の前提を AI が確認しました。点数は実際に動かした結果(実行検証)だけで付けています。
点数には入れていません。 2026年10月25日 時点で AI(OpenAI Codex)が判定しました。目安なので、入れる前に原文も確認してください。
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Pick the lightest tool that answers the question, starting from the symptom.
| Tier | Tools | Rule |
|---|---|---|
| 1. Read-only | jps -l, jcmd <pid> help/VM.version/VM.flags/Thread.print, jstat, jstack, reading logs | May run after stating the exact command. Class histograms (jcmd <pid> GC.class_histogram, jmap -histo, jmap -histo:live) are NOT Tier 1: they run heap inspection at a safepoint and can pause application threads on a large heap, so treat them as Tier 2 (consent, stated overhead). The default forms and -histo:live additionally force a full GC; -all=true / jmap -histo skip the full GC but still pause during the scan (and count unreachable objects). |
| 2. Recording / attach | JFR (JFR.start, -XX:StartFlightRecording), async-profiler, NMT (-XX:NativeMemoryTracking), enabling GC logs | Requires user consent. State duration and expected overhead (JFR default profile is about 1-2%; async-profiler depends on mode; NMT summary roughly 5-10%, detail more) before running. |
| 3. Intrusive / sensitive | Heap dumps (GC.heap_dump, jmap -dump), jhsdb, commands that print JVM arguments or system properties (jps -v/-lv/-m, bare jcmd, VM.system_properties, VM.command_line, jinfo, ps aux on a Java process; they can expose secrets, redact output), JDWP with suspend, anything on production | Requires explicit consent, a stated target path, free-disk check (a dump is about the size of the used heap), and a stated pause. Heap dumps contain secrets (passwords, tokens, personal data). Never share or upload them; redaction is NOT a reliable safeguard. Analyze locally and delete afterwards. |
Never run Tier 2 or Tier 3 commands against production unless the user explicitly instructs it. Run diagnostic tools as the same OS user as the target JVM. Prefer reproducing on dev or staging.
| Symptom | First step | Then | Reference |
|---|---|---|---|
| High CPU | Thread dumps x3 (Tier 1) + top -H to map hot native thread ids to nid | JFR or async-profiler CPU flame graph (Tier 2) | threads, jfr, async-profiler |
| Memory leak / OOM | jstat -gcutil, GC.class_histogram -all=true twice, minutes apart (Tier 2: safepoint pause even with -all=true; without it a full GC too; get consent on production) | Heap dump + Eclipse MAT (Tier 3) or JFR OldObjectSample (Tier 2) | heap, gc |
| Slow startup | -Xlog:class+load, framework startup/condition reports, timestamped logs | JFR from start, async-profiler wall-clock | jfr, async-profiler |
| Deadlock / thread starvation | jcmd <pid> Thread.print (reports deadlocks), compare dumps over time | Virtual threads: Thread.dump_to_file | threads |
| GC pauses | GC log (-Xlog:gc*) and jstat -gc | JFR GC events; tune collector/heap | gc |
| Native memory growth (RSS grows, heap does not) | Compare RSS vs heap; enable NMT, jcmd VM.native_memory baseline / summary.diff (Tier 2) | async-profiler nativemem or allocator tools | nmt, containers |
| Slow requests | Tracing/metrics and logs first; Actuator or Dev UI (see below) | JFR (socket/file/lock events), async-profiler wall-clock | jfr, async-profiler |
| JVM crash / hang, no tools respond | hs_err_pid*.log, core dump | jhsdb (Tier 3) | basics |
Start with jps/jcmd basics to identify the target JVM and confirm which JDK version is running.
JDK tools see the JVM; some questions (which endpoint, which SQL query, which bean) are easier at the application level. Optional options, in order of preference:
metrics, health, loggers, httpexchanges) and Quarkus Dev UI / Micrometer metrics are built in and need no extra tool. Expose Actuator endpoints minimally; For heapdump and threaddump, follow the policy in the spring-observability skill: never expose them over public HTTP; the only exception is a temporary, user-consented window with authentication, TLS and network restriction, removed afterwards.gh skill install jdubois/boot-ui skills/bootui.If considering BootUI:
Follow the project's own documentation for usage; this skill does not reproduce it.
See containers for attaching tools inside containers, -XX:MaxRAMPercentage, and cgroup memory limits.
java-debugging skill.Official docs (prefer them over this skill for the JDK in use; change 21 to your version): jcmd https://docs.oracle.com/en/java/javase/21/docs/specs/man/jcmd.html, jfr https://docs.oracle.com/en/java/javase/21/docs/specs/man/jfr.html, JFR guide https://docs.oracle.com/en/java/javase/21/jfr/introduction-jdk-flight-recorder.html, troubleshooting guide https://docs.oracle.com/en/java/javase/21/troubleshoot/, async-profiler releases https://github.com/async-profiler/async-profiler/releases.
まだレビューはありません。使ってみた感想をお寄せください。
ログインなしで書き込めます。使ってみた感想、質問、動かなかった環境などを気軽にどうぞ。
まだコメントはありません。最初のコメントを書いてみませんか。
既存プロジェクトのコードや設定を調べ、技術構成・設計・規約・テスト・懸念点などを7つの文書に整理します。根拠のファイルと不明点も明記し、引き継ぎに役立てます。
リポジトリのAI活用準備度をAgentRCで評価し、9つの観点のスコアや改善案をHTMLにまとめます。組織独自の採点方針にも対応します。
実際のコードから言語や開発ルールを読み取り、AIコーディングエージェント向けの指示ファイルを生成。プロジェクト全体や領域別にルールを整理します。
AgentRCの準備度評価を、組織やチームの基準に合わせて調整します。チェックの重みや合格率、除外項目を設定し、CIでの合否判定にも使えます。
広告の実績データから無駄な支出と成果の高い施策を見つけ、停止・増額・検証の候補を整理します。媒体をまたぐ予算配分の見直しやA/Bテストの評価にも使えます。
指定したコードファイルに、構文や設計の理由を説明する学習用コメントを追加します。読む人の知識に合わせて解説の深さや繰り返し、注釈番号の有無を調整できます。