ClaudeSuperPower

memory-leak-debugging

Skill

Diagnoses and resolves memory leaks in JavaScript/Node.js applications. Use when a user reports high memory usage, OOM errors, or wants to capture, compare, or inspect heap snapshots with Chrome DevTools MCP memory tools.

Install

git clone https://github.com/ChromeDevTools/chrome-devtools-mcp.git ~/.claude/skills/memory-leak-debugging

What is memory-leak-debugging?

Diagnoses and resolves memory leaks in JavaScript/Node.js applications. Use when a user reports high memory usage, OOM errors, or wants to capture, compare, or inspect heap snapshots with Chrome DevTools MCP memory tools.

What this can do

Capabilities declared in this component's own frontmatter — not inferred.

Inherit all session tools

Declares no tool restrictions — inherits every session tool

~55 tokens of context used while enabled, before you invoke anything

Documentation

README · ~2 min read

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.

Core Principles

  • Prefer MCP memory tools: Do NOT attempt to read raw .heapsnapshot files 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_heapsnapshot for 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.

Reviews

Log in to leave a review.

No reviews yet — be the first.

Explore related

Other things in this space — across every part of the ecosystem, not just skills.