Dev & Engineering ✓ Microsoft · Official heap-snapshot-analysisv8memory-leaksretainer-pathsgarbage-collectionnode.jstypescript

V8 Heap Snapshot Analyzer

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

FollowSkills review · FSRS-2.0
Not recommended
40/ 100 5-point scale 2.0 / 5
1 2 3 4 5 6
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.

Evidence confidence:Low Reviewed Jul 20, 2026 Reviewed revision 5b3e1be7be9e
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.
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.
See the full review method →

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.

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

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 do you install this skill?

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.

How do you use this skill?

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.

How does this skill compare with similar options?

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.

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.

Dev & Engineering ✓ Microsoft · Official

Memory Leak Audit

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

Dev & Engineering ✓ Microsoft · Official

Tool Rename Compatibility Check

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

Dev & Engineering ✓ Microsoft · Official

VS Code Configuration Policy Maintainer

Standardize VS Code policy registration, export, and validation.

Dev & Engineering ✓ Microsoft · Official

VS Code Unit Test Runner

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

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.

Dev & Engineering ✓ Microsoft · Official

Run Command Builder

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

Dev & Engineering ✓ Microsoft · Official

VS Code Hygiene Checks

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

Dev & Engineering ✓ Microsoft · Official

VS Code Smoke Test Failure Diagnosis

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

Dev & Engineering ✓ Microsoft · Official

Anthropic SDK Upgrade Assistant

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

Dev & Engineering ✓ Microsoft · Official

Context7 Project Bootstrapper

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

Dev & Engineering ✓ Microsoft · Official

GitHub Copilot SDK Upgrade Assistant

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

Dev & Engineering ✓ Microsoft · Official

VS Code Performance Investigation Workflow

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

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.

Dev & Engineering ✓ Microsoft · Official

VS Code Chat Performance Lab

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

Dev & Engineering ✓ Microsoft · Official

VS Code Telemetry Error Fix Guide

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

Dev & Engineering ✓ Microsoft · Official

Code OSS Development Log Viewer

Locate and inspect the latest Code OSS development logs.

Dev & Engineering ✓ Microsoft · Official

Project Instruction Builder

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

Dev & Engineering ✓ Microsoft · Official

Copilot Session Troubleshooter

Explain unexpected Copilot CLI behavior from session-log evidence.

Dev & Engineering ✓ Microsoft · Official

Workflow Skill Builder

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

Related skills