Agent skill · data analytics · microsoft
heap-snapshot-analysis
Analyze V8 heap snapshots to investigate memory leaks and retention issues. Use when given .heapsnapshot files, asked to compare before/after snapshots, asked to find what retains objects, or investigating why objects survive GC. Provides snapshot parsing, comparison, retainer-path helpers, and scratchpad scripts.
Why this skill is useful
Adds specific parsing and analysis scripts for V8 heap snapshots that the AI wouldn't reliably generate on its own.
What it needs
Requires node installed locally. About 6k tokens when loaded. Last updated 2026-08-07. 188,455 stars on the source repository.
What this skill does
Heap Snapshot Analysis Investigate memory leaks from V8 heap snapshots (.heapsnapshot files). This skill starts when snapshots already exist: either the user provided them, DevTools exported them, or another workflow produced them. Use the helpers here to compare snapshots, group object deltas, and trace retainer paths. IGNORE Prior Investigations Start every investigation fresh. Do NOT read, consult, or be influenced by prior investigations found in: /memories/ (user, session, or repo memory) .github/skills/heap-snapshot-analysis/scratchpad/ (previous dated subfolders and their findings.md files) Any other notes from earlier sessions Previous findings can bias the analysis toward suspects that are no longer relevant, or cause the agent to skip steps and jump to conclusions. Let the current snapshots speak for themselves. Only reference prior work if the user explicitly asks you to. When to Use User provides .heapsnapshot files (before/after a workflow) User has heap snapshots captured by another skill or script Need to find what retains disposed objects (retainer path analysis) Comparing object counts/sizes between two snapshots Investigating why particular objects survive GC Workflow If the user needs the agent to launch VS Code, drive a scenario, and capture snapshots first, use the VS Code performance workflow skill before returning here for low-level snapshot analysis. 1. Parse Snapshots Use the helpers in parseSnapshot.ts to load snapshots. The files are often >500MB and too large for JSON.parse as a string — the helpers use Buffer-based extraction. In scratchpad scripts, import helpers from ../helpers/.ts. For very large snapshots, the helper may still be too eager. Node cannot create a Buffer larger than roughly 2 GiB, so snapshots above that size can fail with ERRFSFILETOOLARGE even before parsing. In that case, do not try to raise --max-old-space-size and retry the same full-file read. Switch to a streaming script. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills microsoft/heap-snapshot-analysis