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 using Chrome DevTools MCP tools.
Core Principles
- Prefer MCP memory tools: Do NOT attempt to read raw
.heapsnapshotfiles directly, as they are extremely large and will consume too many tokens. Use the Chrome DevTools MCP heap snapshot tools to summarize, compare, and inspect snapshots. - 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.
- Close Loaded Snapshots: Heap snapshots can be large. After completing an investigation, use
close_heapsnapshotfor each loaded snapshot to release memory held by the MCP server.
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.
Installs
1.9K
Repository
chromedevtools/…ools-mcpGitHub Stars
49.7K
First Seen
Mar 25, 2026
Security Audits