SkillsReviewed · Google Chrome DevTools team

Memory Leak Debugging skill for Chrome DevTools MCP

This is an instruction skill that teaches an AI coding assistant to find and diagnose JavaScript and Node.js memory leaks, for developers who already use the Chrome DevTools MCP server, and its main catch is that the advanced heap tools only exist when that server is started with the --memoryDebugging flag. It sets out a snapshot, compare and retainer-inspection workflow built on named MCP tools such as take_heapsnapshot, compare_heapsnapshots and get_heapsnapshot_retaining_paths, plus a short reference of five common leak patterns and their fixes.

Researched 12 Nov 2026

In short.

This is an instruction skill that teaches an AI coding assistant to find and diagnose JavaScript and Node.js memory leaks, for developers who already use the Chrome DevTools MCP server, and its main catch is that the advanced heap tools only exist when that server is started with the --memoryDebugging flag. The skill tells the assistant to capture heap snapshots at baseline, after repeated actions and after reverting, compare them, then follow retaining paths and dominator chains to application code. It also says to avoid reading raw .heapsnapshot files, to ask the user before nulling detached DOM nodes, and to close loaded snapshots when finished. A reference file lists five common leak patterns with fixes. Nothing was run or tested for this report, so how well the workflow performs on real applications is unknown.

Researched and written by an AI model and checked by a second AI model. How it works

The selected scope is the memory-leak-debugging skill folder at the pinned revision: SKILL.md and references/common-leaks.md, both read in full. The repository-level LICENSE (Apache License 2.0) at the same revision was also read as the related licence notice, although it sits outside the selected folder. No NOTICE file was captured. Other folders, linked pages and the Chrome DevTools MCP server's own documentation and code were excluded. Nothing was installed, executed or tested, so tool behaviour, token use, version compatibility and real-world results are unknown.

The overview

What this resource is

The resource is an agent skill named memory-leak-debugging. It lives in the skills/memory-leak-debugging folder of the ChromeDevTools/chrome-devtools-mcp repository on GitHub [https://github.com/ChromeDevTools/chrome-devtools-mcp/tree/main/skills/memory-leak-debugging]. The captured copy is pinned to source revision 83d2ba4dde9663a8cd0bdb8af6c99fea50726003.

The skill has two files in the selected folder: SKILL.md, which holds the front matter and workflows, and references/common-leaks.md, a short catalogue of common leak patterns. The front matter describes the skill as one that diagnoses and resolves memory leaks in JavaScript and Node.js applications and should be used when a user reports high memory usage, OOM errors, or wants to capture, compare or inspect heap snapshots with Chrome DevTools MCP memory tools.

Overall assessment

On the written evidence, this is a focused, practical skill rather than a generic debugging essay. It names specific tools, the order to use them in, a way to amplify a leak (repeat the interaction 10 times), and the filters that target common leak categories. It also contains sensible guardrails: do not read raw heap snapshot files, ask before nulling detached DOM nodes, and close snapshots afterwards.

The main uncertainty is that the skill was only read, not run. Whether the named tools behave as described, how many tokens a real investigation uses, and how well an assistant follows the steps are not assessed. The skill is also tied to one MCP server and to a non-default flag, so it is only useful if that setup is in place.

Who it is for

It suits developers who work with an AI coding assistant that can load skills and talk to MCP servers, and who need help with a leaking web page or application. Typical triggers named in the skill are high memory usage, out-of-memory errors, and requests to capture, compare or inspect heap snapshots.

A beginner can benefit because the assistant is told the sequence of steps and the common causes, but the person still needs to be able to install and configure the Chrome DevTools MCP server and to judge the assistant's proposed code changes. An experienced developer gets a repeatable procedure that keeps the assistant on summarised snapshot data instead of raw files.

It is not aimed at people without an MCP-capable assistant, and the skill gives no guidance on non-JavaScript runtimes.

What it can do

The skill organises the work into four workflows. First, capturing snapshots: use page-scoped tools such as click, navigate_page and fill (with a pageId) to drive the page, revert it to the original state, repeat the same interactions 10 times to amplify the leak, and call take_heapsnapshot to save .heapsnapshot files at baseline, target (after actions) and final (after reverting) states.

Second, comparing snapshots: run get_heapsnapshot_summary on each file to confirm it loads and to compare totals, then compare_heapsnapshots on baseline and target. The skill says to start without classIndex for the summary diff and to request class-level detail only for suspicious growth.

Third, inspecting retainers and dominators: get_heapsnapshot_class_nodes to list instances, then get_heapsnapshot_retainers, get_heapsnapshot_retaining_paths, get_heapsnapshot_dominators and get_heapsnapshot_edges to see why objects stay reachable, get_heapsnapshot_object_details for a specific nodeId (size, type, distance, DOM detachedness), and get_heapsnapshot_duplicate_strings when string growth dominates.

Fourth, categorised filters via get_heapsnapshot_details or get_heapsnapshot_class_nodes with filterName: objectsRetainedByDetachedDomNodes, objectsRetainedByEventHandlers, objectsRetainedByContexts and objectsRetainedByConsole.

The reference file adds five leak patterns with fixes: uncleared event listeners, detached DOM nodes, unintentional global variables, closures that capture large objects, and unbounded caches or arrays (suggesting limits, LRU caches, or WeakMap and WeakSet).

Using it

What you need

The skill assumes the Chrome DevTools MCP server is available to the assistant. Its prerequisites section says the advanced memory tools (compare_heapsnapshots, get_heapsnapshot_details and others) are only available when the server is started with the --memoryDebugging flag. The assistant is told to first check whether those tools exist and, if not, to read the MCP configuration file to see whether the flag is enabled.

You also need an assistant or client that supports skills and MCP servers, and an application you can drive into the leaking state. Minimum versions of the MCP server, Node.js or Chrome, and the list of clients that can load this skill, are not stated in the captured files and are unknown. Disk space for snapshots is not discussed beyond a warning that snapshots can be large.

How it works

The skill is plain Markdown instructions. It does not contain scripts or executable code in the captured files. When the assistant loads it, the text steers the assistant's tool calls. The actual work is done by the Chrome DevTools MCP server's tools, which the skill names but does not implement.

The core idea is a three-point comparison. A baseline snapshot, a snapshot after repeating an action, and a final snapshot after reverting show whether memory is released. Summaries and diffs narrow attention to classes that grow, and retaining paths and dominator chains then show what keeps those objects alive, so the fix can target application code.

A deliberate design choice is to keep raw heap data out of the model's context. The skill says not to read raw .heapsnapshot files because they are extremely large and use too many tokens, and to use the MCP tools to summarise, compare and inspect instead. It also tells the assistant to call close_heapsnapshot for every loaded snapshot afterwards to release memory held by the MCP server.

Setup

The captured files give no command for starting the Chrome DevTools MCP server. Installation steps and supported clients are not documented here. Consult your assistant's installation instructions and preserve the references/common-leaks.md relative path.

What the skill does say is how to verify the one hard prerequisite: check that the advanced memory tools are present, and if they are not, inspect the MCP configuration for the --memoryDebugging flag. Note that SKILL.md links to references/common-leaks.md by relative path, so if you copy only SKILL.md the link will not resolve and the reference file should travel with it.

Worked example

The following is an illustration built from the steps the skill describes, not a recorded run. Suppose a web app slowly grows in memory each time a user opens and closes a dialog. The assistant would check that the heap tools exist, take a baseline snapshot with take_heapsnapshot, then open and close the dialog 10 times using click or navigate_page, and take a target snapshot. It would then revert the page to its original state and take a final snapshot.

Next it would run get_heapsnapshot_summary on each file, then compare_heapsnapshots on baseline and target without classIndex. If one class shows suspicious growth, it would call compare_heapsnapshots again with that classIndex, list instances with get_heapsnapshot_class_nodes, and follow get_heapsnapshot_retaining_paths for a representative node. It might also filter with objectsRetainedByEventHandlers.

If the path ends in a listener attached to window, the reference file points to calling removeEventListener on unmount. If the finding is a detached DOM node, the skill says to flag it to the user and ask before nulling it, because it may be an intentional cache. Finally it would call close_heapsnapshot for each loaded snapshot.

Assessment & evidence

Limitations and risks

The skill depends on a non-default server flag and on named MCP tools. If your server version does not provide those tools, or names them differently, the workflow cannot be followed as written. Which server versions match is not stated.

Although the description covers Node.js, the written workflows describe capturing from a frontend web page with page-scoped tools such as click, navigate_page and fill. The captured files do not give separate steps for attaching to a Node.js process on the server side. The principle to isolate whether the leak is in the browser or in Node.js is stated, but how to do it is not.

The skill is guidance, not an automated fixer. It gives no thresholds for what counts as a leak, no guidance on noise from garbage-collection timing, and no benchmarks or success rates. Repeating an action 10 times is a heuristic. The reference list is short and generic, covering five patterns.

On safety, the skill asks the assistant to consult the user before nulling detached DOM nodes. Any code change the assistant proposes still needs human review. Because snapshots may include application data held in memory, where saved .heapsnapshot files go and who can read them is not discussed; treat them as potentially sensitive.

Why the skill is built this way

Some design choices are explained in the text. Raw heap snapshots are described as extremely large and token-hungry, so the skill keeps the assistant on summaries and targeted queries. The skill prescribes a summary diff before class-level detail without stating the reason. Repeating the interaction 10 times is given as a way to amplify a leak. Reverting the page after interactions is given as a way to see whether memory is released, and the final snapshot is taken after that revert.

The caution about detached DOM nodes reflects an ambiguity the reference file states directly: detachedness is a good signal but some sites intentionally cache detached navigation trees, so the assistant must ask first. Whether these choices work well in practice is unknown, because nothing was run.

Alternatives

The selected documents do not describe or compare alternative tools; their setup requirements and comparative effectiveness are unknown.

The skill's own scope is limited to memory leaks: its files do not address CPU, network or rendering problems.

Evidence reviewed

The evidence consists of three files at source revision 83d2ba4dde9663a8cd0bdb8af6c99fea50726003. SKILL.md (4348 bytes) holds the skill's front matter, its prerequisite about the --memoryDebugging flag, its core principles and four workflows that name the Chrome DevTools MCP tools to use. references/common-leaks.md (1813 bytes) lists five common leak patterns with suggested fixes. The repository-level LICENSE (11357 bytes) is the Apache License, Version 2.0, and sits outside the skill folder as a related notice.

The workflows, tool names, flag, guardrails and leak patterns described in this report are documented instructions from the two skill files. The worked example is a hypothetical illustration built from those instructions, and the suggested next steps are recommendations rather than statements from the source. No execution logs, test results, usage statistics, issue history, release notes or documentation for the Chrome DevTools MCP server itself were available, so how the tools behave at runtime and whether the workflow succeeds on real applications are unverified.

Access & freshness

Costs

The skill files carry no price or subscription terms in the captured evidence, and the licence grants use at no charge. The cost of running the workflow is not stated: model usage charges for your assistant, the effort of running the Chrome DevTools MCP server, and any hosting of the application under test are all unknown or depend on your own setup.

Resource use is a practical cost the skill itself acknowledges: heap snapshots can be large and loaded snapshots hold memory in the MCP server until closed. No figures are given.

Rights and licence

The repository's LICENSE file at the same pinned revision is the Apache License, Version 2.0. It grants a perpetual, worldwide, no-charge, royalty-free copyright licence to reproduce, prepare derivative works of, publicly display, sublicense and distribute the work, plus a patent licence limited as the text describes. Redistribution requires giving recipients a copy of the licence, marking modified files with prominent change notices, and keeping existing copyright, patent, trademark and attribution notices. If a NOTICE file exists, its attribution notices must be carried along; no NOTICE file was captured.

The licence does not grant trademark rights, and the work is provided as is, with no warranty. The captured LICENSE shows the generic appendix boilerplate rather than a named copyright holder, and neither skill file contains its own licence header, so the licence is taken from the repository-level file. The LICENSE sits outside the skill folder, which is why it is treated as a related notice rather than part of the selected skill itself.

Freshness

The files described here were captured on 2026-11-12 at source revision 83d2ba4dde9663a8cd0bdb8af6c99fea50726003. The address in the selected scope points at the main branch, which can move after this revision, so later versions of the skill may differ.

These are the tool names and flag documented by the skill at this revision; compatibility with server releases, historically or currently, is unknown.

Suggested next steps

Before relying on the skill, confirm that your Chrome DevTools MCP server exposes the heap snapshot tools and that --memoryDebugging is enabled in its configuration. Installation steps and supported clients are not documented here. Consult your assistant's installation instructions and preserve the references/common-leaks.md relative path.

Try it first on a small app with a known leak, such as an event listener added on each open and never removed, so you can see whether the assistant reaches the right retaining path before trusting it on production code. Review every suggested code change yourself, answer the assistant's question about detached DOM nodes carefully, and delete saved .heapsnapshot files if they may contain sensitive data.

If you need Node.js server-side leak hunting, look for separate guidance, since the captured skill does not give Node-specific capture steps. If you redistribute the skill, keep the Apache 2.0 licence text with it and mark any changes you make.

Evidence for this report

LICENSEnotice · checked 2026-11-12
skills/memory-leak-debugging/SKILL.mdselected · checked 2026-11-12