Diagnoses and resolves memory leaks in JavaScript/Node.js applications. Use when a user reports high memory usage, OOM errors, or wants to analyze…
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.
don't have the plugin yet? install it then click "run inline in claude" again.