memory-leak-debugging

Installation
SKILL.md

Memory Leak Debugging

This skill provides expert guidance and workflows for finding, diagnosing, and fixing memory leaks in JavaScript and Node.js applications.

Core Principles

  • Prefer memlab: Do NOT attempt to read raw .heapsnapshot files directly, as they are extremely large and will consume too many tokens. Always recommend and use memlab to process snapshots and identify leak traces.
  • Isolate the Leak: Determine if the leak is in the browser (client-side) or Node.js (server-side).
  • Common Culprits: Look for detached DOM nodes, unhandled closures, global variables, event listeners not being removed, and caches growing unbounded. Note: Detached DOM nodes are sometimes intentional caches; always ask the user before nulling them.

Workflows

1. Capturing Snapshots

When investigating a frontend web application memory leak, utilize the chrome-devtools-mcp tools to interact with the application and take snapshots.

Related skills
Installs
433
GitHub Stars
39.6K
First Seen
Mar 25, 2026