Agent SkillsDetachHead/rebased › ide-diagnostics-mcp

ide-diagnostics-mcp

GitHub

用于在 IntelliJ IDE 运行时通过 MCP 工具获取进程诊断数据,分析冻结、阻塞线程及 CPU 负载,辅助排查性能问题。

.agents/skills/ide-diagnostics-mcp/SKILL.md DetachHead/rebased

Trigger Scenarios

IDE 界面无响应或卡顿 需要分析当前活跃线程状态 排查高 CPU 占用原因

Install

npx skills add DetachHead/rebased --skill ide-diagnostics-mcp -g -y
More Options

Non-standard path

npx skills add https://github.com/DetachHead/rebased/tree/master/.agents/skills/ide-diagnostics-mcp -g -y

Use without installing

npx skills use DetachHead/rebased@ide-diagnostics-mcp

指定 Agent (Claude Code)

npx skills add DetachHead/rebased --skill ide-diagnostics-mcp -a claude-code -g -y

安装 repo 全部 skill

npx skills add DetachHead/rebased --all -g -y

预览 repo 内 skill

npx skills add DetachHead/rebased --list

SKILL.md

Frontmatter
{
    "name": "ide-diagnostics-mcp",
    "description": "Inspect a running IntelliJ IDE for freezes or blocked threads via MCP."
}

IDE Diagnostics MCP

Use the get_ide_diagnostics MCP tool to answer "what is this IDE doing right now?" from inside a running IntelliJ process.

This skill is for live IDE process evidence only. If the request is to diagnose an arbitrary issue, inspect repository code, analyze build/test output, or debug the MCP server itself, use the relevant debugging, testing, or code-investigation workflow instead.

Availability

The diagnostics toolset is hidden unless the IDE was started with:

-Didea.diagnostics.mcp.enabled=true

If get_ide_diagnostics is not available, tell the user the IDE must be restarted with that property. Do not confuse it with MCP server self-diagnostics; the property enables IDE process diagnostics exposed through MCP.

Capture Workflow

Start with a lightweight CPU sample without the raw dump:

{
  "sampleMillis": 1000,
  "topThreadCount": 25,
  "includeRawDump": false
}

For freezes, blocked threads, or coroutine investigation, request a bounded raw dump:

{
  "sampleMillis": 1000,
  "topThreadCount": 50,
  "includeRawDump": true,
  "maxDumpChars": 200000,
  "stripCoroutineDump": true
}

For action-specific performance questions, take one sample before or during the action and another while the symptom is visible. Compare topCpuThreads, blockedCountDelta, waitedCountDelta, and threads.stateCounts between samples.

Interpretation

  • process.processCpuLoad and process.systemCpuLoad are point-in-time process/system CPU load values; -1 means the JVM cannot provide the metric.
  • topCpuThreads[].cpuDeltaNanos ranks threads by CPU consumed during sampleMillis; -1 means thread CPU time is unavailable.
  • topCpuThreads[].state is the JVM Thread.State; RUNNABLE includes Java execution and native calls, including native I/O.
  • topCpuThreads[].isInNative, nativeFrame, and nativeOperationHint help identify native calls, but they are not OS wait-channel data.
  • topCpuThreads[].stackTrace is a short stack snapshot for attribution, not a full profiler call tree.
  • threads.stateCounts is useful for spotting many BLOCKED, WAITING, or TIMED_WAITING threads.
  • rawDump is the IntelliJ thread dump text and may include coroutine dump content when coroutine dumping is enabled in the running IDE.
  • rawDumpTruncated=true means repeat with a larger maxDumpChars or ask for a narrower next step before drawing conclusions from missing tail content.
  • coroutineDumpEnabled=false means the tool cannot provide coroutine dump details beyond ordinary thread stacks.

Escalation

Use this MCP tool for low-overhead triage and evidence gathering. For root-cause CPU attribution, allocation pressure, lock profiling, native wait-state attribution, or long recordings, ask for JFR, async-profiler, or the IDE's standard performance capture workflow.

Version History

  • 2af32ff Current 2026-09-22 01:03

Same Skill Collection

.agents/skills/actions/SKILL.md
.agents/skills/bazel-test-migration/SKILL.md
.agents/skills/code-style/SKILL.md
.agents/skills/commits/SKILL.md
.agents/skills/compare-python-typecheckers/SKILL.md
.agents/skills/conda-env-tests/SKILL.md
.agents/skills/debugging/SKILL.md
.agents/skills/driver-ui-tests/SKILL.md
.agents/skills/eel/SKILL.md
.agents/skills/extract-module/SKILL.md
.agents/skills/fix-project-leak-from-tc-report/SKILL.md
.agents/skills/icon-resources/SKILL.md
.agents/skills/icons/SKILL.md
.agents/skills/jewel-markdown/SKILL.md
.agents/skills/jewel-pr-preparer/SKILL.md
.agents/skills/jewel-release-helper/SKILL.md
.agents/skills/jna/SKILL.md
.agents/skills/kotlin-ui-dsl/SKILL.md
.agents/skills/kotlin-ui-swing-component-architecture/SKILL.md
.agents/skills/module-dependencies/SKILL.md
.agents/skills/module-set-pluginization/SKILL.md
.agents/skills/notebook-for-experiment/SKILL.md
.agents/skills/platform-coroutines-structured-concurrency/SKILL.md
.agents/skills/plugin-model-analyzer/SKILL.md
.agents/skills/poly-context/SKILL.md
.agents/skills/poly-symbols/SKILL.md
.agents/skills/pseudo-kmp/SKILL.md
.agents/skills/registry/SKILL.md
.agents/skills/remote-dev/SKILL.md
.agents/skills/safe-push/SKILL.md
.agents/skills/ssr/SKILL.md
.agents/skills/symbols-api/SKILL.md
.agents/skills/testing-internals/SKILL.md
.agents/skills/testing/SKILL.md
.agents/skills/treehouse/SKILL.md
.agents/skills/ui-accessibility/SKILL.md
.agents/skills/writing-tests/SKILL.md
.agents/skills/youtrack-community/SKILL.md
.claude/skills/actions/SKILL.md
.claude/skills/bazel-test-migration/SKILL.md
.claude/skills/code-style/SKILL.md
.claude/skills/commits/SKILL.md
.claude/skills/compare-python-typecheckers/SKILL.md
.claude/skills/conda-env-tests/SKILL.md
.claude/skills/debugging/SKILL.md
.claude/skills/driver-ui-tests/SKILL.md
.claude/skills/eel/SKILL.md
.claude/skills/extract-module/SKILL.md
.claude/skills/fix-project-leak-from-tc-report/SKILL.md

Metadata

Files
0
Version
2af32ff
Hash
fc93e294
Indexed
2026-09-22 01:03

Accueil - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-09-23 01:09
浙ICP备14020137号-1