Dev & Engineering ✓ Microsoft · Official

V8 Heap Snapshot Analyzer

Trace V8 heap retention paths to diagnose leaks and GC-surviving objects.

40/ 100
Not recommended

Current benefit does not outweigh risk or uncertainty.

See how it was scored ↓
Works as-is in
Codex · Claude Code
Stars
★ 194k
Last updated
11d ago
License
MIT
heap-snapshot-analysisv8memory-leaksretainer-paths
+3garbage-collectionnode.jstypescript

What does this skill do, and when should you use it?

This Agent Skill analyzes V8 `.heapsnapshot` files for memory leaks, retention issues, before/after changes, and objects that survive garbage collection. It provides helpers for parsing snapshots, comparing them, and tracing retainer paths, plus guidance for investigation-specific scratchpad scripts. It starts with snapshots that already exist and does not capture them or drive VS Code scenarios. Snapshots larger than roughly 2 GiB may require streaming analysis instead of a full-file read.

Reads V8 .heapsnapshot files; uses parseSnapshot.ts and buildGraph to parse and model a snapshot; uses compareSnapshots.ts to compare before/after files and expose size, count, new-object-group, and summary results; uses findRetainers.ts to trace retainer paths while skipping weak edges; creates dated investigation scripts and findings.md files in .github/skills/heap-snapshot-analysis/scratchpad/; and uses streamSnapshot.mjs primitives for large-file section scanning, metadata parsing, chunked node and edge processing, and selective string resolution.

Good fit
  • A developer has before/after snapshots from DevTools or another workflow and needs to quantify object-count or size changes.
  • An engineer needs to determine why a particular object class remains alive after garbage collection.
  • A VS Code memory investigation needs to examine patterns such as RowCache templates, resource pools, observable closures, HoverService state, or serializer snapshots.
  • A snapshot is larger than roughly 2 GiB and the analyst must scan only the relevant sections without materializing the whole file.
  • An investigator needs one-off scripts and a dated record of hypotheses, rejected leads, measurements, and conclusions.

How do you install this skill?

Before you use it
  • The strings-section locator in parseSnapshot.ts may fail on ordinary or large snapshots; fix it and add sample-snapshot tests.
  • Relative imports from dated scratchpad subdirectories may need to be ../../helpers.
  • Heap snapshots may contain source code, prompts, object contents, and other sensitive data; authorization, storage, retention, and redaction requirements should be explicit.
  • Document a stable output format, failure behavior, version/changelog information, dependency setup, and maintenance/update path.
Before you start
Your agent needs
  • Shell / CLI
  • Local filesystem
Install first
  • Node.js

The Skill is located at .github/skills/heap-snapshot-analysis/SKILL.md in the microsoft/vscode repository. The source does not document a standalone installation command or separate package; place the directory containing this path where the chosen Agent Skills client can discover it. The repository is licensed under MIT.

Generic route: install into Claude Code manually (macOS / Linux)
tmp="$(mktemp -d)"
git clone --depth 1 https://github.com/microsoft/vscode.git "$tmp"
mkdir -p ~/.claude/skills
cp -R "$tmp/.github/skills/heap-snapshot-analysis" ~/.claude/skills/
rm -rf "$tmp"

Generated from the source repository and skill path; it copies only this skill's folder. If the author's install steps above differ, follow those first. To scope it to one project, replace ~/.claude/skills with that project's .claude/skills.

How do you use this skill?

Try saying

Once installed, send your agent any of these to trigger it:

  • Compare `/path/to/before.heapsnapshot` with `/path/to/after.heapsnapshot`, identify the largest new object groups, and trace retainer paths for `ChatModel`.

Start with existing .heapsnapshot files and ask, for example: “Compare /path/to/before.heapsnapshot with /path/to/after.heapsnapshot, identify the largest new object groups, and trace retainer paths for ChatModel.” Investigation scripts can import parseSnapshot and buildGraph from ../helpers/parseSnapshot.ts, compareSnapshots from ../helpers/compareSnapshots.ts, or findRetainerPaths from ../helpers/findRetainers.ts. The source provides this execution form: cd .github/skills/heap-snapshot-analysis, then run node --max-old-space-size=16384 scratchpad/analyze.mjs; for very large files, write a streaming script using streamSnapshot.mjs. If the task also requires launching VS Code, driving a scenario, and capturing snapshots, use the VS Code performance workflow skill first.

What are this skill's strengths and limitations?

Pros
  • Covers the main analysis stages: parsing, before/after comparison, and retainer-path tracing.
  • Explicitly instructs analysts to skip weak edges, reducing false leads from WeakRef and WeakMap relationships.
  • Includes a streaming approach for snapshots above roughly 2 GiB, including offset discovery, metadata-driven tuple widths, and chunked processing.
  • Documents several VS Code-specific retention patterns and defensive disposal practices.
  • Supports dated, gitignored scratchpad investigations with scripts, cached outputs, and findings documentation.
Limitations
  • It analyzes snapshots that already exist; it does not capture snapshots or reproduce interaction scenarios.
  • The regular helper may fail on files above roughly 2 GiB because of Node Buffer limits, requiring custom streaming analysis.
  • Streaming analysis requires investigation-specific choices about sections and fields, and field-level attribution can undercount listeners, watchers, and back-references.
  • The examples assume substantial Node.js heap allocation, including `--max-old-space-size=16384` or higher.
  • The source does not provide a standalone installation procedure, platform matrix, or test-suite information.

How does this skill compare with similar options?

Side by side with related skills; every score comes from the same FSRS standard.

Skill FS score Stars Last updated License
V8 Heap Snapshot Analyzer this page ✓ Microsoft · Official 40 · Not recommended ★ 194k 11d ago MIT
Azure Web PubSub Real-Time Messaging ✓ Microsoft · Official 48 · Use with care ★ 2.7k 3mo ago MIT
Expo Skill Feedback 54 · Use with care ★ 2.9k 20d ago MIT
Azure Queue Storage TypeScript Skill ✓ Microsoft · Official 48 · Use with care ★ 2.7k 3mo ago MIT
Azure Monitor OpenTelemetry for TypeScript ✓ Microsoft · Official 43 · Not recommended ★ 2.7k 3mo ago MIT

The VS Code performance workflow skill serves a different stage: it launches VS Code, drives a scenario, and captures snapshots, while this Skill performs low-level analysis on snapshots that already exist. They are complementary rather than interchangeable.

How did FollowSkills review this skill?

FollowSkills review · FSRS-2.0
Not recommended
40/ 100 5-point scale 2.0 / 5
The upstream repository has new commits since this review. The score still applies to the reviewed revision shown and may not cover the latest changes.
1Trust14 / 25 · 2.8/5

The skill mainly reads user-supplied heap snapshots and writes investigation scripts under a gitignored scratchpad; no credential theft, exfiltration, or destructive default is shown. However, it does not request confirmation of paths or disclose that heap snapshots may contain source code, prompts, or other sensitive data, and it lacks explicit permission boundaries, cleanup/rollback guidance, and dependency-integrity guidance, so points are deducted.

2Reliability4 / 20 · 1.0/5

The workflow is coherent and includes a streaming alternative for large files and explicit weak-edge handling. Static review nevertheless finds that parseSnapshot.ts searches backward from only roughly the final 100 bytes for the strings-array key, which will generally fail to locate a large strings section, and scratchpad examples may use an incorrect ../helpers relative path. There are no skill-specific tests or strong diagnosable failure procedures, so the score remains low.

3Adaptability8 / 15 · 2.7/5

The audience, input type, and main scenarios are reasonably clear, and the skill states a limitation for snapshots above 2 GiB. It does not define a standard output format, broader non-fit boundaries, exclusion triggers, or Chinese-language usage support. Its core function does not depend on overseas services, so no extra mainland-network deduction is applied.

4Convention8 / 15 · 2.7/5

The documentation is layered across parsing, comparison, retainer tracing, and script authoring, with examples, limitations, concepts, and MIT copyright headers. It lacks a skill version, changelog, standalone installation/dependency notes, FAQ, explicit maintenance owner, and update path; the example import paths are also questionable, so points are deducted.

5Effectiveness4 / 15 · 1.3/5

The intended comparison, graph, and retainer-path operations have clear practical value, and the skill offers a streaming strategy for very large snapshots. However, the apparent parser defect undermines reliable use, outputs are primarily console logs rather than a stable consumable format, and no representative results are statically verifiable, so only partial credit is justified.

6Verifiability2 / 10 · 1.0/5

The source files, copyright notices, and repository CI are auditable, but the supplied CI workflows cover chat performance and leak checks rather than these helpers. There are no skill-specific tests, sample snapshots, or third-party execution artifacts; the assessment therefore rests mainly on static code inspection and receives low credit.

1 2 3 4 5 6

Open a dimension to read why it scored that way

Reviewed Jul 20, 2026 Reviewed revision 5b3e1be7be9e Review evidence[1][2][3][4][5][6][7][8][9][10][11][12][13][14][15]

Evidence confidence:Low — Mostly static review, author material or a limited demo; useful for discovery, not high-risk decisions.

See the full review method →

FAQ

Can this Skill capture heap snapshots automatically?
No. It begins with existing `.heapsnapshot` files. Use the VS Code performance workflow skill first when you need to launch VS Code, run a scenario, and capture snapshots.
How should I handle a snapshot larger than 2 GiB?
Use a streaming analysis script with `streamSnapshot.mjs`. The source recommends locating sections such as `nodes`, `edges`, and `strings`, then parsing only the required numeric arrays in chunks instead of retrying the same full-file read with a larger heap limit.
Are weak references treated as leak evidence?
Retainer-path tracing should skip `weak` edges because WeakRef and WeakMap keys do not prevent collection. WeakMap backing arrays can appear in paths but may be red herrings.
Does it require network access or an MCP server?
The source shows no network calls or MCP dependency. Analysis requires local snapshot files, the helper files in the Skill directory, and a Node.js runtime.

More skills from this repository

All from microsoft/vscode

Dev & Engineering ✓ Microsoft · Official

CPU Profile Analyzer

Find performance bottlenecks in V8 and DevTools performance files.

★ 194k FS 52 Use with care 11d ago
Dev & Engineering ✓ Microsoft · Official

Memory Leak Audit

Systematically find and fix listener, lifecycle, and disposable leaks in VS Code code.

★ 194k FS 52 Use with care 11d ago
Dev & Engineering ✓ Microsoft · Official

Tool Rename Compatibility Check

Protect existing prompts and tool configurations when built-in tools are renamed.

★ 194k FS 63 Recommended 11d ago
Dev & Engineering ✓ Microsoft · Official

VS Code Configuration Policy Maintainer

Standardize VS Code policy registration, export, and validation.

★ 194k FS 59 Recommended 11d ago
Dev & Engineering ✓ Microsoft · Official

VS Code Unit Test Runner

Run VS Code repository unit tests by file, test name, or compiled-output glob.

★ 194k FS 55 Use with care 11d ago
Dev & Engineering ✓ Microsoft · Official

VS Code Chat Customizations Editor Skill

Guides developers through safe changes and testing for VS Code’s chat customization management UI.

★ 194k FS 52 Use with care 11d ago
Dev & Engineering ✓ Microsoft · Official

Run Command Builder

Configure and update commands shown in a VS Code Agent Session's Run button.

★ 194k FS 48 Use with care 11d ago
Dev & Engineering ✓ Microsoft · Official

VS Code Hygiene Checks

Catch VS Code commit-blocking style and hygiene issues before the work is declared complete.

★ 194k FS 48 Use with care 11d ago
Dev & Engineering ✓ Microsoft · Official

VS Code Smoke Test Failure Diagnosis

Diagnose and validate intermittent VS Code Electron smoke-test failures in Azure DevOps.

★ 194k FS 45 Not recommended 11d ago
Dev & Engineering ✓ Microsoft · Official

Anthropic SDK Upgrade Assistant

Upgrade Anthropic SDK packages methodically while checking API changes, compilation, and Claude-focused tests.

★ 194k FS 43 Not recommended 11d ago
Dev & Engineering ✓ Microsoft · Official

Context7 Project Bootstrapper

Build a complete VS Code project scaffold using current library documentation.

★ 194k FS 36 Not recommended 11d ago
Dev & Engineering ✓ Microsoft · Official

GitHub Copilot SDK Upgrade Assistant

Upgrade and validate @github/copilot in the VS Code Copilot Chat project.

★ 194k FS 28 Not recommended 11d ago
Dev & Engineering ✓ Microsoft · Official

VS Code Performance Investigation Workflow

Automate repeatable VS Code scenarios and collect performance and memory evidence.

★ 194k FS 47 Use with care 11d ago
Dev & Engineering ✓ Microsoft · Official

Code OSS Launch & Debug

Launch a built-from-source VS Code with isolated profiles, Playwright control, and multi-process debugging ports.

★ 194k FS 54 Use with care 11d ago
Dev & Engineering ✓ Microsoft · Official

VS Code Chat Performance Lab

Benchmark chat rendering and detect memory growth across VS Code builds.

★ 194k FS 53 Use with care 11d ago
Dev & Engineering ✓ Microsoft · Official

VS Code Telemetry Error Fix Guide

Trace unhandled telemetry errors to invalid-data producers instead of masking the crash site.

★ 194k FS 52 Use with care 11d ago
Dev & Engineering ✓ Microsoft · Official

Code OSS Development Log Viewer

Locate and inspect the latest Code OSS development logs.

★ 194k FS 51 Use with care 11d ago
Dev & Engineering ✓ Microsoft · Official

Project Instruction Builder

Turn conversation patterns and preferences into a durable project instruction file.

★ 194k FS 51 Use with care 11d ago
Dev & Engineering ✓ Microsoft · Official

Copilot Session Troubleshooter

Explain unexpected Copilot CLI behavior from session-log evidence.

★ 194k FS 51 Use with care 11d ago
Dev & Engineering ✓ Microsoft · Official

Workflow Skill Builder

Turns a conversation's working method into a reusable SKILL.md.

★ 194k FS 50 Use with care 11d ago

Related skills