Skip to content
Kitbay
Skill

heap-snapshot-analysis

MITUpdated on Nov 11, 2026195,341GitHub starsIncludes scripts

A skill from the VS Code repository for investigating memory leaks from V8 heap snapshot files that already exist.

What the skill teaches

A skill from the VS Code repository for investigating memory leaks from V8 heap snapshot files that already exist. It ships TypeScript and Node helpers that parse snapshots (with a streaming route for files near or above 2 GiB), compare a before and an after snapshot by size, count and new object groups, and find the retainer paths that keep an object alive while skipping weak edges. Each investigation gets a dated scratchpad folder with its scripts and a findings file. It also lists retention patterns seen in VS Code's own code and false retainers such as DevTools handles, and assumes Node with a large memory limit.

Capabilities

  • Parse large V8 heap snapshots
  • Compare before and after snapshots
  • Find the retainer paths that keep objects alive
  • Record each investigation's findings in a dated folder