Agent skill

Memory Leak Debugging

by diodeme in diodeme/Gold-Band

Diagnoses and resolves memory leaks in JavaScript/Node.js applications.

AGPL-3.0Auto-check passedDevelopment

Install Memory Leak Debugging

skills CLI
$ npx skills add diodeme/Gold-Band --skill memory-leak-debugging -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install diodeme/Gold-Band memory-leak-debugging --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/diodeme/Gold-Band.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/memory-leak-debugging .claude/skills/memory-leak-debugging && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
memory-leak-debugging
GitHub stars
143
Token cost
~712 tokens
SKILL.md length
346 words
Files
4 (incl. references)
Skills in repo
11
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Diagnoses and resolves memory leaks in JavaScript/Node.js applications.

  • Works in 4 steps: Capturing Snapshots → Using Memlab to Find Leaks (Recommended) → Identifying Common Leaks → …
  • A user reports high memory usage
  • SKILL.md covers Core Principles and Workflows
  • Runs JavaScript scripts from its folder; calls node

What it does

Memory Leak Debugging is an agent skill from diodeme/Gold-Band. Diagnoses and resolves memory leaks in JavaScript/Node.js applications. Use when a user reports high memory usage, OOM errors, or wants to analyze heapsnapshots or run memory leak detection tools like memlab.

Its SKILL.md is about 710 tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/common-leaks.md`, `references/compare_snapshots.js` and `references/memlab.md`).

It sits in Development, covering Performance optimization. It works with Node.js and JavaScript. The repository describes itself as: Desktop app for harness engineering, loop engineering, graph engineering—and whatever comes next in local AI-agent workflows. The licence is AGPL-3.0.

When your agent uses it

  • A user reports high memory usage
  • Wants to analyze heapsnapshots
  • Run memory leak detection tools like memlab

Example prompts

  • “Use the memory-leak-debugging skill to diagnose and resolves memory leaks in JavaScript/Node.js applications”
  • “/memory-leak-debugging”

Requirements

  • Node.js

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Capturing Snapshots
  2. Using Memlab to Find Leaks (Recommended)
  3. Identifying Common Leaks
  4. Fallback: Comparing Snapshots Manually

What it can do on your machine

Read from SKILL.md and the folder at commit 75622ac. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (JavaScript), which the agent can run.

    Shell commands in SKILL.md call:

    • node

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Memory Leak Debugging loads about 712 tokens when it runs, and up to ~2.2k if it reads all its reference files. Until then it costs about 58 tokens; SKILL.md has 346 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~58
When it runs · the whole SKILL.md, loaded when a task matches
~712
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from diodeme/Gold-Band at commit 75622ac, republished under its AGPL-3.0 licence (© diodeme). 346 words, ~712 tokens.

Download SKILL.mdSave it as .claude/skills/memory-leak-debugging/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
memory-leak-debugging
description
Diagnoses and resolves memory leaks in JavaScript/Node.js applications. Use when a user reports high memory usage, OOM errors, or wants to analyze heapsnapshots or run memory leak detection tools like memlab.

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.

  • Use tools like click, navigate_page, fill, etc., to manipulate the page into the desired state.
  • Revert the page back to the original state after interactions to see if memory is released.
  • Repeat the same user interactions 10 times to amplify the leak.
  • Use take_memory_snapshot to save .heapsnapshot files to disk at baseline, target (after actions), and final (after reverting actions) states.

Once you have generated .heapsnapshot files using take_memory_snapshot, use memlab to automatically find memory leaks.

  • Read references/memlab.md for how to use memlab to analyze the generated heapsnapshots.
  • Do not read raw .heapsnapshot files using read_file or cat.
3. Identifying Common Leaks

When you have found a leak trace (e.g., via memlab output), you must identify the root cause in the code.

4. Fallback: Comparing Snapshots Manually

If memlab is not available, you MUST use the fallback script in the references directory to compare two .heapsnapshot files and identify the top growing objects and common leak types.

Run the script using Node.js:

bash
node skills/memory-leak-debugging/references/compare_snapshots.js <baseline.heapsnapshot> <target.heapsnapshot>

The script will analyze and output the top growing objects by size and highlight the 3 most common types of memory leaks (e.g., Detached DOM nodes, closures, Contexts) if they are present.

© diodeme, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in .agents/skills/memory-leak-debugging of diodeme/Gold-Band.

  • SKILL.md
  • references/common-leaks.md
  • references/compare_snapshots.js
  • references/memlab.md

Open the folder on GitHubat commit 75622ac

Compare with similar skills

Memory Leak Debugging next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Memory Leak Debugging compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Memory Leak Debugging this skilldiodeme/Gold-Band143—~712Automated safety check: PassAGPL-3.0
Code Review ChecklistshareAI-lab/learn-claude-code78k5 repos~1.1kAutomated safety check: PassMIT
Generate Release Notesteambit/bit18k—~2.2kAutomated safety check: PassCustom licence
ast-grep Codemod Referencewarp-drive-data/warp-drive3.2k—~2.6kAutomated safety check: PassMIT
Coding Standardskurealnum/dotfiles29017 repos~2.9kAutomated safety check: PassNone
React Best Practicesshapeshift/web2061 repos~2kAutomated safety check: PassMIT

Similar skills

  • Code Review Checklist

    shareAI-lab/learn-claude-code

    Reviews code against a five-part checklist covering security, correctness, performance, maintainability and testing, and reports findings in a fixed format.

    78k GitHub starsUsed in 5 repos~1.1k tokens
    DevelopmentAuto-check passed
  • Generate comprehensive release notes for Bit from git commits and pull requests.

    18k GitHub stars~2.2k tokensUpdated today
    DevelopmentAuto-check passed
  • ast-grep Codemod Reference

    warp-drive-data/warp-drive

    Reference for writing and debugging TypeScript and JavaScript codemods with @ast-grep/napi: parsing, node queries, meta-variables, rule objects and editing.

    3.2k GitHub stars~2.6k tokensUpdated today
    DevelopmentAuto-check passed
  • Coding Standards

    kurealnum/dotfiles

    Universal coding standards, best practices, and patterns for TypeScript, JavaScript, React, and Node.js development.

    290 GitHub starsUsed in 17 repos~2.9k tokens
    DevelopmentAuto-check passed
  • React Best Practices

    shapeshift/web

    Comprehensive React and Next.js performance optimization guide with 40+ rules for eliminating waterfalls, optimizing bundles, and improving rendering.

    206 GitHub starsUsed in 1 repo~2k tokens
    DevelopmentAuto-check passed
  • Typescript Expert

    cin12211/orca-q

    TypeScript and JavaScript expert with deep knowledge of type-level programming, performance optimization, monorepo management, migration strategies, and modern tooling.

    223 GitHub starsUsed in 11 repos~3.7k tokens
    DevelopmentAuto-check passed

More from diodeme/Gold-Band

All 11 skills in this repo
  • Rust Async Patterns

    diodeme/Gold-Band

    Master Rust async programming with Tokio, async traits, error handling, and concurrent patterns.

    143 GitHub starsUsed in 9 repos~3.1k tokens
    Auto-check passed
  • Rust Profiling

    diodeme/Gold-Band

    Rust profiling skill for performance analysis. An agent skill from diodeme/Gold-Band.

    143 GitHub starsUsed in 1 repo~1.7k tokens
    Auto-check: notes
  • Git Changelog

    diodeme/Gold-Band

    Create and localize user-facing release notes from an explicit Git change range.

    143 GitHub stars~1.4k tokensUpdated 7 days ago
    Auto-check passed
  • Git PR

    diodeme/Gold-Band

    Prepare, review, publish, or update a complete GitHub pull request for the current repository, including local commit readiness, safe push strategy, semantic title validation, repository-native PR…

    143 GitHub stars~1.5k tokensUpdated 7 days ago
    Auto-check passed
  • Stitch Design

    diodeme/Gold-Band

    Unified entry point for Stitch design work. An agent skill from diodeme/Gold-Band.

    143 GitHub starsUsed in 1 repo~925 tokens
    Auto-check passed
  • Memory Leak Audit

    diodeme/Gold-Band

    Audit code for memory leaks and disposable issues. An agent skill from diodeme/Gold-Band.

    143 GitHub stars~1.3k tokensUpdated 7 days ago
    Auto-check passed

Categories

Questions about Memory Leak Debugging

What does Memory Leak Debugging do?

Diagnoses and resolves memory leaks in JavaScript/Node.js applications. Memory Leak Debugging is an agent skill from diodeme/Gold-Band.js applications.

When should I use Memory Leak Debugging?

Memory Leak Debugging fits situations like: A user reports high memory usage; wants to analyze heapsnapshots; run memory leak detection tools like memlab.

How do I install Memory Leak Debugging in Claude Code?

Run `npx skills add diodeme/Gold-Band --skill memory-leak-debugging -a claude-code`. Or copy the skill folder (.agents/skills/memory-leak-debugging in diodeme/Gold-Band) into .claude/skills/memory-leak-debugging in your project. Claude Code loads it when a task matches its description.

How do I install Memory Leak Debugging in Codex?

Run `npx skills add diodeme/Gold-Band --skill memory-leak-debugging -a codex`. Or copy the skill folder (.agents/skills/memory-leak-debugging in diodeme/Gold-Band) into .agents/skills/memory-leak-debugging in your project. Codex loads it when a task matches its description.

Can I use Memory Leak Debugging in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add diodeme/Gold-Band --skill memory-leak-debugging -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/memory-leak-debugging, .gemini/skills/memory-leak-debugging, .github/skills/memory-leak-debugging and .opencode/skills/memory-leak-debugging in your project.

What does Memory Leak Debugging need to run?

Going by SKILL.md and its folder, Memory Leak Debugging needs JavaScript for the scripts in its folder and the command-line tools its instructions call (node). Our summary lists: Node.js.

Does Memory Leak Debugging access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Memory Leak Debugging safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Memory Leak Debugging use?

Memory Leak Debugging is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Memory Leak Debugging use?

About 712 tokens (SKILL.md is roughly 2.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.5k tokens, read only when the agent opens those files.

What are the alternatives to Memory Leak Debugging?

Skills that share tags, products or a category with Memory Leak Debugging: Code Review Checklist (shareAI-lab/learn-claude-code, 78k stars), Generate Release Notes (teambit/bit, 18k stars), ast-grep Codemod Reference (warp-drive-data/warp-drive, 3.2k stars) and Coding Standards (kurealnum/dotfiles, 290 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Memory Leak Debugging?

diodeme (a GitHub user) maintains it in diodeme/Gold-Band, which has 143 GitHub stars. The repository holds 11 skills in this directory. The repository was last updated on September 30, 2026.

Source: diodeme/Gold-Band on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.